所以,我所做的就是创建一个默认的Google App Engine(GAE)项目,该项目可以打印“Hello World"并将其部署到服务器。我不断收到以下错误消息:
Error: Server Error
The server encountered an error and could not complete your request.
If the problem persists, please report your problem and mention this error message and
the query that caused it.
管理员日志显示以下内容:
API serving not allowed for this application
我目前还没有做任何事情,它只是默认的Servlet
。它使用Debug as -> Web application
我尝试将JVM更改为1.6并将合规性级别设置为1.6,但不断收到相同的错误消息。
编辑:到目前为止,我正在Administration->Admin Logs
下查看,但当我查看Main->Logs
时,我发现实际的异常被抛出。看起来像我使用的JVM版本的问题:
Uncaught exception from servlet
java.lang.UnsupportedClassVersionError: testwebproject/TestWebProjectServlet : Unsupported major.minor version 51.0
at com.google.appengine.runtime.Request.process-5f33a9433a8c2a4e(Request.java)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
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.ServletHolder.doStart(ServletHolder.java:242)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685)
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 com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:454)
at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:461)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:703)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:338)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:330)
at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:458)
at java.lang.Thread.run(Thread.java:679)
答案 0 :(得分:0)
好的,现在有效。第一个问题是我正在查看日志的错误位置。第二个问题是因为我使用的JVM版本。我确保使用的版本是以下几个方面:
我正在使用JDK 1.7.0_05
编辑:非常感谢Peter Knego的有益评论