Issue in Migration Playframework 2.4.3 to 2.7.0

Application migration from play 2.4.3 to 2.7.0 I'm using following Plugins.

scalaVersion := "2.11.6"
sbt.version=1.2.7
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.7.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "4.1.0")

I'm getting following stacktrace:

java.lang.ArrayIndexOutOfBoundsException and Caused by: java.lang.ClassNotFoundException: play.Configuration
 [error]  Exception when compiling 1137 sources to /home/Documents/Codebase/target/scala-2.11/classes
[error] 65791
[error] scala.tools.asm.ClassWriter.findItemByIndex(ClassWriter.java:1755)
[error] scala.tools.asm.MethodWriter.getSize(MethodWriter.java:2045)
[error] scala.tools.asm.ClassWriter.toByteArray(ClassWriter.java:827)
[error] scala.tools.nsc.backend.jvm.GenASM$JBuilder.writeIfNotTooBig(GenASM.scala:529)
[error] scala.tools.nsc.backend.jvm.GenASM$JPlainBuilder.genClass(GenASM.scala:1343)  ...     
[error] java.lang.NoClassDefFoundError: play/Configuration
[error]     at play.db.ebean.ModelsConfigLoader.apply(ModelsConfigLoader.java:27)
[error]     at play.db.ebean.ModelsConfigLoader.apply(ModelsConfigLoader.java:21)
[error]     at play.ebean.sbt.PlayEbean$.$anonfun$configuredEbeanModels$4(PlayEbean.scala:153)
[error]     at play.ebean.sbt.PlayEbean$.withClassLoader$1(PlayEbean.scala:130)...
[error] Caused by: java.lang.ClassNotFoundException: play.Configuration
[error]     at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
[error]     at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[error]     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[error]     at play.db.ebean.ModelsConfigLoader.apply(ModelsConfigLoader.java:27)
[error]     at play.db.ebean.ModelsConfigLoader.apply(ModelsConfigLoader.java:21)
[error]     at play.ebean.sbt.PlayEbean$.$anonfun$configuredEbeanModels$4(PlayEbean.scala:153)...
[error] java.lang.ArrayIndexOutOfBoundsException: 65791
[error]     at scala.tools.asm.ClassWriter.findItemByIndex(ClassWriter.java:1755)
[error]     at scala.tools.asm.MethodWriter.getSize(MethodWriter.java:2045)
[error]     at scala.tools.asm.ClassWriter.toByteArray(ClassWriter.java:827)
[error]     at scala.tools.nsc.backend.jvm.GenASM$JBuilder.writeIfNotTooBig(GenASM.scala:529)
[error] a.a.ActorSystemImpl - Internal server error, sending 500 response
akka.http.impl.util.One2OneBidiFlow$OutputTruncationException: Inner flow was completed without producing result elements for 1 outstanding elements
    at akka.http.impl.util.One2OneBidiFlow$OutputTruncationException$.apply(One2OneBidiFlow.scala:22)
    at akka.http.impl.util.One2OneBidiFlow$OutputTruncationException$.apply(One2OneBidiFlow.scala:22)
    at akka.http.impl.util.One2OneBidiFlow$One2OneBidi$$anon$1$$anon$4.onUpstreamFinish(One2OneBidiFlow.scala:97)
    at akka.stream.impl.fusing.GraphInterpreter.processEvent(GraphInterpreter.scala:504)
    at akka.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:378)
    at akka.stream.impl.fusing.GraphInterpreterShell.runBatch(ActorGraphInterpreter.scala:588)
    at akka.stream.impl.fusing.GraphInterpreterShell$AsyncInput.execute(ActorGraphInterpreter.scala:472)
    at akka.stream.impl.fusing.GraphInterpreterShell.processEvent(ActorGraphInterpreter.scala:563)
    at akka.stream.impl.fusing.ActorGraphInterpreter.akka$stream$impl$fusing$ActorGraphInterpreter$$processEvent(ActorGraphInterpreter.scala:745)
    at akka.stream.impl.fusing.ActorGraphInterpreter$$anonfun$receive$1.applyOrElse(ActorGraphInterpreter.scala:760)

Upvotes: 1

Views: 881

Answers (1)

Roman Kazanovskyi
Roman Kazanovskyi

Reputation: 3599

I did migration from 2.4 to 2.6. I am sure that better for you do step by step. First, update to 2.5 and then to 2.6 and ... . Play Framework has documented how to migrate from one version to the next one. Links: https://www.playframework.com/documentation/2.7.x/Migration25 https://www.playframework.com/documentation/2.7.x/Migration26 https://www.playframework.com/documentation/2.7.x/Migration27

But for your specific problem https://www.playframework.com/documentation/2.7.x/Migration26#Scala-Configuration-API

Upvotes: 1

Related Questions