0

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?

Jacek Laskowski
  • 72,696
  • 27
  • 242
  • 420
AndreySarafanov
  • 804
  • 5
  • 20
  • Which Play version are you using? – lpiepiora Jul 23 '14 at 11:53
  • 1
    possible duplicate of [combining akka 2.3.x and play 2.2.x](http://stackoverflow.com/questions/22779882/combining-akka-2-3-x-and-play-2-2-x) – Mario Camou Jul 23 '14 at 11:54
  • 1
    Thanks a lot! 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. – AndreySarafanov Jul 23 '14 at 12:01
  • @AndreySarafanov Could you please add your comment as an answer and accept? It's going to give you bonus points for keeping SO clean. Thanks! – Jacek Laskowski Jul 23 '14 at 13:27
  • @JacekLaskowski I did it, thanks for the tip! Have to wait for two days to accept that answer though. – AndreySarafanov Jul 23 '14 at 14:03

1 Answers1

1

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.

AndreySarafanov
  • 804
  • 5
  • 20