Pre*_*ist 3 sql scala apache-spark
我有简单的scala应用程序与spark依赖.我只是尝试使用以下代码创建spark上下文.
def main(args: Array[String]) {
var sparkConfig : SparkConf = new SparkConf() ;
sparkConfig.setAppName("ProxySQL").setMaster("local");
var sc = new SparkContext(sparkConfig)
}
Run Code Online (Sandbox Code Playgroud)
当我尝试在main中运行此代码时 - 它会在新的SparkContext(sparkConfig)中抛出安全性执行,并显示以下消息.
Exception in thread "main" java.lang.SecurityException: class "javax.servlet.ServletRegistration"'s signer information does not match signer information of other classes in the same package .
Run Code Online (Sandbox Code Playgroud)
在Eclipse的问题选项卡中,它显示一个警告描述路径资源位置类型
More than one scala library found in the build path (D:/workspaces/scala/scalaEclipse/eclipse/plugins/org.scala-ide.scala210.jars_4.0.0.201503031935/target/jars/scala-library.jar, C:/Users/prems.bist/.m2/repository/org/scala-lang/scala-library/2.10.4/scala-library-2.10.4.jar).This is not an optimal configuration, try to limit to one Scala library in the build path. SQLWrapper Unknown Scala Classpath Problem
Run Code Online (Sandbox Code Playgroud)
我在windows机器上安装了2.10.4的scala.在eclipse中设置的Scala编译器版本是2.10.5.导致此安全例外的原因是什么?这是不兼容的版本问题还是其他什么?我该如何解决?
Pre*_*ist 11
问题或多或少与冲突的依赖关系有关.
以下任务解决了我的问题.
去项目
构建路径 - >订单和导出选项卡 - >将javax.servlet jar的顺序更改为bottom或top.
这解决了这个问题.
| 归档时间: |
|
| 查看次数: |
5532 次 |
| 最近记录: |