Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DataNucleus JDO with Google Cloud Tools for Eclipse

I am using the relatively new Google Cloud Tools Plugin for Eclipse, replacing the Google Plugin for Eclipse. I have converted my App Engine project to the environment of the new plugin, but now the app stopped working.

I get the following error when requesting a servlet that uses a Google DataStore entry:

javax.jdo.JDOUserException: Persistent class \"Class 
CLASSNAME does not seem to have been enhanced. You may want to rerun 
the enhancer and check for errors in the output.\" has no table in the 
database, but the operation requires it. Please check the specification 
of the MetaData for this class.

The GPE (Google Plugin Eclipse) had some options for this: https://developers.google.com/eclipse/docs/appengine_orm and https://developers.google.com/eclipse/docs/appengine_datanucleus.

Unfortunately there are no settings for this in the new plugin. I tried to add the DataNucleus Plugin for Eclipse, but then I get the error: Error: Could not find or load main class org.datanucleus.enhancer.DataNucleusEnhancer, when it tries to enhance the classes.

I already tried this too: https://cloud.google.com/appengine/docs/standard/java/datastore/jdo/overview-dn2#Enhancing_Data_Classes, but I don't get how to use this with the new plugin.

I use all the latest versions of Google Cloud (App Engine SDK 1.9.50).

Any help is greatly appreciated!

like image 333
bashoogzaad Avatar asked Apr 13 '17 14:04

bashoogzaad


People also ask

How do I install Google Cloud Tools in Eclipse?

Installing Cloud Tools for Eclipse To install the plugin: Drag the install button into your running Eclipse workspace: Or from inside Eclipse, select Help > Eclipse Marketplace... and search for Google Cloud Tools for Eclipse. Restart Eclipse when prompted.

How do I run the Google App Engine in eclipse?

Run eclipse. To download and install the Cloud Tools for Eclipse plugin, select Help > Eclipse Marketplace... and search for Google Cloud. After installation, restart Eclipse when prompted to do so. In Eclipse, select the File menu > New > Google App Engine Standard Java Project.


1 Answers

The new Cloud Tools for Eclipse plugin does not support Datanucleus, the recommended way is to use the Datanucleus Maven plugin to do enhancing: http://www.datanucleus.org/products/datanucleus/jdo/enhancer.html#maven

like image 152
András Kerekes Avatar answered Oct 17 '22 09:10

András Kerekes