5

I'm updating my Play! scala application from 2.4 to 2.5.10 and I'm getting this runtime exception:

java.lang.NoSuchMethodError: akka.actor.LocalActorRefProvider.log()Lakka/event/LoggingAdapter;

The build.sbt part about Akka did not change and is as following (with akkaVersion 2.4.14):

"com.typesafe.akka" %% "akka-distributed-data-experimental" % akkaVersion,
"com.typesafe.akka" %% "akka-cluster" % akkaVersion,
"com.typesafe.akka" %% "akka-contrib" % akkaVersion,
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion)

If I disable the conf (i.e. akka.actor.provider = "akka.cluster.ClusterActorRefProvider") part about clusterActorRefProvider I just get this error:

needs to have a 'ClusterActorRefProvider' enabled in the configuration, currently uses [akka.actor.LocalActorRefProvider]

The stack trace does not help me a lot because it does not reference any file of my application. Here is the beginning:

1) Error injecting method, java.lang.NoSuchMethodError: akka.actor.LocalActorRefProvider.log()Lakka/event/LoggingAdapter; at com.google.inject.util.Providers$GuicifiedProviderWithDependencies.initialize(Providers.java:149) at play.api.libs.concurrent.AkkaGuiceSupport$class.bindActor(Akka.scala:139) (via modules: com.google.inject.util.Modules$OverrideModule -> Modules) Caused by: java.lang.NoSuchMethodError: akka.actor.LocalActorRefProvider.log()Lakka/event/LoggingAdapter; at akka.remote.RemoteActorRefProvider.<init>(RemoteActorRefProvider.scala:132)

I have no idea of where I have to find the cause of the problem...

Edit: just changing the version of Play! from 2.5.10 to 2.5.9 makes the exception disappear.

Simon
  • 6,025
  • 7
  • 46
  • 98
  • You are probably pulling Akka as dependency in another version than the one used by Play. Check your dependencies, including transitively. – cchantep Nov 30 '16 at 09:34
  • 1
    Check your Akka version. I had the same issue earlier. Moved from 2.4.4 -> 2.4.14 solved the problem. –  Nov 30 '16 at 19:11
  • 1
    You two are right, thanks. @kecue if you post your comment as an answer I'll accept it. – Simon Dec 01 '16 at 14:01

1 Answers1

6

Check your Akka version. I had the same issue earlier. I Moved from 2.4.4 -> 2.4.14 solved the problem.

for further reading the source can be found here