Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GAE 500 server error

I'm developing app on GAE, I test the website locally fine however, every time I tried to deploy it to the GAE it reports with Error: Server Error

The server encountered an error and could not complete your request.
Please try again in 30 seconds. 

I searched a lot in google, seems no answer could solve my question. When I look for the log in the GAE app, following is the major problem I found so far. Initially, I thought it's due to JDK8 but when I set JDK8 I can't even run the app locally!

    Uncaught exception from servlet
java.lang.UnsupportedClassVersionError: org/apache/jsp/index_jsp : Unsupported major.minor version 52.0
    at com.google.appengine.runtime.Request.process-aea5c804a9f29902(Request.java)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:795)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
    at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:360)
    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:437)
    at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:444)
    at com.google.tracing.CurrentContext.runInContext(CurrentContext.java:188)
    at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:308)
    at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:300)
    at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:441)
    at java.lang.Thread.run(Thread.java:724)
like image 948
i3wangyi Avatar asked Apr 25 '14 06:04

i3wangyi


People also ask

How do I fix 500 internal server error on Google?

If you are receiving an “Error 500 – Internal Server Error” message while trying to log into Canvas, you will need to clear the cookies on your web browser to resolve this issue.

Why do I keep getting 500 internal server error?

The 500 Internal Server error could be caused by an error during the execution of any policy within Edge or by an error on the target/backend server. The HTTP status code 500 is a generic error response. It means that the server encountered an unexpected condition that prevented it from fulfilling the request.


3 Answers

This is the telltale: Unsupported major.minor version 52.0. This happens when you compile on higher version JDK (52 = java8) and then execute it on lower JRE version (GAE uses java7).

GAE does not yet support Java8, so you should compile under Java7.

like image 76
Peter Knego Avatar answered Oct 17 '22 08:10

Peter Knego


I had the same problem on Windows when Java 8 was installed.

I tried modifying the project/workspace settings but it didn't help me.

So, I created the following batch file as a workaround for GAE projects:

eclipse_gae.bat:

SET JAVA_HOME="C:\Program Files\Java\jdk1.7.0_55"
SET PATH="%JAVA_HOME%\bin"
START eclipse.exe
like image 8
craigrs84 Avatar answered Oct 17 '22 08:10

craigrs84


there is no need to fully remove Java 8 from MacOS. Just reconfigure Eclipse as shown here to force it to compile JSPs as Java 7: http://java.wildstartech.com/Java-Platform-Standard-Edition/mac-os-x-java-development/how-to-configure-eclipse-to-run-with-java-7-when-java-8-is-installed

like image 5
icordoba Avatar answered Oct 17 '22 08:10

icordoba