我已经按照Java快速入门中的步骤进行了操作。尝试在本地部署时,我得到以下堆栈跟踪:
Jun 6, 2013 9:53:14 AM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed /home/derek/dev/external/git/mirror-quickstart-java/web/WEB-INF/appengine-web.xml
Jun 6, 2013 9:53:14 AM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed /home/derek/dev/external/git/mirror-quickstart-java/web/WEB-INF/web.xml
Jun 6, 2013 9:53:14 AM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Jun 6, 2013 9:53:15 AM com.google.apphosting.utils.jetty.JettyLogger info
INFO: jetty-6.1.x
Jun 6, 2013 9:53:15 AM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: EXCEPTION
java.lang.ClassNotFoundException: com.google.glassware.AuthFilter
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:215)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at org.mortbay.util.Loader.loadClass(Loader.java:91)
at org.mortbay.util.Loader.loadClass(Loader.java:71)
at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:73)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:81)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:247)
at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:307)
at com.google.appengine.tools.development.AutomaticServerInstanceHolder.startUp(AutomaticServerInstanceHolder.java:26)
at com.google.appengine.tools.development.AbstractServer.startup(AbstractServer.java:80)
at com.google.appengine.tools.development.Servers.startup(Servers.java:78)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:237)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:339)
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServerMain.java:274)
at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:250)
Jun 6, 2013 9:53:15 AM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed authFilter: javax.servlet.UnavailableException: com.google.glassware.AuthFilter
Jun 6, 2013 9:53:15 AM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: Failed startup of context com.google.appengine.tools.development.DevAppEngineWebAppContext@4c29d65b{/,/home/derek/dev/external/git/mirror-quickstart-java/web}
javax.servlet.UnavailableException: com.google.glassware.AuthFilter
at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:79)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:81)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:247)
at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:307)
at com.google.appengine.tools.development.AutomaticServerInstanceHolder.startUp(AutomaticServerInstanceHolder.java:26)
at com.google.appengine.tools.development.AbstractServer.startup(AbstractServer.java:80)
at com.google.appengine.tools.development.Servers.startup(Servers.java:78)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:237)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:339)
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServerMain.java:274)
at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:250)
Jun 6, 2013 9:53:15 AM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Started SelectChannelConnector@127.0.0.1:8080
Jun 6, 2013 9:53:15 AM com.google.appengine.tools.development.AbstractServer startup
INFO: Server default is running at http://localhost:8080/
Jun 6, 2013 9:53:15 AM com.google.appengine.tools.development.AbstractServer startup
INFO: The admin console is running at http://localhost:8080/_ah/admin
Jun 6, 2013 9:53:15 AM com.google.appengine.tools.development.DevAppServerImpl start
INFO: Dev App Server is now running
关于我哪里出错的任何想法?我已将相应的值复制到oauth.properties
和appengine-web.xml
。
一些系统信息(运行Ubuntu)
Apache Maven 3.0.4(r1232337; 2012-01-17 03:44:56-0500)
Java版本:1.6.0_27,供应商:Sun Microsystems Inc.
默认语言环境:en_US,平台编码:UTF-8
操作系统名称:“linux”,版本:“3.2.0-45-generic”,arch:“amd64”,family:“unix”
编辑:部署Python快速入门也无法正常工作。堆栈跟踪:
Deadline exceeded while waiting for HTTP response from URL: https://accounts.google.com/o/oauth2/token
Traceback (most recent call last):
File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1511, in __call__
rv = self.handle_exception(request, response, e)
File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1505, in __call__
rv = self.router.dispatch(request, response)
File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1253, in default_dispatcher
return route.handler_adapter(request, response)
File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1077, in __call__
return handler.dispatch()
File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 547, in dispatch
return self.handle_exception(e, self.app.debug)
File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 545, in dispatch
return method(*args, **kwargs)
File "/base/data/home/apps/s~glasstaskme/1.367898216022107922/oauth/handler.py", line 78, in get
creds = oauth_flow.step2_exchange(code)
File "lib/oauth2client/util.py", line 128, in positional_wrapper
return wrapped(*args, **kwargs)
File "lib/oauth2client/client.py", line 1283, in step2_exchange
headers=headers)
File "lib/httplib2/__init__.py", line 1570, in request
(response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File "lib/httplib2/__init__.py", line 1317, in _request
(response, content) = self._conn_request(conn, request_uri, method, body, headers)
File "lib/httplib2/__init__.py", line 1286, in _conn_request
response = conn.getresponse()
File "/python27_runtime/python27_dist/lib/python2.7/httplib.py", line 500, in getresponse
raise HTTPException(str(e))
HTTPException: Deadline exceeded while waiting for HTTP response from URL: https://accounts.google.com/o/oauth2/token
我已经仔细检查了我的客户端ID,甚至生成了新的客户端ID并删除了旧的ID,所有内容似乎都是有序的。
答案 0 :(得分:5)
对于Java快速入门项目,请务必先进行mvn编译:
mvn compile
然后,运行它:
dev_appserver.sh ./web/
快速入门说明省略了编译步骤,因此跟着他们写信会让你遇到麻烦:)