Google App Engine教程1:导入错误?导致“无法连接到本地主机?”

时间:2014-02-19 09:17:29

标签: google-app-engine

我正在尝试使用此链接进行谷歌应用教程1。https://googcloudlabs.appspot.com/codelabexercise1.html

完全按照他们的行为进行操作,WEB-INF / lib目录中缺少文件夹错误代码。所以我导入了Google API,Google Datastore Beta 2.然后我遇到了这个错误。

糟糕! Google Chrome无法连接到localhost:8888

我的控制台中的日志如下。

Feb 19, 2014 5:21:36 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed C:\Pirate\CodeLabEx1\war\WEB-INF/appengine-web.xml
Feb 19, 2014 5:21:36 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
SEVERE: Received exception processing C:\Pirate\CodeLabEx1\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:139)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at com.google.appengine.tools.development.DevAppServerFactory.doCreateDevAppServer(DevAppServerFactory.java:258)
    at com.google.appengine.tools.development.DevAppServerFactory.access$000(DevAppServerFactory.java:36)
    at com.google.appengine.tools.development.DevAppServerFactory$1.run(DevAppServerFactory.java:226)
    at com.google.appengine.tools.development.DevAppServerFactory$1.run(DevAppServerFactory.java:224)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:224)
    at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:94)
    at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:265)
    at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
    at com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:219)
    at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:210)

com.google.apphosting.utils.config.AppEngineConfigException: Invalid configuration
    at com.google.appengine.tools.development.DevAppServerImpl.reportDeferredConfigurationException(DevAppServerImpl.java:446)
    at com.google.appengine.tools.development.DevAppServerImpl.doStart(DevAppServerImpl.java:226)
    at com.google.appengine.tools.development.DevAppServerImpl.access$000(DevAppServerImpl.java:47)
    at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:213)
    at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:211)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:211)
    at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:277)
    at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
    at com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:219)
    at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:210)
Caused by: com.google.apphosting.utils.config.AppEngineConfigException: Invalid appengine-web.xml(C:\Pirate\CodeLabEx1\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:139)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at com.google.appengine.tools.development.DevAppServerFactory.doCreateDevAppServer(DevAppServerFactory.java:258)
    at com.google.appengine.tools.development.DevAppServerFactory.access$000(DevAppServerFactory.java:36)
    at com.google.appengine.tools.development.DevAppServerFactory$1.run(DevAppServerFactory.java:226)
    at com.google.appengine.tools.development.DevAppServerFactory$1.run(DevAppServerFactory.java:224)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:224)
    at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:94)
    at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:265)
    ... 3 more

请寻求你的意见。

1 个答案:

答案 0 :(得分:1)

这一切都归结为在appengine-web.xml下插入true。代码已启动并正在运行。

https://developers.google.com/appengine/docs/java/config/appconfig?csw=1#Using_Concurrent_Requests