用eclipse运行appengine

时间:2012-12-14 14:24:32

标签: java eclipse google-app-engine install

我正在尝试使用带有eclipse的app引擎运行示例程序。我按照本网站的说明安装谷歌插件: 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)    

该应用的代码是从谷歌开发者复制完全相同。我知道该程序在另一台计算机上运行。我安装的东西不能正常工作。

1 个答案:

答案 0 :(得分:3)

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

<threadsafe>true</threadsafe>

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