Hi here,
After upgrading Lagom up to 1.4.1. my services tests start failing with exception:
[info] The UserService
Uncaught error from thread [application-akka.actor.default-dispatcher-2]: play.core.server.Server$.getHandlerFor(Lplay/api/mvc/RequestHeader;Lplay/core/ApplicationProvider;)Lscala/util/Either;, shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[application]
java.lang.NoSuchMethodError: play.core.server.Server$.getHandlerFor(Lplay/api/mvc/RequestHeader;Lplay/core/ApplicationProvider;)Lscala/util/Either;
at play.core.server.AkkaHttpServer.getHandler(AkkaHttpServer.scala:217)
at play.core.server.AkkaHttpServer.handleRequest(AkkaHttpServer.scala:195)
at play.core.server.AkkaHttpServer.$anonfun$createServerBinding$1(AkkaHttpServer.scala:106)
at akka.stream.impl.fusing.MapAsync$$anon$25.onPush(Ops.scala:1194)
at akka.stream.impl.fusing.GraphInterpreter.processPush(GraphInterpreter.scala:519)
at akka.stream.impl.fusing.GraphInterpreter.processEvent(GraphInterpreter.scala:482)
at akka.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:378)
at akka.stream.impl.fusing.GraphInterpreterShell.runBatch(ActorGraphInterpreter.scala:585)
at akka.stream.impl.fusing.GraphInterpreterShell$AsyncInput.execute(ActorGraphInterpreter.scala:469)
at akka.stream.impl.fusing.GraphInterpreterShell.processEvent(ActorGraphInterpreter.scala:560)
at akka.stream.impl.fusing.ActorGraphInterpreter.akka$stream$impl$fusing$ActorGraphInterpreter$$processEvent(ActorGraphInterpreter.scala:742)
at akka.stream.impl.fusing.ActorGraphInterpreter$$anonfun$receive$1.applyOrElse(ActorGraphInterpreter.scala:757)
at akka.actor.Actor.aroundReceive(Actor.scala:517)
at akka.actor.Actor.aroundReceive$(Actor.scala:515)
at akka.stream.impl.fusing.ActorGraphInterpreter.aroundReceive(ActorGraphInterpreter.scala:667)
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:590)
at akka.actor.ActorCell.invoke(ActorCell.scala:559)
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
at akka.dispatch.Mailbox.run(Mailbox.scala:224)
at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Exception in thread "Thread-57" java.io.EOFException
at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2608)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1319)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
at org.scalatest.tools.Framework$ScalaTestRunner$Skeleton$1$React.react(Framework.scala:818)
at org.scalatest.tools.Framework$ScalaTestRunner$Skeleton$1.run(Framework.scala:807)
at java.lang.Thread.run(Thread.java:745)
In the tests I create the server as described in docs:
private lazy val server = ServiceTest.startServer(
ServiceTest.defaultSetup.withCassandra(true)
) { ctx =>
new UserApplication(ctx) with LocalServiceLocator with TestTopicComponents {
override def additionalConfiguration: AdditionalConfiguration =
super.additionalConfiguration ++ Configuration.from(Map(
"cassandra-query-journal.eventual-consistency-delay" -> "0"
))
}
}
private lazy val client = server.serviceClient.implement[UserService]
and use it like:
client.create.handleRequestHeader(authenticate(userId)).invoke(user).map { response => ... }
It worked well with lagom 1.4.0. Please help me figure out with it.