6

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!

bashoogzaad
  • 3,951
  • 6
  • 33
  • 61
  • 1
    FYI: I have rewritten the entire JDO part of the app to Objectify (which is now in fact supported by Google App Engine). No Datanucleus needed anymore! – bashoogzaad May 12 '17 at 08:36
  • Regarding the DataNucleus Plugin for Eclipse, in Window -> Preferences -> DataNucleus you need to add datanucleus-core library. However, now I am getting java.lang.IncompatibleClassChangeError for my existing App Engine project. – Viktor Brešan Feb 01 '18 at 20:07
  • After a total of 16 hours spent on this issue, I have come to the conclusion that it is impossible to make DataNucleus, necessary but not anymore supported datanucleus-appengine library and Java8 work together. Looks like I'll have to rewrite my already running apps to use Objectify instead. – Viktor Brešan Feb 02 '18 at 20:56

1 Answers1

2

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

András Kerekes
  • 971
  • 6
  • 13
  • 2
    Thanks for your answer! I am not using maven, is there a way without it? – bashoogzaad Apr 13 '17 at 18:46
  • 1
    Just a few lines up where the above link points, there are other options like: 1. Using Ant, 2. Manual invocation at the command line, 3. Using the Eclipse DataNucleus plugin – András Kerekes Apr 14 '17 at 14:16