Search code examples
javaplayframeworksbtakkaplayframework-2.2

Why is default Play app created in IDEA crashing at startup with Akka 2.3.3 declared as dependency?


I created a new Play Framework 2 application using IntelliJ IDEA. The only things I changed in the default project were creating a Java controller Application instead of the default Scala controller (called the same) and adding Akka to the project.

Here is what my build.sbt build looks like:

import play.Project._

name := "ServerSide"

version := "1.0"

// the following line was added
libraryDependencies += "com.typesafe.akka" % "akka-actor_2.10" % "2.3.3"

playScalaSettings

The project compiles fine, but when I'm starting it, it errors with a clearly Akka-specific error (it is in fact repeated about 5 times in the log):

[ERROR] [07/23/2014 15:27:57.462] [play-akka.actor.default-dispatcher-2] [ActorSystem(play)] Uncaught error from thread [play-akka.actor.default-dispatcher-2] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled
java.lang.AbstractMethodError
    at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516)
    at akka.actor.ActorCell.invoke(ActorCell.scala:487)
    at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238)
    at akka.dispatch.Mailbox.run(Mailbox.scala:220)
    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)

Removing Akka from build.sbt fixes the problem.

What is the reason of the error and how can I fix it?


Solution

  • The answer that i came up with is:

    I copied build.sbt from a project created by activator, but the project created by Intellij Idea most likely used an earlier version of the framework, so it was uncompatible with Akka. Changing Akka version to 2.2.4 fixed my problem.