知道为什么在将 Akka 添加到我的库依赖项并执行test
任务后会出现以下错误吗?
Uncaught error from thread [reactivemongo-akka.actor.default-dispatcher-4] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[reactivemongo]
akka.actor.ActorCell.create(ActorCell.scala:580)
at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:456)
at akka.actor.ActorCell.systemInvoke(ActorCell.scala:478)
at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:263)
at akka.dispatch.Mailbox.run(Mailbox.scala:219)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Exception in thread "Thread-4" java.io.EOFException
at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2596)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1316)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at sbt.React.react(ForkTests.scala:116)
at sbt.ForkTests$$anonfun$mainTestTask$1$Acceptor$2$.run(ForkTests.scala:75)
at java.lang.Thread.run(Thread.java:724)
当我执行run
任务时:
Uncaught error from thread [reactivemongo-akka.actor.default-dispatcher-2] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[reactivemongo]
java.lang.AbstractMethodError
at akka.actor.ActorCell.create(ActorCell.scala:580)
at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:456)
at akka.actor.ActorCell.systemInvoke(ActorCell.scala:478)
at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:263)
at akka.dispatch.Mailbox.run(Mailbox.scala:219)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
[ERROR] [03/25/2014 15:28:17.309] [reactivemongo-akka.actor.default-dispatcher-2] [ActorSystem(reactivemongo)] Uncaught error from thread [reactivemongo-akka.actor.default-dispatcher-2] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled
java.lang.AbstractMethodError
at akka.actor.ActorCell.create(ActorCell.scala:580)
at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:456)
at akka.actor.ActorCell.systemInvoke(ActorCell.scala:478)
at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:263)
at akka.dispatch.Mailbox.run(Mailbox.scala:219)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
我的相关build.sbt
设置
scalaVersion := "2.10.3"
// Dependencies
resolvers ++= Seq(
"Sonatype Releases" at "http://oss.sonatype.org/content/repositories/releases",
"Krasser's Bintray" at "http://dl.bintray.com/krasserm/maven"
)
libraryDependencies ++= Seq(
// akka
"com.typesafe.akka" %% "akka-actor" % "2.3.0",
"com.typesafe.akka" %% "akka-persistence-experimental" % "2.3.0",
"com.github.krasserm" % "akka-persistence-cassandra_2.10" % "0.2",
// dependency injection
"com.google.inject" % "guice" % "3.0",
"net.codingwell" % "scala-guice_2.10" % "4.0.0-beta",
"javax.inject" % "javax.inject" % "1",
// mongo
"org.reactivemongo" %% "reactivemongo" % "0.10.0",
"org.reactivemongo" %% "play2-reactivemongo" % "0.10.2",
// slick
"com.h2database" % "h2" % "1.3.166",
"com.typesafe" % "config" % "1.0.0",
"com.typesafe.slick" %% "slick" % "1.0.1",
// testing
"org.mockito" % "mockito-core" % "1.9.5" % "test",
"org.specs2" %% "specs2" % "2.3.8" % "test",
"org.scalacheck" %% "scalacheck" % "1.11.3" % "test"
)
// App settings
play.Project.playScalaSettings
和我的project/plugin.sbt
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.1")
这是在我添加了带有以下库的 akka-persistence 插件之后开始的:
"com.typesafe.akka" %% "akka-actor" % "2.3.0",
"com.typesafe.akka" %% "akka-persistence-experimental" % "2.3.0",
"com.github.krasserm" % "akka-persistence-cassandra_2.10" % "0.2"
我安装了 Cassandra,并在执行此操作时在本地运行它。
即使我注释掉这些行中的任何一行并运行sbt clean
, sbt update
,sbt test
我仍然会看到此错误。只有当我将它们全部注释掉时,我才能运行和测试我的应用程序。
我唯一的猜测是持久化库中的Akka版本和Play2不兼容。
听起来对吗?