我很想知道如何让默认的“appengine connected Android project”工作。 我正在使用eclipse Luna(4.4.2)和谷歌插件(使用谷歌应用引擎SDK 1.9.18)。 我通过输入相关范围(项目名称,包名称,API密钥和项目编号)创建了默认项目。 然后我通过运行xxxxx-AppEngine作为Web应用程序启动了本地Web服务器。 然后,当我尝试访问:http://localhost:8888/时,我在控制台中收到以下错误:
2015年12月22日
11:55:33 AM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: Error for /_ah/spi/BackendService.getApiConfigs
java.lang.NoClassDefFoundError: Could not initialize class com.google.appengine.repackaged.com.google.common.reflect.Types$NativeTypeVariableEquals
at com.google.appengine.repackaged.com.google.common.reflect.TypeResolver$TypeTable.resolveInternal(TypeResolver.java:296)
at com.google.appengine.repackaged.com.google.common.reflect.TypeResolver$TypeTable.resolve(TypeResolver.java:249)
at com.google.appengine.repackaged.com.google.common.reflect.TypeResolver.resolveType(TypeResolver.java:160)
at com.google.appengine.repackaged.com.google.common.reflect.TypeResolver.resolveTypes(TypeResolver.java:176)
at com.google.appengine.repackaged.com.google.common.reflect.TypeResolver.resolveParameterizedType(TypeResolver.java:200)
at com.google.appengine.repackaged.com.google.common.reflect.TypeResolver.resolveType(TypeResolver.java:162)
at com.google.appengine.repackaged.com.google.common.reflect.TypeToken.resolveType(TypeToken.java:245)
at com.google.appengine.repackaged.com.google.common.reflect.TypeToken.resolveSupertype(TypeToken.java:256)
at com.google.appengine.repackaged.com.google.common.reflect.TypeToken.getGenericInterfaces(TypeToken.java:333)
at com.google.api.server.spi.config.Serializers.getSerializerClasses(Serializers.java:143)
at com.google.api.server.spi.config.annotationreader.ApiAnnotationIntrospector.findSerializerInstance(ApiAnnotationIntrospector.java:215)
at com.google.api.server.spi.config.annotationreader.ApiAnnotationIntrospector.findSerializer(ApiAnnotationIntrospector.java:99)
at com.google.api.server.spi.config.annotationreader.ApiAnnotationIntrospector.findSerializer(ApiAnnotationIntrospector.java:44)
at com.google.appengine.repackaged.org.codehaus.jackson.map.AnnotationIntrospector$Pair.findSerializer(AnnotationIntrospector.java:1146)
at com.google.appengine.repackaged.org.codehaus.jackson.map.ser.BasicSerializerFactory.findSerializerFromAnnotation(BasicSerializerFactory.java:362)
at com.google.appengine.repackaged.org.codehaus.jackson.map.ser.BeanSerializerFactory.createSerializer(BeanSerializerFactory.java:252)
at com.google.appengine.repackaged.org.codehaus.jackson.map.ser.StdSerializerProvider._createUntypedSerializer(StdSerializerProvider.java:782)
at com.google.appengine.repackaged.org.codehaus.jackson.map.ser.StdSerializerProvider._createAndCacheUntypedSerializer(StdSerializerProvider.java:735)
at com.google.appengine.repackaged.org.codehaus.jackson.map.ser.StdSerializerProvider.findValueSerializer(StdSerializerProvider.java:344)
at com.google.appengine.repackaged.org.codehaus.jackson.map.ser.StdSerializerProvider.findTypedValueSerializer(StdSerializerProvider.java:420)
at com.google.appengine.repackaged.org.codehaus.jackson.map.ser.StdSerializerProvider._serializeValue(StdSerializerProvider.java:601)
at com.google.appengine.repackaged.org.codehaus.jackson.map.ser.StdSerializerProvider.serializeValue(StdSerializerProvider.java:256)
at com.google.appengine.repackaged.org.codehaus.jackson.map.ObjectWriter._configAndWriteValue(ObjectWriter.java:456)
at com.google.appengine.repackaged.org.codehaus.jackson.map.ObjectWriter.writeValueAsString(ObjectWriter.java:393)
at com.google.api.server.spi.response.ServletResponseResultWriter.writeValueAsString(ServletResponseResultWriter.java:183)
at com.google.api.server.spi.response.ServletResponseResultWriter.writeError(ServletResponseResultWriter.java:83)
at com.google.api.server.spi.SystemService.invokeServiceMethod(SystemService.java:387)
at com.google.api.server.spi.SystemServiceServlet.execute(SystemServiceServlet.java:160)
at com.google.api.server.spi.SystemServiceServlet.doPost(SystemServiceServlet.java:118)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
at com.google.appengine.api.socket.dev.DevSocketFilter.doFilter(DevSocketFilter.java:74)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.appengine.tools.development.ResponseRewriterFilter.doFilter(ResponseRewriterFilter.java:127)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:34)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:63)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:125)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.appengine.tools.development.DevAppServerModulesFilter.doDirectRequest(DevAppServerModulesFilter.java:366)
at com.google.appengine.tools.development.DevAppServerModulesFilter.doDirectModuleRequest(DevAppServerModulesFilter.java:349)
at com.google.appengine.tools.development.DevAppServerModulesFilter.doFilter(DevAppServerModulesFilter.java:116)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at com.google.appengine.tools.development.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:98)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:491)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
מרץ 22, 2015 11:55:33 AM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: /_ah/api/discovery/v1/apis/deviceinfoendpoint/v1/rest: java.io.IOException: Failed to retrieve API configs with status: 500
מרץ 22, 2015 11:55:33 AM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: Error for /_ah/spi/BackendService.getApiConfigs
java.lang.NoClassDefFoundError: Could not initialize class com.google.appengine.repackaged.com.google.common.reflect.Types$NativeTypeVariableEquals
at com.google.appengine.repackaged.com.google.common.reflect.TypeResolver$TypeTable.resolveInternal(TypeResolver.java:296)
at com.google.appengine.repackaged.com.google.common.reflect.TypeResolver$TypeTable.resolve(TypeResolver.java:249)
at com.google.appengine.repackaged.com.google.common.reflect.TypeResolver.resolveType(TypeResolver.java:160)
at com.google.appengine.repackaged.com.google.common.reflect.TypeResolver.resolveTypes(TypeResolver.java:176)
at com.google.appengine.repackaged.com.google.common.reflect.TypeResolver.resolveParameterizedType(TypeResolver.java:200)
at com.google.appengine.repackaged.com.google.common.reflect.TypeResolver.resolveType(TypeResolver.java:162)
at com.google.appengine.repackaged.com.google.common.reflect.TypeToken.resolveType(TypeToken.java:245)
at com.google.appengine.repackaged.com.google.common.reflect.TypeToken.resolveSupertype(TypeToken.java:256)
at com.google.appengine.repackaged.com.google.common.reflect.TypeToken.getGenericInterfaces(TypeToken.java:333)
at com.google.api.server.spi.config.Serializers.getSerializerClasses(Serializers.java:143)
at com.google.api.server.spi.config.annotationreader.ApiAnnotationIntrospector.findSerializerInstance(ApiAnnotationIntrospector.java:215)
at com.google.api.server.spi.config.annotationreader.ApiAnnotationIntrospector.findSerializer(ApiAnnotationIntrospector.java:99)
at com.google.api.server.spi.config.annotationreader.ApiAnnotationIntrospector.findSerializer(ApiAnnotationIntrospector.java:44)
at com.google.appengine.repackaged.org.codehaus.jackson.map.AnnotationIntrospector$Pair.findSerializer(AnnotationIntrospector.java:1146)
at com.google.appengine.repackaged.org.codehaus.jackson.map.ser.BasicSerializerFactory.findSerializerFromAnnotation(BasicSerializerFactory.java:362)
at com.google.appengine.repackaged.org.codehaus.jackson.map.ser.BeanSerializerFactory.createSerializer(BeanSerializerFactory.java:252)
at com.google.appengine.repackaged.org.codehaus.jackson.map.ser.StdSerializerProvider._createUntypedSerializer(StdSerializerProvider.java:782)
at com.google.appengine.repackaged.org.codehaus.jackson.map.ser.StdSerializerProvider._createAndCacheUntypedSerializer(StdSerializerProvider.java:735)
at com.google.appengine.repackaged.org.codehaus.jackson.map.ser.StdSerializerProvider.findValueSerializer(StdSerializerProvider.java:344)
at com.google.appengine.repackaged.org.codehaus.jackson.map.ser.StdSerializerProvider.findTypedValueSerializer(StdSerializerProvider.java:420)
at com.google.appengine.repackaged.org.codehaus.jackson.map.ser.StdSerializerProvider._serializeValue(StdSerializerProvider.java:601)
at com.google.appengine.repackaged.org.codehaus.jackson.map.ser.StdSerializerProvider.serializeValue(StdSerializerProvider.java:256)
at com.google.appengine.repackaged.org.codehaus.jackson.map.ObjectWriter._configAndWriteValue(ObjectWriter.java:456)
at com.google.appengine.repackaged.org.codehaus.jackson.map.ObjectWriter.writeValueAsString(ObjectWriter.java:393)
at com.google.api.server.spi.response.ServletResponseResultWriter.writeValueAsString(ServletResponseResultWriter.java:183)
at com.google.api.server.spi.response.ServletResponseResultWriter.writeError(ServletResponseResultWriter.java:83)
at com.google.api.server.spi.SystemService.invokeServiceMethod(SystemService.java:387)
at com.google.api.server.spi.SystemServiceServlet.execute(SystemServiceServlet.java:160)
at com.google.api.server.spi.SystemServiceServlet.doPost(SystemServiceServlet.java:118)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
at com.google.appengine.api.socket.dev.DevSocketFilter.doFilter(DevSocketFilter.java:74)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.appengine.tools.development.ResponseRewriterFilter.doFilter(ResponseRewriterFilter.java:127)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:34)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:63)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:125)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.appengine.tools.development.DevAppServerModulesFilter.doDirectRequest(DevAppServerModulesFilter.java:366)
at com.google.appengine.tools.development.DevAppServerModulesFilter.doDirectModuleRequest(DevAppServerModulesFilter.java:349)
at com.google.appengine.tools.development.DevAppServerModulesFilter.doFilter(DevAppServerModulesFilter.java:116)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at com.google.appengine.tools.development.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:98)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:491)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
מרץ 22, 2015 11:55:33 AM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: /_ah/api/discovery/v1/apis/messageEndpoint/v1/rest: java.io.IOException: Failed to retrieve API configs with status: 500
此外,当我运行Android客户端并按“REGISTER”时,我得到相同的500错误。
我该如何解决这个问题?
答案 0 :(得分:1)
当我更新到GAE的SDK版本1.9.18时,我遇到了同样的问题。最后我想出了解决方案:更新java。在我这样做之后,一切都顺利进行了!
我猜测端点现在需要Java版本1.7.0_51-b13或更高版本,在Guava类的源代码中由this comment判断给我们带来了麻烦。
作为参考,今天可用的Java 7版本是1.7.0_76。