I am trying to build play2.6 scala version using maven. play2-maven-plugin
It is compiling properly but I can’t run the application. the server seems to be up
[debug] a.i.TcpListener - Successfully bound to /0:0:0:0:0:0:0:0:9000
[info] p.c.s.AkkaHttpServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
ncaught error from thread [application-akka.actor.default-dispatcher-4]: play.core.server.AkkaHttpServer$$anon$3.reloadDebugInfo(Lscala/util/Try;Lplay/core/server/ServerProvider;)Lscala/Option;, shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[application]
java.lang.NoSuchMethodError: play.core.server.AkkaHttpServer$$anon$3.reloadDebugInfo(Lscala/util/Try;Lplay/core/server/ServerProvider;)Lscala/Option;
at play.core.server.AkkaHttpServer$$anon$3.reloadValue(AkkaHttpServer.scala:211)
at play.core.server.AkkaHttpServer$$anon$3.reloadValue(AkkaHttpServer.scala:199)
at play.core.server.common.ReloadCache.$anonfun$reloadCache$1(ReloadCache.scala:25)
at play.utils.InlineCache.fresh(InlineCache.scala:69)
at play.utils.InlineCache.apply(InlineCache.scala:55)
at play.core.server.common.ReloadCache.cachedFrom(ReloadCache.scala:31)
I’m getting the above error.
the same application is working fine if I am building using sbt.
Any Ideas why?
This looks like a jar dependency conflict. From the stack, it means that there are two jars that include the method play.core.server.AkkaHttpServer$$anon$3.reloadDebugInfo with different signatures, and your build tool happens to choose the JAR with the method’s signature that you don’t want and evict the jar that you want.
Here are the steps I usually do to resolve the issue:
Identify which jar contains play.core.server.AkkaHttpServer$$anon$3.reloadDebugInfo.
Try to get all the jar to be on the same version (or a set of versions that are, at least, compatible with each other) by changing the versions of your direct dependencies.
the same application is working fine if I am building using sbt.
It could be that sbt happens to choose the jar that has the method’s signature that you want.