当我单击运行按钮时,调用看起来像
/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/bin/java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:64496,suspend=y,server=n -javaagent:/Users/Debosmit/.gradle/appengine-sdk/appengine-java-sdk-1.9.18/lib/agent/appengine-agent.jar -Xbootclasspath/p:/Users/Debosmit/.gradle/appengine-sdk/appengine-java-sdk-1.9.18/lib/override/appengine-dev-jdk-overrides.jar -javaagent:/Users/Debosmit/Library/Caches/AndroidStudio1.5/groovyHotSwap/gragent.jar -Dfile.encoding=UTF-8 -classpath "/Users/Debosmit/.gradle/appengine-sdk/appengine-java-sdk-1.9.18/lib/appengine-tools-api.jar:/Applications/Android Studio.app/Contents/lib/idea_rt.jar" com.google.appengine.tools.development.DevAppServerMain --address=localhost --port=8080 /Users/Debosmit/Documents/Workspace/ShortNews/backend/build/exploded-app
Connected to the target VM, address: '127.0.0.1:64496', transport: 'socket'
我在http://localhost:8080/_ah/api/explorer
收到以下错误消息HTTP ERROR 500
Problem accessing /_ah/api/explorer. Reason:
Failed to retrieve API configs with status: 500
Caused by:
java.io.IOException: Failed to retrieve API configs with status: 500
at com.google.api.server.spi.tools.devserver.ApiServlet.getApiConfigSources(ApiServlet.java:107)
at com.google.api.server.spi.tools.devserver.ApiServlet.initConfigsIfNecessary(ApiServlet.java:72)
at com.google.api.server.spi.tools.devserver.RestApiServlet.service(RestApiServlet.java:117)
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.headerComplete(HttpConnection.java:923)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
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)
控制台日志有此
May 03, 2016 2:18:58 AM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: /_ah/api/discovery/v1/apis/myApi/v1/rest: java.io.IOException: Failed to retrieve API configs with status: 500
May 03, 2016 2:18:59 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)
May 03, 2016 2:18:59 AM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: /_ah/api/explorer: java.io.IOException: Failed to retrieve API configs with status: 500
[This post]表明问题出在java版本1.7.0_25上。虽然我的bash配置文件说java路径是1.7.9_79,但我很难理解如何使用*.*.*_79
jdk版本启动应用引擎开发服务器。
答案 0 :(得分:0)
仍然不完全确定这是否是一个好的修复,但将JDK路径更改为指向1.7.0_79
似乎可以解决问题。似乎guava与1.7.0_25
存在一些依赖性问题。请注意,在编写本文时,App Engine仍然不支持JDK 1.8。