繁体   English   中英

Google App Engine Hello World程序不起作用

[英]Google app engine hello world program doesn't work

我安装了eclipse GAE插件,然后按照简单教程进行操作,并且在运行程序时收到错误消息

    Initializing App Engine server
אוג 23, 2013 12:54:04 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed C:\Users\Owner\workspace\GoogleTest2\war\WEB-INF/appengine-web.xml
אוג 23, 2013 12:54:04 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
SEVERE: Received exception processing C:\Users\Owner\workspace\GoogleTest2\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:85)
        at com.google.apphosting.utils.config.EarHelper.readWebModule(EarHelper.java:166)
        at com.google.appengine.tools.development.ApplicationConfigurationManager$WarModuleConfigurationHandle.readConfiguration(ApplicationConfigurationManager.java:399)
        at com.google.appengine.tools.development.ApplicationConfigurationManager.<init>(ApplicationConfigurationManager.java:146)
        at com.google.appengine.tools.development.ApplicationConfigurationManager.newWarConfigurationManager(ApplicationConfigurationManager.java:88)
        at com.google.appengine.tools.development.DevAppServerImpl.<init>(DevAppServerImpl.java:137)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:233)
        at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:69)
        at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:53)
        at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:84)
        at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
        at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1093)
        at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:836)
        at com.google.gwt.dev.DevMode.main(DevMode.java:311)

   [ERROR] Unable to start App Engine server
com.google.apphosting.utils.config.AppEngineConfigException: Invalid configuration
        at com.google.appengine.tools.development.DevAppServerImpl.reportDeferredConfigurationException(DevAppServerImpl.java:414)
        at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:211)
        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:1093)
        at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:836)
        at com.google.gwt.dev.DevMode.main(DevMode.java:311)
Caused by: com.google.apphosting.utils.config.AppEngineConfigException: Invalid appengine-web.xml(C:\Users\Owner\workspace\GoogleTest2\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:168)
        at com.google.appengine.tools.development.ApplicationConfigurationManager$WarModuleConfigurationHandle.readConfiguration(ApplicationConfigurationManager.java:399)
        at com.google.appengine.tools.development.ApplicationConfigurationManager.<init>(ApplicationConfigurationManager.java:146)
        at com.google.appengine.tools.development.ApplicationConfigurationManager.newWarConfigurationManager(ApplicationConfigurationManager.java:88)
        at com.google.appengine.tools.development.DevAppServerImpl.<init>(DevAppServerImpl.java:137)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:233)
        at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:69)
        at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:53)
        at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:84)
        ... 4 more
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:1093)
        at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:836)
        at com.google.gwt.dev.DevMode.main(DevMode.java:311)
[ERROR] shell failed in doStartupServer method

有什么想法吗? 谢谢!

您的appengine-web.xml文件缺少条目。 对于hello-world,您还不想处理并发,所以添加:

<threadsafe>false</threadsafe>

到这个文件。 您可以在war/META-INF/找到它。

一旦创建并发应用程序(以后再介绍),就可以将其设置为true。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM