tinesoft / appengine-maven-plugin

Automatically exported from code.google.com/p/appengine-maven-plugin
Apache License 2.0
0 stars 0 forks source link

Maven enhance goal gives java.lang.NoClassDefFoundError #25

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I'm trying to enhance a domain class which has an EntityListener with JPA 
Lifecycle Events.
These events use the AppEngine Search API to store documents in search index 
after persisting the entity.

When I run the enhance goal I get an exception that the Search API classes 
cannot be found. 
But off course I have a dependency to these classes in my pom.xml:

<dependency>
    <groupId>com.google.appengine</groupId>
    <artifactId>appengine-api-1.0-sdk</artifactId>
    <version>${com.google.appengine.version}</version> <!-- 1.7.7.1 -->
</dependency>

A normal mvn compile gives a successful build.

Below the result of enhance goal:

Marcels-MacBook-Air:myproject marceloverdijk$ mvn clean compile 
appengine:enhance
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building kapsalonrefection 0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ kapsalonrefection 

---
[INFO] Deleting /Users/marceloverdijk/workspace/myproject/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ 
kapsalonrefection ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] 
[INFO] --- jrebel-maven-plugin:1.1.3:generate (generate-rebel-xml) @ 
kapsalonrefection ---
[INFO] Processing nl.myproject:myproject with packaging war
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ myproject ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 10 source files to 
/Users/marceloverdijk/workspace/myproject/target/classes
[INFO] 
[INFO] --- aspectj-maven-plugin:1.4:compile (default) @ myproject ---
[WARNING] advice defined in 
org.springframework.orm.jpa.aspectj.JpaExceptionTranslatorAspect has not been 
applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in 
org.springframework.scheduling.aspectj.AbstractAsyncExecutionAspect has not 
been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in 
org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl 
has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in 
org.springframework.mock.staticmock.AbstractMethodMockingControl has not been 
applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in 
org.springframework.mock.staticmock.AbstractMethodMockingControl has not been 
applied [Xlint:adviceDidNotMatch]
[INFO] 
[INFO] --- appengine-maven-plugin:1.7.7.1:enhance (default-cli) @ myproject ---
[INFO] DataNucleus Enhancer (version 3.2.2) for API "JPA" using JRE "1.7"
DataNucleus Enhancer : Classpath
>>  
/Users/marceloverdijk/.m2/repository/org/datanucleus/maven-datanucleus-plugin/3.
2.0-m1/maven-datanucleus-plugin-3.2.0-m1.jar
>>  
/Users/marceloverdijk/.m2/repository/org/datanucleus/datanucleus-api-jpa/3.2.0-m
1/datanucleus-api-jpa-3.2.0-m1.jar
>>  
/Users/marceloverdijk/.m2/repository/org/datanucleus/datanucleus-core/3.2.2/data
nucleus-core-3.2.2.jar
>>  
/Users/marceloverdijk/.m2/repository/javax/jdo/jdo-api/3.0.1/jdo-api-3.0.1.jar
>>  /Users/marceloverdijk/.m2/repository/javax/transaction/jta/1.1/jta-1.1.jar
>>  
/Users/marceloverdijk/.m2/repository/org/apache/geronimo/specs/geronimo-jpa_2.0_
spec/1.0/geronimo-jpa_2.0_spec-1.0.jar
>>  /Users/marceloverdijk/.m2/repository/org/ow2/asm/asm/4.1/asm-4.1.jar
>>  
/Users/marceloverdijk/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.8/plex
us-utils-3.0.8.jar
>>  
/Users/marceloverdijk/.m2/repository/org/codehaus/plexus/plexus-component-annota
tions/1.5.5/plexus-component-annotations-1.5.5.jar
>>  
/Users/marceloverdijk/.m2/repository/org/sonatype/sisu/sisu-inject-bean/2.3.0/si
su-inject-bean-2.3.0.jar
>>  
/Users/marceloverdijk/.m2/repository/org/sonatype/sisu/sisu-guice/3.1.0/sisu-gui
ce-3.1.0-no_aop.jar
>>  
/Users/marceloverdijk/.m2/repository/org/sonatype/sisu/sisu-guava/0.9.9/sisu-gua
va-0.9.9.jar
>>  
/Users/marceloverdijk/.m2/repository/org/apache/xbean/xbean-reflect/3.4/xbean-re
flect-3.4.jar
>>  /Users/marceloverdijk/.m2/repository/log4j/log4j/1.2.12/log4j-1.2.12.jar
>>  
/Users/marceloverdijk/.m2/repository/commons-logging/commons-logging-api/1.1/com
mons-logging-api-1.1.jar
>>  
/Users/marceloverdijk/.m2/repository/com/google/collections/google-collections/1
.0/google-collections-1.0.jar
>>  /Users/marceloverdijk/.m2/repository/junit/junit/3.8.2/junit-3.8.2.jar
>>  /Users/marceloverdijk/workspace/myproject/target/classes

[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
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2442)
    at java.lang.Class.getDeclaredMethods(Class.java:1808)
    at org.datanucleus.api.jpa.metadata.JPAMetaDataManager.populateListenerMethodsForClassInEventListener(JPAMetaDataManager.java:246)
    at org.datanucleus.api.jpa.metadata.JPAMetaDataManager.populateListenerMethodsForEventListener(JPAMetaDataManager.java:233)
    at org.datanucleus.api.jpa.metadata.JPAMetaDataManager.postProcessClassMetaData(JPAMetaDataManager.java:130)
    at org.datanucleus.api.jpa.metadata.JPAMetaDataManager.registerFile(JPAMetaDataManager.java:217)
    at org.datanucleus.metadata.MetaDataManager.loadAnnotationsForClass(MetaDataManager.java:2728)
    at org.datanucleus.metadata.MetaDataManager.loadClasses(MetaDataManager.java:521)
    at org.datanucleus.enhancer.DataNucleusEnhancer.getFileMetadataForInput(DataNucleusEnhancer.java:737)
    at org.datanucleus.enhancer.DataNucleusEnhancer.enhance(DataNucleusEnhancer.java:513)
    at org.datanucleus.enhancer.DataNucleusEnhancer.main(DataNucleusEnhancer.java:1281)
Caused by: java.lang.ClassNotFoundException: 
com.google.appengine.api.search.Index
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    ... 12 more

[ERROR] --------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.796s
[INFO] Finished at: Mon May 06 21:51:29 CEST 2013
[INFO] Final Memory: 32M/360M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal 
com.google.appengine:appengine-maven-plugin:1.7.7.1:enhance (default-cli) 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

The appengine maven plugin is configured as:

            <plugin>
                <groupId>com.google.appengine</groupId>
                <artifactId>appengine-maven-plugin</artifactId>
                <version>${com.google.appengine.version}</version>
                <configuration>
                    <disableUpdateCheck>true</disableUpdateCheck>
                    <jvmFlags>
                        <jvmFlag>-javaagent:${env.REBEL_HOME}/jrebel.jar</jvmFlag>
                        <jvmFlag>-Ddatastore.backing_store=${project.basedir}/local_db.bin</jvmFlag>
                        <jvmFlag>-Ddatastore.default_high_rep_job_policy_unapplied_job_pct=20</jvmFlag>
                    </jvmFlags>
                </configuration>
                <executions>
                    <execution>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>enhance</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

I wonder if there is something wrong with the classpath which is used by the 
enhance goal?

Original issue reported on code.google.com by mar...@overdijk.me on 6 May 2013 at 8:07

GoogleCodeExporter commented 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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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