简体   繁体   中英

Datanucleus enhancer not working with appengine

At the moment I am working on a webapplication written in Java, using Spring, JPA, AppEngine and Datanucleus. It all worked well, until last week when all of a sudden nothing would compile anymore (not even older versions on SVN).

The versions I am using at the moment are:

  • datanucleus: 3.2.5
  • appengine: 1.8.1
  • datanucleus-appengine: 2.1.2
  • datanucleus-jpa: 2.1.8
  • datanucleus-api-jpa: 3.3.0-m1
  • datanucleus-maven-plugin: 3.3.0-m1

Together with some other dependencies, however I think the ones in the list are the most important ones. Everything is compiled using Maven. When I run maven clean install or maven datanucleus:enhance the enhancer crashes:

[ERROR] --------------------
[ERROR]  Standard error from the DataNucleus tool + org.datanucleus.enhancer.DataNucleusEnhancer :
[ERROR] --------------------
[ERROR] Exception in thread "main" java.lang.NoSuchMethodError: org.datanucleus.metadata.MetaDataManager.getOMFContext()Lorg/datanucleus/OMFContext;
        at org.datanucleus.jpa.metadata.JPAAnnotationReader.processClassAnnotations(JPAAnnotationReader.java:199)
        at org.datanucleus.metadata.annotations.AbstractAnnotationReader.getMetaDataForClass(AbstractAnnotationReader.java:126)
        at org.datanucleus.metadata.annotations.AnnotationManagerImpl.getMetaDataForClass(AnnotationManagerImpl.java:171)
        at org.datanucleus.metadata.MetaDataManager.loadAnnotationsForClass(MetaDataManager.java:2757)
        at org.datanucleus.metadata.MetaDataManager.loadPersistenceUnit(MetaDataManager.java:1015)
        at org.datanucleus.enhancer.DataNucleusEnhancer.getFileMetadataForInput(DataNucleusEnhancer.java:796)
        at org.datanucleus.enhancer.DataNucleusEnhancer.enhance(DataNucleusEnhancer.java:513)
        at org.datanucleus.enhancer.DataNucleusEnhancer.main(DataNucleusEnhancer.java:1281)

[ERROR] --------------------

It also gives some other errors:

Extension Point "org.datanucleus.implementation_creator" not registered, but plugin "org.datanucleus.enhancer" defined in file:/D:/FBLAAUW/.m2/repository/org/datanucleus/datanucleus-enhancer/3.1.1/datanucleus-enhancer-3.1.1.jar refers to it.

and several of the following errors (approx 100)

ERROR DataNucleus.Persistence  - User-defined type mapping class "org.datanucleus.store.types.sco.simple.Collection" was not found. Please check the mapping file class specifications and your CLASSPATH. The class must be in the CLASSPATH.

I am using JRE 1.7, but I also tried using JRE 1.6 (which also did not work). My guess is that the used versions are not compliant with each other, but I am not sure. Does anyone have an idea on this?

Suggest you sort out the versions of jars being used. This page states the compatibility of Googles "datanucleus-appengine" with DataNucleus project jars

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM