Thursday, April 21, 2011

App Engine debug project gets java.lang.NoSuchMethodError: org.mortbay.thread.Timeout

I see this error sometimes when I'm starting my Google App Engine / GWT project:

Exception in thread "main" java.lang.NoSuchMethodError: org.mortbay.thread.Timeout.(Ljava/lang/Object;)V
 at org.mortbay.io.nio.SelectorManager$SelectSet.(SelectorManager.java:306)
 at org.mortbay.io.nio.SelectorManager.doStart(SelectorManager.java:223)
 at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
 at org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:303)
 at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
 at org.mortbay.jetty.Server.doStart(Server.java:233)
 at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
 at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:565)
 at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:494)
 at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1058)
 at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:800)
 at com.google.gwt.dev.DevMode.main(DevMode.java:304)

The simple fix is to reset the SDK for App Engine, under Properties > Google > App Engine.  Change it to something other than your current SDK, then change it back.  This doesn't happen often enough for me to figure out what the real fix might be.

1 comment:

Fahim said...

Thanks. It helped.