2

When I try to run a GWT App Engine project using the Eclipse plugin, I get the following error:

Initializing App Engine server
[ERROR] Unable to start App Engine server
java.lang.RuntimeException: Unable to restore the previous TimeZone
    at com.google.appengine.tools.development.DevAppServerImpl.restoreLocalTimeZone(DevAppServerImpl.java:228)
    at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:164)
    at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:97)
    at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
    at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068)
    at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)
    at com.google.gwt.dev.DevMode.main(DevMode.java:311)
Caused by: java.lang.NoSuchFieldException: defaultZoneTL
    at java.lang.Class.getDeclaredField(Class.java:1899)
    at com.google.appengine.tools.development.DevAppServerImpl.restoreLocalTimeZone(DevAppServerImpl.java:222)
    ... 6 more
[ERROR] shell failed in doStartupServer method
Unable to start embedded HTTP server
com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
    at      com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:102)
    at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
    at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068)
    at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)
    at com.google.gwt.dev.DevMode.main(DevMode.java:311)
klenwell
  • 6,978
  • 4
  • 45
  • 84

3 Answers3

8

Chris Cashwell provided the correct answer. But for people like myself who are relatively new to Eclipse, here are more explicit instructions (which I came across here):

  1. Right-click project directory in Project Explorer window
  2. Select Run As > Run Configurations...
  3. Go to Arguments tab
  4. In VM Arguments textbox, add one of the following parameters mentioned by Chris:
    • -Dappengine.user.timezone.impl=UTC (this worked in my case)
    • -Dappengine.user.timezone=UTC
  5. Click Apply then Run

In my case, this was done specifically in the context of a PlayN project I am working on, so I was right-clicking the HTML folder. In the end, my VM arguments looked something like this:

-Xmx512m -javaagent:/long/path/to/appengine-agent.jar -Dappengine.user.timezone.impl=UTC
Community
  • 1
  • 1
klenwell
  • 6,978
  • 4
  • 45
  • 84
3

See this bug report. For me, it was fixed by downgrading the JDK from 1.7.0_03 -> 1.7.0_02. Other things that have been purported to work are adding -Dappengine.user.timezone=UTC (or in some cases -Dappengine.user.timezone.impl=UTC) to the JVM flags.

Chris Cashwell
  • 22,308
  • 13
  • 63
  • 94
  • I fixed it but the problem is, i have to do the same trick every time i need to create a new project –  Mar 19 '12 at 15:13
1

i got this error, and found port already in use in the console.

I closed eclipse and killed javaw.exe. Then everything worked fine.

pMan
  • 8,808
  • 11
  • 32
  • 35