eclipse 配置scala问题-More than one scala library found in the build path
来源:互联网 发布:上海 风情 知乎 编辑:程序博客网 时间:2024/05/29 04:29
配置eclipse出错
按照这篇博客http://dongxicheng.org/framework-on-yarn/spark-eclipse-ide/安装scalaIDE插件,但是并没有成功,当引入如下spark-assembly-1.5.1-hadoop2.6.0.jar(对应我自己的spark下的jar包)会报错,提示这个jar包与源环境中的jar包冲突(提示scala环境冲突)—-未解决!!!!
错误提示如下: Description Resource Path Location Type
More than one scala library found in the build path (/home/hadoop/eclipse/plugins/org.scala-lang.scala-library_2.11.7.v20150622-112736-1fbce4612c.jar, /usr/local/spark/spark-1.5.1-bin-hadoop2.6/lib/spark-assembly-1.5.1-hadoop2.6.0.jar).At least one has an incompatible version. Please update the project build path so it contains only one compatible scala library. hello-test Unknown Scala Classpath Problem
配置eclipse出错解决
山重水复疑无路,柳暗花明又一村!经过大量的验证。。。终于make it。
参考博客:http://blog.csdn.net/wankunde/article/details/41843217
其中四个步骤:
Scala 工程版本
该方法和Java 工程类似。
新建scala工程
1.在工程中移除自带的scala版本库
1.添加spark 库spark-assembly-1.1.0-cdh5.2.0-hadoop2.5.0-cdh5.2.0.jar
3.修改工程中的scala编译版本
4.右击 –> Scala –> set the Scala Installation
也可以
右击工程–> Properties –> Scala Compiler –> Use project Setting 中选择spark对应的scala版本,此处选择Lastest2.10 bundle
编写scala代码
export jar 包
对于第一个步骤没什么用或者自己没找到怎么去移除;对于第四部选择scala版本这个还是解决问题的最终的方法,选择Scala library container->Classpath Container中选择Fixed..2.10.5;the error就解决了
最后又发现真正的问题是我自己spark文件夹下的jar包scala是2.10.4而下的eclipse ide是2.17.0所以上面的解决办法才奏效。
安装sbt出错
按照sbt官网教程安装sbt,链接http://www.scala-sbt.org/0.13/tutorial/zh-cn/Installing-sbt-on-Linux.html,安装完毕后,以为一切都OK了,但是出现
- 1
- 2
- 3
- 4
又是不成功。。。去查找资料看到说法是:网速,DNS设置!!
stackflow上有个答案说是在.bashrc中添加:
- 1
然而,试了下仍无效,然而在之前在ubuntu下配置是正确的。可能也可系统有关。。。
哎,两个问题都没有得到解决。。。
The road is too long for me!!!
解决
第一个eclipse问题是插件与自己spark中的scala版本不对,spark中对应的是2.10.5,这个具体怎么看出来的,可以在eclipse中先删除scala container然后添加spark 中的jar,提示错误信息就会看到了。。。
第二个问题:竟然是网速(或者是网络dns设置)问题!!!回来再高能所这边虽然下了一会但还是make it!
目前sbt的安装需要联网,离线好像不能安装,因为在第一次sbt -version时它要初始化并会自动联网下载好多jar包。
总的来说,还算是把问题解决了,虽然进度有点慢,也有点不顺各种问题,但还算有点结果。继续 go on!
明天把spark应用程序编译,跑通。scala语言学习!
- eclipse 配置scala问题-More than one scala library found in the build path
- eclipse 配置scala问题-More than one scala library found in the build path
- eclipse 配置scala问题-More than one scala library found in the build path
- Spark问题之More than one scala library found in the build path
- AIR A file found in a source-path can not have more than one externally visiable
- More than one file was found with OS independent path
- More than one row with the given identifier was found 问题
- more than one row with the given identifier was found
- ASP.Net MVC Entity Framework Error – More than one context type was found in the assembly ‘ProjectNa
- android异常 More than one file was found with OS independent path 'META-INF/XXX'
- More than one file was found with OS independent path 'META-INF/DEPENDENCIES'
- More than one file was found with OS independent path 'assets/ap1.data'
- HibernateException:More than one row with the given identifier was found: 1, for class....
- Hibernate:More than one row with the given identifier was found解决办法
- Hibernate 级联查询: More than one row with the given identifier was found 报错
- org.hibernate.HibernateException: More than one row with the given identifier was found: 116, for cl
- appears more than once in the keychain The codesign tool requires there only be one
- Eclipse reports rendering library more recent than ADT plug-in.Please update ADT plug-in
- 滴滴优步合并尚存变数 政策监管或成主要障碍
- 腾讯“互联网+警务”强化打击力量,“麒麟”将助力反诈骗最后一公里
- 飞利浦的健康之路:比我们以为的要早一些
- 【实战】6-2 分类管理开发
- Uber CEO确认Uber中国与滴滴出行合并,从传言到证实全程回顾
- eclipse 配置scala问题-More than one scala library found in the build path
- 关于Petalinux自启问题
- 游戏分发这块大蛋糕,阿里的切法为何“似曾相识”
- 均衡器设计
- vivo X7Plus 凭什么成为年轻爱美的时尚白领首选
- 5700万美金切入内容分发,猎豹的意图何在?
- cocoapods新版本用法
- Javaweb-xml基础2(学习笔记)
- import导入基本