Scala版本冲突--java.lang.NoSuchMethodError:scala.collection.immutable.HashSet$.empty()Lscala/collection/
来源:互联网 发布:切割音频的软件 编辑:程序博客网 时间:2024/06/05 04:07
问题描述
Run 代码的时候报错
Exception in thread "main" java.lang.NoSuchMethodError:scala.collection.immutable.HashSet$.empty()Lscala/collection/immutable/HashSet;
解决办法
将Scala2.11.x更换为Scala2.10.x
操作如下:
File –> Other Settings –> Default Project Structure –> Global Library
Step1. 先移除所有的Scala2.11.x版本,然后如下图添加:
Step2. 修改iml文件
然后找到项目名称开头的.iml文件,找到类似下面的一行:
<orderEntry type="library" name="scala-sdk-2.11.8" level="project" />
修改为:
<orderEntry type="library" name="scala-sdk-2.10.6" level="project" />
Step3:重新Run一下,OK。
17/07/26 11:25:29 INFO Remoting: Remoting started; listening on addresses :[akka.tcp://sparkDriver@172.16.0.34:52665]17/07/26 11:25:29 INFO Utils: Successfully started service 'sparkDriver' on port 52665.17/07/26 11:25:29 INFO SparkEnv: Registering MapOutputTracker17/07/26 11:25:29 INFO SparkEnv: Registering BlockManagerMaster17/07/26 11:25:29 INFO DiskBlockManager: Created local directory at C:\Users\yuhul\AppData\Local\Temp\blockmgr-3d647d21-eb1c-4a2d-a21a-8441f721bc1817/07/26 11:25:29 INFO MemoryStore: MemoryStore started with capacity 1956.4 MB17/07/26 11:25:29 INFO HttpFileServer: HTTP File server directory is C:\Users\yuhul\AppData\Local\Temp\spark-ef0a813c-bcb1-4a4d-af97-412044fa2eb4\httpd-fe5b5854-4cdd-4476-9803-60ab7066a78f17/07/26 11:25:29 INFO HttpServer: Starting HTTP Server17/07/26 11:25:29 INFO Utils: Successfully started service 'HTTP file server' on port 52666.17/07/26 11:25:29 INFO SparkEnv: Registering OutputCommitCoordinator17/07/26 11:25:29 WARN Utils: Service 'SparkUI' could not bind on port 4040. Attempting port 4041.17/07/26 11:25:29 WARN Utils: Service 'SparkUI' could not bind on port 4041. Attempting port 4042.17/07/26 11:25:29 INFO Utils: Successfully started service 'SparkUI' on port 4042.17/07/26 11:25:29 INFO SparkUI: Started SparkUI at http://172.16.0.34:4042
阅读全文
1 0
- Scala版本冲突--java.lang.NoSuchMethodError:scala.collection.immutable.HashSet$.empty()Lscala/collection/
- Spark启动错误Exception in thread “main” java.lang.NoSuchMethodError: scala.collection.immutable.HashSet$
- java.lang.NoSuchMethodError: scala.Predef$.$scope()Lscala/xml/TopScope$;
- Scala Immutable Collection(集合)
- Exception in thread "main" java.lang.NoSuchMethodError: scala.Predef$.intWrapper(I)Lscala/runtime/Ri
- Exception in thread "main" java.lang.NoSuchMethodError: scala.Predef$.$conforms()Lscala/Predef$$less
- scala -Collection
- scala-collection
- SCALA 集合框架文档翻译-Concrete Immutable Collection Classes
- cause java.lang.NoSuchMethodError: antlr.collection
- Spark java.lang.NoSuchMethodError: scala.Predef$.refArrayOps
- scala collection笔记
- Scala之集合Collection
- Scala 集合(Collection)
- scala 的collection
- scala常用collection总结
- scala Collection 运算符
- Hive On Spark报错:Exception in thread "main" java.lang.NoClassDefFoundError: scala/collection/Iterable
- Spring AOP AspectJ
- 存储随笔《NVMe专题》大合集
- 爱尚思维导图,爱上MindManager
- php函数—get_magic_quotes_gpc()与addslashes()
- libslog---高性能开源C/C++多线程安全日志库
- Scala版本冲突--java.lang.NoSuchMethodError:scala.collection.immutable.HashSet$.empty()Lscala/collection/
- hdu 2588 GCD【欧拉+gcd推导*经典】
- 在linux服务器下安装openoffice
- 关于著书立说
- iPhone开机密码提示你输入错误,你千万要这样做,不看后悔吧!
- 《Hive编程指南》笔记一
- django模块
- 单件模式
- js数组与字符串的相互转换方法