Play framework:UnexpectedException:在应用类play.classloading.enhancers.LVEnhancer时

时间:2016-07-14 18:03:43

标签: java playframework ubuntu-14.04

我在Ubuntu 14上第一次使用Play框架和现有项目。当我尝试运行该应用程序时,出现以下错误:

Internal Server Error (500) for request GET /

Oops: UnexpectedException
Unexpected error : While applying play.CorePlugin@44821a96 on models.BookingDTO, caused by exception UnexpectedException: While applying class play.classloading.enhancers.LVEnhancer on models.BookingDTO

play.exceptions.UnexpectedException: While applying play.CorePlugin@44821a96 on models.BookingDTO
   at play.plugins.PluginCollection.enhance(PluginCollection.java:582)
   at play.classloading.ApplicationClasses$ApplicationClass.enhance(ApplicationClasses.java:242)
   at play.classloading.ApplicationClassloader.loadApplicationClass(ApplicationClassloader.java:164)
   at play.classloading.ApplicationClassloader.getAllClasses(ApplicationClassloader.java:431)
   at play.Play.start(Play.java:527)
   at play.Play.detectChanges(Play.java:647)
   at play.Invoker$Invocation.init(Invoker.java:205)
   at Invocation.HTTP Request(Play!)
Caused by: play.exceptions.UnexpectedException: While applying class play.classloading.enhancers.LVEnhancer on models.BookingDTO
   at play.CorePlugin.enhance(CorePlugin.java:314)
   at play.plugins.PluginCollection.enhance(PluginCollection.java:577)
   ... 7 more
Caused by: play.exceptions.UnexpectedException: LVEnhancer: cannot enhance the behavior 'models.BookingDTO.findAllNextBookings(java.lang.String)'
   at play.classloading.enhancers.LVEnhancer.enhanceThisClass(LVEnhancer.java:112)
   at play.CorePlugin.enhance(CorePlugin.java:309)
   ... 8 more
Caused by: java.lang.NullPointerException
   at bytecodeparser.CodeParser.parse(CodeParser.java:53)
   at bytecodeparser.analysis.stack.StackAnalyzer.init(StackAnalyzer.java:91)

出了什么问题?

1 个答案:

答案 0 :(得分:0)

非常感谢您的回答。

我找到了解决方案:我没有与项目文件不匹配的 javassist 版本。

使用 Playframework 1.3 ,javassist-3.20xxx无效。我必须安装 javassist-3.19xxx