Reputation: 20460
I'm using Play 1.2.7, somehow I found my project become weird, when I start the application, and visit any valid URL, it shows an NullPointerException
:
Oops: NullPointerException
An unexpected error occured caused by exception NullPointerException: null
play.exceptions.UnexpectedException: Unexpected Error
at play.Play.start(Play.java:563)
at play.Play.detectChanges(Play.java:637)
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:523)
... 3 more
And then I try to refresh the page, 2 or 3 time later, it become normal. What's going on here?
Upvotes: 2
Views: 1020
Reputation: 664
play doesn't support the following format in one class
public class A{
}
class B{
}
so make two different class instead of putting both in single class or use nested class.
Upvotes: 5
Reputation: 7542
It is a known bug: http://play.lighthouseapp.com/projects/57987/tickets/1379-unexpectedexception .
Maybe you use nested classes and Play has problems with it.
Upvotes: 3