我在终端上进行游戏(1.2.5)测试
并访问localhost / @测试
该页面说
Oops: NullPointerException
An unexpected error occured caused by exception NullPointerException:
null
然后在终端
中打印错误堆栈Internal Server Error (500) for request GET /@tests
Oops: NullPointerException
An unexpected error occured caused by exception NullPointerException: null
play.exceptions.UnexpectedException: Unexpected Error
at play.Play.start(Play.java:556)
at play.Play.detectChanges(Play.java:642)
at play.Invoker$Invocation.init(Invoker.java:198)
at Invocation.HTTP Request(Play!)
Caused by: java.lang.NullPointerException
at play.classloading.ApplicationCompiler$2.acceptResult(ApplicationCompiler.java:266)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:478)
at play.classloading.ApplicationCompiler.compile(ApplicationCompiler.java:282)
at play.classloading.ApplicationClassloader.getAllClasses(ApplicationClassloader.java:426)
at play.Play.start(Play.java:516)
... 3 more
答案 0 :(得分:1)
最后我找到了如何驾驭这个例外。因为我有一个包含两个类的文件。比如
Foo.java:
public class Foo {}
class Bar{}
然后我将Bar类重写为嵌套类,一切都好! Thoung我不知道为什么,似乎是由于eclipse java编译器的一些bug