GWT的Google App Engine失败

时间:2014-06-15 18:44:05

标签: google-app-engine gwt

我正在尝试使用Google App Engine运行示例GWT应用程序。我只是安装了Google Plugin for Eclipse,并使用示例代码项目创建了一个同时使用GWT和GAE的新项目。我正在使用的库版本是:JDK-1.7.0_55; GAE-1.6.4; GWT-2.6.0。当我尝试在本地运行时,我收到以下异常:

Initializing App Engine server
Jun 14, 2014 11:36:48 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Jun 14, 2014 11:36:48 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed C:\Users\Andy\workspace\GAETest\war\WEB-INF/appengine-web.xml
Jun 14, 2014 11:36:48 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed C:\Users\Andy\workspace\GAETest\war\WEB-INF/web.xml
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/appengine/api/utils/SystemProperty
  at com.google.appengine.tools.development.AbstractContainerService.setSystemProperties(AbstractContainerService.java:438)
  at com.google.appengine.tools.development.AbstractContainerService.staticInitialize(AbstractContainerService.java:386)
  at com.google.appengine.tools.development.AbstractContainerService.loadAppEngineWebXml(AbstractContainerService.java:369)
  at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:237)
  at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:146)
  at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:97)
  at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:522)
  at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1104)
  at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:844)
  at com.google.gwt.dev.DevMode.main(DevMode.java:322)
Caused by: java.lang.ClassNotFoundException: com.google.appengine.api.utils.SystemProperty
  at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
  at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
  at com.google.appengine.tools.development.DevAppServerClassLoader.loadClass(DevAppServerClassLoader.java:87)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
  ... 10 more

我尝试添加包含SystemProperty类的各种jar文件,但似乎没有任何工作正常。我真的很感激任何建议或方向...我知道它应该以某种形式工作,因为我已经看到GWT应用程序在GAE上运行。

1 个答案:

答案 0 :(得分:1)

确保/war/WEB-INF/lib/文件夹中包含appengine-api.jar(选择App Engine SDK附带的一个)。将它添加到类路径是不够的。 Eclipse应该在Problems选项卡中给你一个警告。