应用程序从播放2.4.3迁移到2.7.0 我正在使用以下插件。
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")
我正在跟踪堆栈跟踪:
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)
答案 0 :(得分:0)
我从2.4迁移到2.6。我相信最好一步一步做。 首先,更新到2.5,然后更新到2.6和...。 Play Framework已记录了如何从一个版本迁移到下一个版本。 链接: 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
但是针对您的特定问题https://www.playframework.com/documentation/2.7.x/Migration26#Scala-Configuration-API