0

我正在尝试使用带有 Eclipse 的应用程序引擎运行示例程序。我根据本网站中的说明安装谷歌插件: https ://developers.google.com/appengine/docs/java/gettingstarted/installing

按照教程。但由于某种原因,我的应用程序不会运行。我收到以下错误:

     14/12/2012 14:13:41 com.google.apphosting.utils.jetty.JettyLogger info
     INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
     14/12/2012 14:13:41 com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
     INFO: Successfully processed C:\Users\rona\workspace\Guestbook\war\WEB-INF/appengine-web.xml
     14/12/2012 14:13:41 com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
     SEVERE: Received exception processing C:\Users\rona\workspace\Guestbook\war\WEB-INF/appengine-web.xml
     com.google.apphosting.utils.config.AppEngineConfigException: appengine-web.xml does not contain a <threadsafe> element.
     See http://code.google.com/appengine/docs/java/config/appconfig.html#Using_Concurrent_Requests for more information.
     You probably want to enable concurrent requests.
     at com.google.apphosting.utils.config.AppEngineWebXmlReader.readAppEngineWebXml(AppEngineWebXmlReader.java:79)
     at com.google.apphosting.utils.config.EarHelper.readWebModule(EarHelper.java:130)
     at com.google.appengine.tools.development.AbstractContainerService.loadAppEngineWebXml(AbstractContainerService.java:334)
     at com.google.appengine.tools.development.JettyContainerService.initContext(JettyContainerService.java:160)
     at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:227)
     at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:157)
     at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:333)
     at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
     at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServerMain.java:269)
     at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:245)
     com.google.apphosting.utils.config.AppEngineConfigException: Invalid appengine-web.xml(C:\Users\rona\workspace\Guestbook\war\WEB-INF/appengine-web.xml) - appengine-web.xml does not contain a <threadsafe> element.
     See http://code.google.com/appengine/docs/java/config/appconfig.html#Using_Concurrent_Requests for more information.
     You probably want to enable concurrent requests.
     at com.google.apphosting.utils.config.EarHelper.readWebModule(EarHelper.java:132)
     at com.google.appengine.tools.development.AbstractContainerService.loadAppEngineWebXml(AbstractContainerService.java:334)
     at com.google.appengine.tools.development.JettyContainerService.initContext(JettyContainerService.java:160)
     at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:227)
     at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:157)
     at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:333)
     at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
     at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServerMain.java:269)
     at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:245)    

该应用程序的代码是从谷歌开发人员复制的完全相同。我知道该程序在另一台计算机上运行。我安装中的某些东西不起作用。

4

1 回答 1

3

您必须在 appengine-web.xml 中包含以下块:

<threadsafe>true</threadsafe>

无论您的应用程序是否以线程安全的方式设计,都必须明确设置期望。

于 2012-12-14T21:03:01.920 回答