mihirg
mihirg

Reputation: 951

Class not found exception for com/google/appengine/tools/enhancer/Enhance when starting eclipse

I did a fresh download of Eclipse Juno and installed Google App Engine SDK. After this whenever I start eclipse I get an error

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

Edit: Looks like there is a Builder that gets added by the Google AppEngine Plugin. Eclipse tries to find this "Builder" and fails. I added the path to this builder which resides in plugins\com.google.appengine.eclipse.sdkbundle_1.8.3\appengine-java-sdk-1.8.3\lib to my system classpath.

Now I get a different error

DataNucleus Enhancer (version 3.1.1) : Enhancement of classes Aug 21, 2013 8:48:14 PM org.datanucleus.metadata.MetaDataManager loadClasses SEVERE: Class "in.chimanrao.model.Account" was not found in the CLASSPATH. Please check your specification and your CLASSPATH. org.datanucleus.exceptions.ClassNotResolvedException: Class "in.chimanrao.model.Account" was not found in the CLASSPATH. Please check your specification and your CLASSPATH.

How do I pass custom classpath to this DataNucleus Enhancer?

Upvotes: 4

Views: 2347

Answers (2)

Chris Sprague
Chris Sprague

Reputation: 3574

As others have noted, you must use JRE1.7 or above. What isn't stated is that it may be necessary to update Eclipse to use 1.7 and then your project. It may also be necessary to remove the earlier JRE version from the project's buildpath. Detailing all of the steps here is a bit much but I found that the following tutorial includes all necessary steps:

https://spragucm.wordpress.com/2015/05/11/class-not-found-exception-for-comgoogleappenginetoolsenhancerenhance-when-starting-eclipse/

Upvotes: 0

abbas
abbas

Reputation: 7071

I solved it by installing JDK 1.7 and making it the default in Eclipse.

If you work with a database, install the previous version JDK 7u21 because the latest version has some issues with databases.

Upvotes: 7

Related Questions