Open GoogleCodeExporter opened 8 years ago
What I can see with -X option is:
[DEBUG] --------------------
[DEBUG] Standard output from the DataNucleus tool
org.datanucleus.enhancer.DataNucleusEnhancer :
[DEBUG] --------------------
[INFO] DataNucleus Enhancer (version 3.2.2) for API "JPA" using JRE "1.7"
DataNucleus Enhancer : Classpath
>>
C:\Users\maroverd\.m2\repository\org\datanucleus\maven-datanucleus-plugin\3.2.0-
m1\maven-datanucleus-plugin-3.2.0-m1.jar
>>
C:\Users\maroverd\.m2\repository\org\datanucleus\datanucleus-api-jpa\3.2.0-m1\da
tanucleus-api-jpa-3.2.0-m1.jar
>>
C:\Users\maroverd\.m2\repository\org\datanucleus\datanucleus-core\3.2.2\datanucl
eus-core-3.2.2.jar
>> C:\Users\maroverd\.m2\repository\javax\jdo\jdo-api\3.0.1\jdo-api-3.0.1.jar
>> C:\Users\maroverd\.m2\repository\javax\transaction\jta\1.1\jta-1.1.jar
>>
C:\Users\maroverd\.m2\repository\org\apache\geronimo\specs\geronimo-jpa_2.0_spec
\1.0\geronimo-jpa_2.0_spec-1.0.jar
>> C:\Users\maroverd\.m2\repository\org\ow2\asm\asm\4.1\asm-4.1.jar
>>
C:\Users\maroverd\.m2\repository\org\codehaus\plexus\plexus-utils\3.0.8\plexus-u
tils-3.0.8.jar
>>
C:\Users\maroverd\.m2\repository\org\codehaus\plexus\plexus-component-annotation
s\1.5.5\plexus-component-annotations-1.5.5.jar
>>
C:\Users\maroverd\.m2\repository\org\sonatype\sisu\sisu-inject-bean\2.3.0\sisu-i
nject-bean-2.3.0.jar
>>
C:\Users\maroverd\.m2\repository\org\sonatype\sisu\sisu-guice\3.1.0\sisu-guice-3
.1.0-no_aop.jar
>>
C:\Users\maroverd\.m2\repository\org\sonatype\sisu\sisu-guava\0.9.9\sisu-guava-0
.9.9.jar
>>
C:\Users\maroverd\.m2\repository\org\apache\xbean\xbean-reflect\3.4\xbean-reflec
t-3.4.jar
>> C:\Users\maroverd\.m2\repository\log4j\log4j\1.2.12\log4j-1.2.12.jar
>>
C:\Users\maroverd\.m2\repository\commons-logging\commons-logging-api\1.1\commons
-logging-api-1.1.jar
>>
C:\Users\maroverd\.m2\repository\com\google\collections\google-collections\1.0\g
oogle-collections-1.0.jar
>> C:\Users\maroverd\.m2\repository\junit\junit\3.8.2\junit-3.8.2.jar
>> C:\java\workspace\myproject\target\classes
[DEBUG] --------------------
[ERROR] --------------------
[ERROR] Standard error from the DataNucleus tool +
org.datanucleus.enhancer.DataNucleusEnhancer :
[ERROR] --------------------
[ERROR] Exception in thread "main" java.lang.NoClassDefFoundError:
com/google/appengine/api/search/Index
The DataNucleus classpath seems not to include all project dependencies.
Is the enhance goal setting the datanucleus classpath?
Original comment by mar...@overdijk.me
on 7 May 2013 at 8:24
Also note by adding the datanucleus plugin to my pom manually, I don't see this
error when running: mvn clean compile datanucleus:enhance
<plugin>
<groupId>org.datanucleus</groupId>
<artifactId>maven-datanucleus-plugin</artifactId>
<version>${org.datanucleus.version}</version>
<configuration>
<api>JPA</api>
<verbose>true</verbose>
</configuration>
<dependencies>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-core</artifactId>
<version>${org.datanucleus.version}</version>
<exclusions>
<exclusion>
<groupId>javax.transaction</groupId>
<artifactId>transaction-api</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<executions>
<execution>
<phase>process-classes</phase>
<goals>
<goal>enhance</goal>
</goals>
</execution>
</executions>
</plugin>
Original comment by mar...@overdijk.me
on 7 May 2013 at 1:00
I think this is fixed in the 1.8.0 version of the plugin.
Can you try and let us know?
Original comment by l...@google.com
on 10 May 2013 at 2:51
I tried with 1.8.0 but then I get:
[INFO] DataNucleus Enhancer (version 3.1.1) : Enhancement of classes
[ERROR] --------------------
[ERROR] Standard error from the DataNucleus tool +
org.datanucleus.enhancer.DataNucleusEnhancer :
[ERROR] --------------------
[ERROR] Exception in thread "main" java.lang.NoSuchMethodError:
org.datanucleus.api.ApiAdapter.isMemberDefaultPersistent(Ljava/lang/Class;)Z
at org.datanucleus.api.jpa.metadata.JPAAnnotationReader.processMemberAnnotations(JPAAnnotationReader.java:1131)
at org.datanucleus.metadata.annotations.AbstractAnnotationReader.getMetaDataForClass(AbstractAnnotationReader.java:177)
at org.datanucleus.metadata.annotations.AnnotationManagerImpl.getMetaDataForClass(AnnotationManagerImpl.java:171)
at org.datanucleus.metadata.MetaDataManager.loadAnnotationsForClass(MetaDataManager.java:2650)
at org.datanucleus.metadata.MetaDataManager.loadClasses(MetaDataManager.java:496)
at org.datanucleus.enhancer.DataNucleusEnhancer.getFileMetadataForInput(DataNucleusEnhancer.java:734)
at org.datanucleus.enhancer.DataNucleusEnhancer.enhance(DataNucleusEnhancer.java:525)
at org.datanucleus.enhancer.DataNucleusEnhancer.main(DataNucleusEnhancer.java:1258)
[ERROR] --------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 32.162s
[INFO] Finished at: Mon May 13 08:53:27 CEST 2013
[INFO] Final Memory: 31M/335M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
com.google.appengine:appengine-maven-plugin:1.8.0:enhance (default) on project
myproject: Could not execute datanucleus enhancer. The DataNucleus tool
org.datanucleus.enhancer.DataNucleusEnhancer exited with a non-null exit code.
-> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please
read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
C:\java\workspace\myproject3>
Original comment by marceloverdijk
on 13 May 2013 at 7:04
Similar problem here. I had to downgrade my maven plugin to 3.1.0-release
before I got past the
Exception in thread "main" java.lang.NoSuchMethodError:
org.datanucleus.api.ApiAdapter.isMemberDefaultPersistent(Ljava/lang/Class;)Z
exception.
Original comment by beayoha...@gmail.com
on 13 Jun 2013 at 8:40
Could you share your pom.xml? That would help tremendously. No code needed...
Original comment by l...@google.com
on 13 Jun 2013 at 8:51
Sure. My Pom is kindof a mess since I've been experimenting with different
packages and so on, sorry. I hope it helps.
Obv. s/3.1.0-release/3.1.1/ or whatever.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.xonami.api</groupId>
<version>0.2-SNAPSHOT</version>
<artifactId>xonami-api</artifactId>
<dependencies>
<dependency>
<groupId>com.rabbitmq</groupId>
<artifactId>amqp-client</artifactId>
<version>3.0.2</version>
</dependency>
<dependency>
<groupId>org.igniterealtime.smack</groupId>
<artifactId>smack</artifactId>
<version>3.2.1</version>
</dependency>
<dependency>
<groupId>org.igniterealtime.smack</groupId>
<artifactId>smackx</artifactId>
<version>3.2.1</version>
</dependency>
<!-- <dependency> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-servlet</artifactId>
<version>7.4.5.v20110725</version> </dependency> -->
<dependency>
<groupId>com.xonami</groupId>
<artifactId>xocipher</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.google.code</groupId>
<artifactId>kaptcha</artifactId>
<version>2.3.2</version>
</dependency>
<dependency>
<groupId>spy</groupId>
<artifactId>spymemcached</artifactId>
<version>2.7.3</version>
</dependency>
<dependency>
<groupId>javax.jdo</groupId>
<artifactId>jdo2-api</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<version>1.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-core</artifactId>
<version>[3.2.0-m1, 3.2.99)</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-api-jpa</artifactId>
<version>[3.2.0-m1, 3.2.99)</version>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-api-jdo</artifactId>
<version>[3.2.0-m1, 3.2.99)</version>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-rdbms</artifactId>
<version>[3.2.0-m1, 3.2.99)</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>2.11.1</version>
</dependency>
<!-- should be exported by kundera core -->
<!-- <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId>
<version>4.1.7.Final</version> <optional>true</optional> </dependency> -->
<!-- <dependency> <groupId>com.netflix.astyanax</groupId> <artifactId>astyanax-core</artifactId>
<version>1.56.37</version> </dependency> <dependency> <groupId>com.netflix.astyanax</groupId>
<artifactId>astyanax-thrift</artifactId> <version>1.56.37</version> </dependency>
<dependency> <groupId>com.netflix.astyanax</groupId> <artifactId>astyanax-cassandra</artifactId>
<version>1.56.37</version> </dependency> <dependency> <groupId>com.netflix.astyanax</groupId>
<artifactId>astyanax-entity-mapper</artifactId> <version>1.56.37</version>
</dependency> -->
<!-- <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-entitymanager</artifactId>
<version>4.1.7.Final</version> </dependency> <dependency> <groupId>org.hibernate</groupId>
<artifactId>hibernate-c3p0</artifactId> <version>4.1.7.Final</version> </dependency>
<dependency> <groupId>postgresql</groupId> <artifactId>postgresql</artifactId>
<version>9.1-901-1.jdbc4</version> </dependency> -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.4</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.4</version>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4.2</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.6.4</version>
</dependency>
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<version>1.4.1</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.1</version>
</dependency>
<!-- restlet -->
<dependency>
<groupId>org.restlet.jee</groupId>
<artifactId>org.restlet</artifactId>
<version>2.1-RC3</version>
</dependency>
<dependency>
<groupId>org.restlet.jse</groupId>
<artifactId>org.restlet.ext.jetty</artifactId>
<version>2.1-RC3</version>
</dependency>
<dependency>
<groupId>org.restlet.jee</groupId>
<artifactId>org.restlet.ext.json</artifactId>
<version>2.1-RC3</version>
</dependency>
<dependency>
<groupId>org.restlet.jee</groupId>
<artifactId>org.restlet.ext.servlet</artifactId>
<version>2.1-RC3</version>
</dependency>
<dependency>
<groupId>org.restlet.jee</groupId>
<artifactId>org.restlet.ext.xml</artifactId>
<version>2.1-RC3</version>
</dependency>
<dependency>
<groupId>org.restlet.jee</groupId>
<artifactId>org.restlet.ext.xstream</artifactId>
<version>2.1-RC3</version>
</dependency>
<dependency>
<groupId>org.restlet.jee</groupId>
<artifactId>org.restlet.ext.wadl</artifactId>
<version>2.1-RC3</version>
</dependency>
<dependency>
<groupId>org.restlet.jee</groupId>
<artifactId>org.restlet.ext.fileupload</artifactId>
<version>2.1-RC3</version>
</dependency>
<!-- required for html wadl conversions -->
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<version>2.7.1</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.datanucleus</groupId>
<artifactId>maven-datanucleus-plugin</artifactId>
<versionRange>[1.0,)</versionRange>
<goals>
<goal>enhance</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-file</artifactId>
<version>2.1</version>
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.datanucleus</groupId>
<artifactId>maven-datanucleus-plugin</artifactId>
<version>3.1.0-release</version>
<configuration>
<api>JPA</api>
<log4jConfiguration>${basedir}/log4j.properties</log4jConfiguration>
<verbose>true</verbose>
</configuration>
<executions>
<execution>
<phase>process-classes</phase>
<goals>
<goal>enhance</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>appassembler-maven-plugin</artifactId>
<version>1.1.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>assemble</goal>
</goals>
<configuration>
<assembleDirectory>target</assembleDirectory>
<programs>
<program>
<mainClass>com.xonami.rest.WebApp</mainClass>
<name>webapp</name>
</program>
</programs>
</configuration>
</execution>
</executions>
</plugin>
<!-- jetty runner <plugin> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId> <version>2.3</version> <executions>
<execution> <phase>package</phase> <goals><goal>copy</goal></goals> <configuration>
<artifactItems> <artifactItem> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-runner</artifactId>
<version>7.4.5.v20110725</version> <destFileName>jetty-runner.jar</destFileName>
</artifactItem> </artifactItems> </configuration> </execution> </executions>
</plugin> -->
</plugins>
</build>
<repositories>
<repository>
<id>spy</id>
<name>Spy Repository</name>
<layout>default</layout>
<url>http://files.couchbase.com/maven2/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>project.local</id>
<name>project</name>
<url>file:${project.basedir}/repo</url>
</repository>
<repository>
<id>repository.jboss.org-public</id>
<name>JBoss repository</name>
<url>https://repository.jboss.org/nexus/content/groups/public</url>
</repository>
<repository>
<id>maven-restlet</id>
<name>Public online Restlet repository</name>
<url>http://maven.restlet.org</url>
</repository>
</repositories>
</project>
Original comment by beayoha...@gmail.com
on 13 Jun 2013 at 8:54
Any update on this as I'm experiencing this behaviour still on latest 1.8.5?
Do you need any more info from me to help you?
Original comment by mar...@overdijk.me
on 2 Oct 2013 at 9:40
with these versions, I think its ok:
<dependency>
<groupId>javax.jdo</groupId>
<artifactId>jdo-api</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-core</artifactId>
<version>3.1.4</version>
</dependency>
<dependency>
<groupId>com.google.appengine.orm</groupId>
<artifactId>datanucleus-appengine</artifactId>
<version>2.1.2</version>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-api-jdo</artifactId>
<version>3.1.3</version>
</dependency>
not sure why newer versions have issues
Original comment by l...@google.com
on 3 Oct 2013 at 12:46
Original issue reported on code.google.com by
mar...@overdijk.me
on 6 May 2013 at 8:07