java.lang.NoClassDefFoundError:sbt / compiler / IC $ Result

时间:2015-11-04 20:28:14

标签: scala sbt ebean intellij-14

希望有人能帮助我摆脱这个问题。

当我添加 addSbtPlugin(" com.typesafe.sbt"%" sbt-play-ebean"%" 1.0.0") to plugins.sbt然后我得到java.lang.NoClassDefFoundError:sbt / compiler / IC $ Result

plugins.sbt:

logLevel := Level.Warn

resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.3")

addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "1.0.0")

build.sbt:

name := "HelloWorld"

version := "1.0"

lazy val `helloworld` = (project in file(".")).enablePlugins(PlayScala)

scalaVersion := "2.11.7"

libraryDependencies ++= Seq( jdbc , cache , ws, "org.hibernate" % "hibernate-entitymanager" % "4.3.9.Final" )

unmanagedResourceDirectories in Test <+=  baseDirectory ( _ /"target/web/public/test" )  

我得到了一个例外:

  

错误:导入SBT项目时出错:... at   sbt.MainLoop $$ anonfun $ runWithNewLog $ 1.apply(MainLoop.scala:71)at at   sbt.MainLoop $$ anonfun $ runWithNewLog $ 1.apply(MainLoop.scala:66)at at   sbt.Using.apply(Using.scala:25)at   sbt.MainLoop $ .runWithNewLog(MainLoop.scala:66)at at   sbt.MainLoop $ .runAndClearLast(MainLoop.scala:49)at at   sbt.MainLoop $ .runLoggedLoop(MainLoop.scala:33)at at   sbt.MainLoop $ .runLogged(MainLoop.scala:25)at   sbt.StandardMain $ .runManaged(Main.scala:57)at   sbt.xMain.run(Main.scala:29)at   xsbt.boot.Launch $$ anonfun $ run $ 1.apply(Launch.scala:109)at at   xsbt.boot.Launch $ .withContextLoader(Launch.scala:129)at   xsbt.boot.Launch $ .run(Launch.scala:109)at   xsbt.boot.Launch $$ anonfun $ apply $ 1.apply(Launch.scala:36)at at   xsbt.boot.Launch $ .launch(Launch.scala:117)at   xsbt.boot.Launch $ .apply(Launch.scala:19)at   xsbt.boot.Boot $ .runImpl(Boot.scala:44)at   xsbt.boot.Boot $ .main(Boot.scala:20)at   xsbt.boot.Boot.main(Boot.scala)[错误]   java.lang.NoClassDefFoundError:sbt / compiler / IC $ Result [error]使用   &#39;最后&#39;完整的日志。

     

请参阅完整登录   C:\ Users \用户Username.IntelliJIdea14 \ SYSTEM \日志\ sbt.last.log

有人可以帮忙吗?

1 个答案:

答案 0 :(得分:2)

<强>解决方案: 我必须将 SBT版本更新为0.13.9 。这解决了上述问题。