I'm getting unsupported major.minor version 51.0 in the logs of Google App Engine. I know there are plenty of posts on Stackoverflow regarding this issue but these are mostly from 2012 in the days when App Engine was still on JRE 6. Now App Engine is at version 1.8.2 running on JRE 7. I use Maven and IntelliJ to develop my application and the target JDK for both is set to 1.7 (actually IntelliJ just picks up the Maven setting). My local Java environment (on Mac OSX 10.7.5) shows:
java version "1.7.0_21" Java(TM) SE Runtime Environment (build 1.7.0_21-b12) Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
So, as far as I can tell, my application is built using JRE 7 and App Engine works on JRE 7. What I don't understand is why the live App Engine still complains about the unsupported version 51.0, which I understand represents JRE 7? I cannot downgrade to JRE 6 because (1) we're using specific Hibernate functionality that requires JRE 7 and (2) App Engine is likely to stop support for JRE 6.
Does anybody also have this experience? Below you can find the actual App Engine error log when this occurs.
Thanks!
Ralph
===== Uncaught exception from servlet java.lang.UnsupportedClassVersionError: com/arcus/pba/server/guice/MyGuiceServletContextListener : Unsupported major.minor version 51.0 at com.google.appengine.runtime.Request.process-4a9c14a818a2f9f2(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.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 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.jetty.handler.ContextHandler.loadClass(ContextHandler.java:1101) at org.mortbay.jetty.webapp.WebXmlConfiguration.initListener(WebXmlConfiguration.java:630) at org.mortbay.jetty.webapp.WebXmlConfiguration.initWebXmlElement(WebXmlConfiguration.java:368) at org.mortbay.jetty.webapp.WebXmlConfiguration.initialize(WebXmlConfiguration.java:289) at org.mortbay.jetty.webapp.WebXmlConfiguration.configure(WebXmlConfiguration.java:222) at org.mortbay.jetty.webapp.WebXmlConfiguration.configureWebApp(WebXmlConfiguration.java:180) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1247) 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:483) at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:490) at com.google.tracing.TraceContext.runInContext(TraceContext.java:777) at com.google.tracing.TraceContext$DoInTraceContext.runInContext(TraceContext.java:754) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:345) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:337) at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:487) at java.lang.Thread.run(Thread.java:679)