Activator UI,java.lang.NoClassDefFoundError:

时间:2014-10-10 17:06:08

标签: scala intellij-idea typesafe-activator

我尝试使用Activator UI在intellij中创建基本scala项目 我将项目导入到ide并且编译得很好

但是当我试图运行简单的代码时,

Exception in thread "main" java.lang.NoClassDefFoundError: scala/collection/GenTraversableOnce$class
at akka.util.Collections$EmptyImmutableSeq$.<init>(Collections.scala:15)
at akka.util.Collections$EmptyImmutableSeq$.<clinit>(Collections.scala)
at akka.japi.Util$.immutableSeq(JavaAPI.scala:209)
at akka.actor.ActorSystem$Settings.<init>(ActorSystem.scala:150)
at akka.actor.ActorSystemImpl.<init>(ActorSystem.scala:470)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:111)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:104)
at reactivemongo.api.MongoDriver$.reactivemongo$api$MongoDriver$$defaultSystem(api.scala:378)
at reactivemongo.api.MongoDriver$$anonfun$3.apply(api.scala:305)
at reactivemongo.api.MongoDriver$$anonfun$3.apply(api.scala:305)
at scala.Option.getOrElse(Option.scala:120)
at reactivemongo.api.MongoDriver.<init>(api.scala:305)
at example.App$.main(App.scala:10)
at example.App.main(App.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

项目加载时,项目结构中存在错误 sbt:scala 2.11.2未使用

激活器ui intellij项目生成出了什么问题?

谢谢

三木

1 个答案:

答案 0 :(得分:0)

我试图运行火花时遇到过这种情况。这是用于编译依赖项的scala版本与用于运行项目的scala版本之间的不兼容错误。

删除我的scala版本规范是解决问题的一种黑客方法:

// build.sbt
name := "SparkTest"

version := "1.0"

scalaVersion := "2.11.4" <-- remove this

libraryDependencies += "org.apache.spark" % "spark-core_2.10" % "1.3.0"