Spark 构建路径与不兼容的 Scala 版本 (2.10.0) 交叉编译

2024-02-16

当我尝试在 scala IDE 中执行 Spark sql 代码时,出现以下错误,有人可以帮我解决这个问题吗?

spark build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page. spark       Unknown Scala Version Problem
akka-remote_2.10-2.3.11.jar of spark build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page.  spark       Unknown Scala Version Problem
akka-slf4j_2.10-2.3.11.jar of spark build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page.   spark       Unknown Scala Version Problem
breeze_2.10-0.11.2.jar of spark build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page.   spark       Unknown Scala Version Problem
breeze-macros_2.10-0.11.2.jar of spark build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page.    spark       Unknown Scala Version Problem
chill_2.10-0.5.0.jar of spark build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page. spark       Unknown Scala Version Problem
jackson-module-scala_2.10-2.4.4.jar of spark build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page.  spark       Unknown Scala Version Problem
json4s-ast_2.10-3.2.10.jar of spark build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page.   spark       Unknown Scala Version Problem
json4s-core_2.10-3.2.10.jar of spark build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page.  spark       Unknown Scala Version Problem
json4s-jackson_2.10-3.2.10.jar of spark build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page.   spark       Unknown Scala Version Problem
quasiquotes_2.10-2.0.1.jar of spark build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page.   spark       Unknown Scala Version Problem
scalatest_2.10-2.2.5.jar of spark build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page. spark       Unknown Scala Version Problem
spark-catalyst_2.10-1.4.0.jar of spark build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page.    spark       Unknown Scala Version Problem
spark-core_2.10-1.5.2-tests.jar of spark build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page.  spark       Unknown Scala Version Problem
spark-core_2.10-1.5.2.jar of spark build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page.    spark       Unknown Scala Version Problem
spark-graphx_2.10-1.4.0.jar of spark build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page.  spark       Unknown Scala Version Problem
spark-launcher_2.10-1.5.2.jar of spark build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page.    spark       Unknown Scala Version Problem
spark-mllib_2.10-1.4.0-tests.jar of spark build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page. spark       Unknown Scala Version Problem
spark-mllib_2.10-1.4.0.jar of spark build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page.   spark       Unknown Scala Version Problem
spark-network-common_2.10-1.5.2.jar of spark build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page.  spark       Unknown Scala Version Problem
spark-network-shuffle_2.10-1.5.2.jar of spark build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page. spark       Unknown Scala Version Problem
spark-sql_2.10-1.4.0.jar of spark build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page. spark       Unknown Scala Version Problem
spark-streaming_2.10-1.5.2.jar of spark build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page.   spark       Unknown Scala Version Problem
spark-unsafe_2.10-1.5.2.jar of spark build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page.  spark       Unknown Scala Version Problem
spire_2.10-0.7.4.jar of spark build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page. spark       Unknown Scala Version Problem
spire-macros_2.10-0.7.4.jar of spark build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page.  spark       Unknown Scala Version Problem
The version of scala library found in the build path of spark (2.10.4) is prior to the one provided by scala IDE (2.11.7). Setting a Scala Installation Choice to match.    spark       Unknown Scala Version Problem

在您的项目中,您使用的是用不同 Scala 版本构建的 jar;确实从日志来看:

  • Scala IDE 使用 Scala 2.11.7
  • 使用 Scala 2.10 构建的 Apache Spark 1.5.2

您需要对齐 jar 版本。实际上 Spark 1.5.2 预构建(可从here http://spark.apache.org/downloads.html)出于兼容性原因,使用 Scala 2.10 构建(请参阅here https://stackoverflow.com/questions/30342273/spark-submit-fails-with-java-lang-nosuchmethoderror-scala-predef-conformsls)。网站上有一条注释:

注意:Scala 2.11 用户应下载 Spark 源包并使用 Scala 2.11 支持进行构建。

为了解决这个问题,在您的项目中使用与构建 Spark 相同的 Scala 版本。

我建议尝试在 Scala IDE 中切换到 Scala 2.10,它将解决该问题。

Eclipse + Maven

就我而言,我将 Eclipse 与 Scala IDE 和 Maven 结合使用,因此我通过以下方式更新了 Maven 依赖项:

<dependency>
    <groupId>org.scala-lang</groupId>
    <artifactId>scala-library</artifactId>
    <version>2.10.6</version>
</dependency>
<dependency>
    <groupId>org.apache.spark</groupId>
    <artifactId>spark-core_2.10</artifactId>
    <version>1.5.2</version>
</dependency>

然后,我在IDE中更改了Scala版本:右键项目->Scala->设置Scala安装 or 右键单击 Scala 库容器 -> 属性并选择Scala 2.10,如下所示

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Spark 构建路径与不兼容的 Scala 版本 (2.10.0) 交叉编译 的相关文章

  • keras.models.load_model 失败,'tags' = train

    我正在探索tensorflow 2 0的c API 问题 将模型加载到 python 中时 权重不会恢复 因此模型似乎未经训练 工作流程 我正在使用 TF 2 0 C api 来处理模型的训练 我遵循的一般设置是 1 使用 TF keras
  • Jquery Ui拖放问题

    我正在开发一个带有 jquery 的工具栏插件以及 jquery ui 的拖放功能 这个想法如下 我有一个列表 ul 和项目 li 其中每个项目代表一个工具 如文本 几何图形等 当我拖动工具然后将其放在容器上时 必须创建一个 小部件 问题是
  • 将 PNG 图像打印到 Zebra 网络打印机

    我正在尝试找到一种将图像打印到斑马的方法 但遇到了很多麻烦 根据文档 第一种编码称为 B64 使用 MIME 对数据进行编码 Base64 方案 Base64 用于对电子邮件附件进行编码 Base64 将 6 位编码为字节 比未封装的数据扩
  • 将两种不同的颜色设置为单个容器

    I am trying to achieve a custom design dynamically from my button I have designed this button from a Container with InkW
  • “硬编码”用户代理足以让程序在多台计算机上运行吗?

    我在用着idHttp登录到一些网站并下载一些文件 我想知道因为我的程序将在具有不同窗口和软件的多台计算机上运行 例如当我说 idHttp userAgent Mozilla 5 0 Windows NT 6 1 WOW64 AppleWeb

随机推荐

  • 使用 pandas.to_csv 时如何指定日期格式?

    默认输出格式为to csv is 12 14 2012 12 00 00 AM 我不知道如何仅输出特定格式的日期部分 20121214 或 csv 文件中两个单独列中的日期和时间 20121214 084530 该文档太简短 无法为我提供有
  • PostgreSQL 中 json 数组值的交集

    在 PostgreSQL 9 4 中 我有一个这样的表 id array json 1 type single field id 9 type range field id 2 2 type single field id 10 type
  • 如何保持数据库表中记录的顺序

    我正在创建一个数据库表 该表将存储最终将显示在网页上的菜单链接 我的问题是我想控制菜单项的顺序 我可以有一个名为 order 的字段 但每次我有一个新的菜单链接时 我都必须插入 order 并将所有具有更高 order 的记录更改为 1 例
  • 使用 Pandas 读取 csv 时如何指定时区信息

    我有一个 csv 文件 其时间戳以 CAT 中非时间 给出 当我使用以下方法将其作为 pandas 数据框读入时 df pd read csv path parse dates timestamp dayfirst True 我收到错误 C
  • Visual Studio 2010 中的 2008 年商业智能项目(SSIS 和 SSRS)

    我必须安装什么才能从 Visual Studio 2010 创建 SQL 商业智能项目 例如 Report Services 报表和集成服务包 我是否能够创建同时适用于 SQL 2005 和 SQL 2008 的解决方案 我尝试在客户端上安
  • 如何返回最早日期的记录?

    我需要返回每个不同学生 ID 的第一条记录 在我的示例代码中 我有一个记录在同一日期发生了两个事件 而另一名学生在不同日期发生了多个事件 我需要选择最早的日期 如果同一日期发生多个事件 则将最早的事件 ID 作为下一个标准 有什么好的方法可
  • Google 地图 api - 将标记捕捉到最近的道路

    我正在尝试将坐标捕捉到最近的道路 但我仍然无法以简单的方式做到这一点 这是简单的代码 如何改进它 结果将在路上标记
  • 如何仅在 Nuxt.js 中加载客户端资源

    我正在尝试在 Nuxt js 之上使用 Tone js 构建一个应用程序 Tone js 需要浏览器的 Web Audio API 并且当 Nuxt 在服务器端渲染内容时 我的构建不断失败 Nuxt 在中解决了这个问题插件文档 https
  • 消除 Maven POM 冗余

    我有一个具有以下配置的父 POM
  • 蓝牙 LE (4.0) 有多少个中央设备可以连接到外围设备?

    我想知道一个外围设备可以同时连接多少个中心 我的问题是针对 iOS 的 但我希望得到大家的答复 有几件事 我知道中央设备 而不是外围设备 旨在处理多个连接 然而 出于各种原因 我想尝试相反的设置 来自蓝牙核心规范 V4 外围角色针对支持单一
  • django-导入-导出外部管理

    我正在尝试使用 django import export 实现简单的 xls 文件导入并保存到模型 不幸的是 这些文档仅涵盖管理集成 我被困在我的示例代码中 class UploadFileForm forms Form file form
  • 如何从 Core Data 的持久存储中删除所有对象?

    我的应用程序中有核心数据 因此 我获取一个 XML 文件 将数据解析为模型对象并将它们插入到核心数据中 它们保存在持久存储中 当我重新启动应用程序时可以访问它们 但是 我希望能够随意刷新持久存储中的数据 因此我需要首先从存储中删除现有对象
  • 如何使用 client_credentials 从资源服务器访问另一个 oauth2 资源?

    我想使用 client credentials 从反应性资源服务器访问另一个受 oauth2 保护的资源 我使用颁发的令牌访问资源服务器的部分正在工作 但没有使用 webclient 调用其他资源 使用 UnAuthenticatedSer
  • 如何在 Eiffel 中格式化 DOUBLE 以仅打印两位小数?

    在埃菲尔铁塔中 你如何做到这一点 118 1999999999999 打印到 118 20 在其他语言中 这只是 printf 的问题 但在 Eiffel 中似乎没有办法轻松做到这一点 您应该使用类 FORMAT DOUBLE local
  • 对不同的 Android 应用程序使用一个 Google 地图 API 密钥

    我刚刚生成了要在我的 Android 应用程序中使用的 Google 地图 API 密钥 我必须提供应用程序的 SHA 1 指纹和包名称 它看起来像这样 BB 0D AC 74 D3 21 E1 43 67 71 9B 62 91 AF A
  • 计算两个日期之间的星期几小时对

    考虑以下列表星期几小时配对24H format Mon 9 23 Thu 12 13 14 Tue 11 12 14 Wed 11 12 13 14 Fri 13 Sat Sun 和两个时间点 例如 Start datetime datet
  • ffmpeg 给出错误选项 movflags not find

    在 Ubuntu 12 04 LTS 中我使用过 movflags frag keyframe empty moov在我的 ffmpeg 命令中 ffmpeg i http filesbe vocativ internal net 03 4
  • 处理 appwidget 的多个实例

    我有一个配置活动 一个大型小部件提供程序和一个小型小部件提供程序 在配置活动中 我在共享首选项中保存了一些值 我从大大小小的应用程序小部件提供商那里获得了这些共享的偏好 我无法为应用程序小部件提供唯一的 ID 并且每次从配置活动转到应用程序
  • D7 需要苹果风格的“等待”动画

    有谁知道与 Delphi 7 一起使用的 Apple 风格 等待 动画 VCL 组件吗 谢谢 不知道当前的 Apple 外观如何 但这里有一个免费的在线服务来创建 Ajax 加载 gif 文件 http www ajaxload info
  • Spark 构建路径与不兼容的 Scala 版本 (2.10.0) 交叉编译

    当我尝试在 scala IDE 中执行 Spark sql 代码时 出现以下错误 有人可以帮我解决这个问题吗 spark build path is cross compiled with an incompatible version o