DataNucleus Enhancer error while Setting up AppEngine

0 views
Skip to first unread message

user2231256 via StackOverflow

unread,
Oct 19, 2013, 11:37:36 AM10/19/13
to google-appengin...@googlegroups.com

I am trying to set up AppEngine Backend Application project according to the tutorial on this site: https://cloud.google.com/resources/articles/how-to-build-mobile-app-with-app-engine-backend-tutorial

My current Environment is as follows: 1.Eclipse 4.2 (64-bit)with ADT installed.(This was the Eclipse ADT bundle that I installed from the android sdk site itself) 2.Java 7u45(64-bit) 3.App Engine Java sdk 1.8.6.

Initially when I was using Java 6 for setting up the App engine using Generate App Engine Backend(Right click on project->Google->Generate AppEngine Backend)it was giving me a Failed to initialize App Engine:invalid App Engine at path error.

I figured out that it was a Java version error.So I installed Java 7 and the error disappeared.Now when I try to set up App engine using Generate App Engine Backend(Right click on project->Google->Generate AppEngine Backend)I get the following error:

Could not find main class: com.google.appengine.tools.enhancer.Enhance.Program will exit.

My console shows this: java.lang.UnsupportedClassVersionError: com/google/appengine/tools/enhancer/Enhance : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(Unknown Source) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source)



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/19467752/datanucleus-enhancer-error-while-setting-up-appengine

user2231256 via StackOverflow

unread,
Oct 19, 2013, 11:52:37 AM10/19/13
to google-appengin...@googlegroups.com

Dave W. Smith via StackOverflow

unread,
Oct 19, 2013, 1:07:38 PM10/19/13
to google-appengin...@googlegroups.com

"Unsupported major.minor version 51.0" is what you see when you try to execute code compiled with Java 1.7 using an earlier JRE. You probably have an older JRE/JDK on your system that some part of the aparatus is trying to use instead of 1.7. Check your environment variables to see where the JAVA ones are pointing.



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/19467752/datanucleus-enhancer-error-while-setting-up-appengine/19468664#19468664

user2231256 via StackOverflow

unread,
Oct 20, 2013, 3:39:44 AM10/20/13
to google-appengin...@googlegroups.com

Thanks for the answer.The problem is solved.I checked my environment Path Variable, it was pointing to the JDK7 folder. The problem was I had both Java 6 and Java 7 installed on my computer with path variable pointing to JDK7 folder.Both java -version and javac -version on cmd were indicating Java 7,don't know why my eclipse was still using jre6. What I did to solve my problem is that I uninstalled Java 6 completely from my machine and restarted eclipse and the problem disappeared.But now I got a new problem while Generating AppEngine Backend. It gave me com.google.appengine.datnucleus.query cannot be resolved to a type. I restarted eclipse and even this problem disappeared. Any idea on why this error appeared? Am I misssing something?



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/19467752/datanucleus-enhancer-error-while-setting-up-appengine/19474995#19474995
Reply all
Reply to author
Forward
0 new messages