2016-11-09 37 views
2

Framework版本: 1.4.3
平臺:Java的1.8.0_74,Ubuntu的16.04,64位播放1.4.3 - UnexpectedException:在應用類play.classloading.enhancers.LocalvariablesNamesEnhancer

詳細信息:
嘗試將播放版本從1.2.7升級到1.4.3。必須升級1.4.3的一些模塊/庫。

開始通過遊戲運行的應用程序,從而導致以下情況除外:

@722hc68nl 
Error during the 500 response generation 

Oops: UnexpectedException 
Unexpected error : While applying [email protected] on controllers.Application, caused by exception UnexpectedException: While applying class play.classloading.enhancers.LocalvariablesNamesEnhancer on controllers.Application 

play.exceptions.UnexpectedException: While applying [email protected] on controllers.Application 
    at play.plugins.PluginCollection.enhance(PluginCollection.java:656) 
    at play.classloading.ApplicationClasses$ApplicationClass.enhance(ApplicationClasses.java:242) 
    at play.classloading.ApplicationClassloader.loadApplicationClass(ApplicationClassloader.java:165) 
    at play.classloading.ApplicationClassloader.loadClass(ApplicationClassloader.java:83) 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357) 
    at java.lang.ClassLoader.defineClass1(Native Method) 
    at java.lang.ClassLoader.defineClass(ClassLoader.java:760) 
    at play.classloading.ApplicationClassloader.loadApplicationClass(ApplicationClassloader.java:166) 
    at play.classloading.ApplicationClassloader.getAllClasses(ApplicationClassloader.java:425) 
    at play.classloading.ApplicationClassloader.getAssignableClasses(ApplicationClassloader.java:466) 
    at play.templates.GroovyTemplateCompiler.endTag(GroovyTemplateCompiler.java:363) 
    at play.templates.TemplateCompiler.generate(TemplateCompiler.java:93) 
    at play.templates.TemplateCompiler.compile(TemplateCompiler.java:15) 
    at play.templates.GroovyTemplateCompiler.compile(GroovyTemplateCompiler.java:40) 
    at play.templates.TemplateCompiler.compile(TemplateCompiler.java:28) 
    at play.templates.TemplateLoader.load(TemplateLoader.java:81) 
    at play.templates.TemplateLoader.load(TemplateLoader.java:176) 
    at play.server.PlayHandler.serve500(PlayHandler.java:836) 
    at Invocation.HTTP Request(Play!) 
Caused by: play.exceptions.UnexpectedException: While applying class play.classloading.enhancers.LocalvariablesNamesEnhancer on controllers.Application 
    at play.CorePlugin.enhance(CorePlugin.java:311) 
    at play.plugins.PluginCollection.enhance(PluginCollection.java:651) 
    ... 18 more 
Caused by: javassist.CannotCompileException: by javassist.bytecode.BadBytecode: renderDelegate()V in controllers.Application: conflict: *top* and java.lang.Object 
    at javassist.CtBehavior.insertBefore(CtBehavior.java:777) 
    at javassist.CtBehavior.insertBefore(CtBehavior.java:734) 
    at play.classloading.enhancers.LocalvariablesNamesEnhancer.enhanceThisClass(LocalvariablesNamesEnhancer.java:251) 
    at play.CorePlugin.enhance(CorePlugin.java:306) 
    ... 19 more 
Caused by: javassist.bytecode.BadBytecode: renderDelegate()V in controllers.Application: conflict: *top* and java.lang.Object 
    at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:111) 
    at javassist.bytecode.MethodInfo.rebuildStackMap(MethodInfo.java:456) 
    at javassist.bytecode.MethodInfo.rebuildStackMapIf6(MethodInfo.java:438) 
    at javassist.CtBehavior.insertBefore(CtBehavior.java:768) 
    ... 22 more 
Caused by: javassist.bytecode.BadBytecode: conflict: *top* and java.lang.Object 
    at javassist.bytecode.stackmap.TypeData$BasicType.setType(TypeData.java:156) 
    at javassist.bytecode.stackmap.Tracer.checkParamTypes(Tracer.java:930) 
    at javassist.bytecode.stackmap.Tracer.doInvokeMethod(Tracer.java:801) 
    at javassist.bytecode.stackmap.Tracer.doOpcode148_201(Tracer.java:595) 
    at javassist.bytecode.stackmap.Tracer.doOpcode(Tracer.java:81) 
    at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:187) 
    at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:199) 
    at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:199) 
    at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:199) 
    at javassist.bytecode.stackmap.MapMaker.traceException(MapMaker.java:221) 
    at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:182) 
    at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:199) 
    at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:164) 
    at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:108) 
    ... 25 more 
+0

同樣的事情發生在我身上。還沒有找到解決方案。你是否? – HelpMeStackOverflowMyOnlyHope

+0

問題似乎與javassist jar有關。我已經嘗試了兩種解決方案,我將它們視爲答案。請檢查。 –

回答

1

這個問題似乎Javassist進行罐子是相關的。

解決方案 - 1:
解決方案中發揮問題清單建議是排除在dependencies.yml了Javassist罐子。

require: 
    - play: exclude: 
     - org.javassist -> javassist * 

鏈接:Issue# 1434

然而,這並沒有解決我的情況的問題。

解決方案2:(更多工作的周圍
一個論壇的建議這個問題與該方法的代碼長度(在我的情況renderDelegate())。我重構了減少行數的方法。這解決了我的問題。