我正在从Play Framework 2.2迁移到2.3.8,我已经遇到了一些错误,但还是要继续寻找更多错误。新的没有提供太多提示。我收到这个错误:
play.api.UnexpectedException: Unexpected exception[NoClassDefFoundError: play/api/mvc/SimpleResult]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(ApplicationProvider.scala:170) ~[play_2.10-2.3.8.jar:2.3.8]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(ApplicationProvider.scala:130) ~[play_2.10-2.3.8.jar:2.3.8]
at scala.Option.map(Option.scala:145) ~[scala-library.jar:na]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1.apply(ApplicationProvider.scala:130) ~[play_2.10-2.3.8.jar:2.3.8]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1.apply(ApplicationProvider.scala:128) ~[play_2.10-2.3.8.jar:2.3.8]
Caused by: java.lang.NoClassDefFoundError: play/api/mvc/SimpleResult
at java.lang.Class.getDeclaredMethods0(Native Method) ~[na:1.7.0_75]
at java.lang.Class.privateGetDeclaredMethods(Unknown Source) ~[na:1.7.0_75]
at java.lang.Class.getDeclaredMethods(Unknown Source) ~[na:1.7.0_75]
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:571) ~[spring-core-4.1.1.RELEASE.jar:4.1.1.RELEASE]
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:490) ~[spring-core-4.1.1.RELEASE.jar:4.1.1.RELEASE]
Caused by: java.lang.ClassNotFoundException: play.api.mvc.SimpleResult
at java.net.URLClassLoader$1.run(Unknown Source) ~[na:1.7.0_75]
at java.net.URLClassLoader$1.run(Unknown Source) ~[na:1.7.0_75]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0_75]
at java.net.URLClassLoader.findClass(Unknown Source) ~[na:1.7.0_75]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.7.0_75]
我已使用迁移指南中所述的SimpleResult
删除了对Result
的所有引用。我认为我的一个插件中有一些东西可能引用它。我正在使用这些插件:
javaCore,
javaJdbc,
javaEbean,
filters,
cache,
javaWs,
"org.drools" % "drools-core" % "5.5.0.Final",
"org.drools" % "drools-compiler" % "5.5.0.Final",
"org.jbpm" % "jbpm-bpmn2" % "5.4.0.Final",
"org.jbpm" % "jbpm-flow" % "5.4.0.Final",
"org.drools" % "drools-persistence-jpa" % "5.5.0.Final",
"org.jbpm" % "jbpm-persistence-jpa" % "5.4.0.Final",
"org.jbpm" % "jbpm-workitems" % "5.4.0.Final",
"org.hibernate" % "hibernate-core" % "4.3.0.Final",
"org.hibernate" % "hibernate-entitymanager" % "4.3.0.Final",
"org.springframework" % "spring-orm" % "4.1.1.RELEASE",
"org.springframework" % "spring-expression" % "4.1.1.RELEASE",
"org.springframework" % "spring-aop" % "4.1.1.RELEASE",
"org.springframework" % "spring-web" % "4.1.1.RELEASE",
"org.drools" % "drools-spring" % "5.5.0.Final",
"org.apache.httpcomponents" % "httpclient" % "4.2.1", //can we use 4.0.1
"org.apache.httpcomponents" % "httpcore" % "4.2", //can we use 4.0.1
"com.github.detro.ghostdriver" % "phantomjsdriver" % "1.0.4" % "test",
"com.typesafe.play" %% "play-mailer" % "2.4.0",
"org.apache.ws.xmlschema" % "xmlschema-core" % "2.1.0",
"org.springframework" % "spring-context" % "4.1.1.RELEASE",
"org.apache.cxf" % "cxf-api" % "2.7.10",
"org.apache.cxf" % "cxf-rt-core" % "2.7.10",
"org.apache.cxf" % "cxf-rt-frontend-jaxws" % "2.7.10",
"com.mohiva" % "play-html-compressor_2.10" % "0.3.1"
我不知道这是不是我的插件,这只是猜测。如果是,是否有办法找出哪一个引用它?
感谢。
答案 0 :(得分:0)
我发现一些我依赖的库是失败的,因为它们依赖于Play 2.2。请务必注意您放入lib文件夹的JAR!将这些依赖项更改为通过托管源检索的更新版本可修复问题并删除不必要的JAR