过去几天我一直在运行我的游戏框架,并决定尝试 Debug模式。我只是运行 play eclipsify 并刷新我的 java 项目,然后右键单击 playtmp.launch 并运行为,然后“将 JPDA 连接到我的启动”并调试为并连接调试器(尽管我必须在 playtmp 中将挂起调整为“y”) .启动告诉)。
注意:每次启动时,我都会收到“项目中存在错误”,但“问题”选项卡中没有错误???
sooo,然后我进入了第一页,我得到了以下异常:( :( (上次我遇到这个问题是因为我把 play jar 放在 lib 文件夹中,这样我的 eclipse 就能编译,但我已经将它移出了那里,并且它可以与 play.bat 一起运行)
06:24:49,376 INFO ~ Listening for HTTP on port 9000 (Waiting a first request to start) ...
06:26:09,738 ERROR ~
@69ageogm6
Internal Server Error (500) for request GET /register
Oops: UnexpectedException
An unexpected error occured caused by exception UnexpectedException: While applying class play.classloading.enhancers.LocalvariablesNamesEnhancer on controllers.Admin
play.exceptions.UnexpectedException: While applying play.CorePlugin@48ff2413 on controllers.Admin
at play.plugins.PluginCollection.enhance(PluginCollection.java:511)
at play.classloading.ApplicationClasses$ApplicationClass.enhance(ApplicationClasses.java:235)
at play.classloading.ApplicationClassloader.loadApplicationClass(ApplicationClassloader.java:165)
at play.classloading.ApplicationClassloader.getAllClasses(ApplicationClassloader.java:429)
at play.Play.start(Play.java:505)
at play.Play.detectChanges(Play.java:618)
at play.Invoker$Invocation.init(Invoker.java:198)
at Invocation.HTTP Request(Play!)
Caused by: play.exceptions.UnexpectedException: While applying class play.classloading.enhancers.LocalvariablesNamesEnhancer on controllers.Admin
at play.CorePlugin.enhance(CorePlugin.java:302)
at play.plugins.PluginCollection.enhance(PluginCollection.java:506)
... 7 more
Caused by: javassist.bytecode.DuplicateMemberException: duplicate field: $home0
at javassist.bytecode.ClassFile.testExistingField(ClassFile.java:529)
at javassist.bytecode.ClassFile.addField(ClassFile.java:515)
at javassist.CtClassType.addField(CtClassType.java:1164)
at javassist.CtClass.addField(CtClass.java:878)
at play.classloading.enhancers.LocalvariablesNamesEnhancer.enhanceThisClass(LocalvariablesNamesEnhancer.java:180)
at play.CorePlugin.enhance(CorePlugin.java:297)
... 8 more
06:26:09,741 ERROR ~
@69ageogm7
Error during the 500 response generation
Template not found
The template errors/500.html does not exist.
play.exceptions.TemplateNotFoundException: Template not found : errors/500.html
at play.templates.TemplateLoader.load(TemplateLoader.java:192)
at play.server.PlayHandler.serve500(PlayHandler.java:783)
at Invocation.HTTP Request(Play!)
06:26:10,195 ERROR ~
@69ageogm8
Internal Server Error (500) for request GET /favicon.ico
Template not found
The template errors/404.html does not exist.
play.exceptions.TemplateNotFoundException: Template not found : errors/404.html
at play.templates.TemplateLoader.load(TemplateLoader.java:192)
at play.server.PlayHandler.serve404(PlayHandler.java:690)
at Invocation.HTTP Request(Play!)
06:26:10,196 ERROR ~
@69ageogm9
Error during the 500 response generation
Template not found
The template errors/500.html does not exist.
play.exceptions.TemplateNotFoundException: Template not found : errors/500.html
at play.templates.TemplateLoader.load(TemplateLoader.java:192)
at play.server.PlayHandler.serve500(PlayHandler.java:783)
at Invocation.HTTP Request(Play!)
最佳答案
解答:我的启动文件是 playtmp.launch,而我的项目已重命名并作为 premonitionx checkin 到 CVS,因此它使用 eclipse 中另一个名为 playtmp 的项目。启动器仅适用于特定项目...如果您重命名它,您可能会被搞砸(我讨厌那样的环境)。
关于playframework Debug模式 DuplicateMemberException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9160791/