Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-3094

Changing multimodule.roo sample to JPA provider DataNucleus causes build failure

    XMLWordPrintable

    Details

      Description

      If you take the multimodule.roo sample found with 1.2.1.RELEASE and change the JPA provider to DataNucleus, enhancement fails:

      [email protected]:~/temp$ cd core
      [email protected]:~/temp/core$ mvn clean install
      [INFO] Scanning for projects...
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building core 0.1.0.BUILD-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] — maven-clean-plugin:2.4.1:clean (default-clean) @ core —
      [INFO] Deleting /home/matthew/temp/core/target
      [INFO]
      [INFO] — aspectj-maven-plugin:1.2:compile (default) @ core —
      [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.scheduling.aspectj.AbstractAsyncExecutionAspect has not been applied [Xlint:adviceDidNotMatch]
      [INFO]
      [INFO] — maven-resources-plugin:2.5:resources (default-resources) @ core —
      [debug] execute contextualize
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] Copying 2 resources
      [INFO]
      [INFO] — maven-compiler-plugin:2.3.2:compile (default-compile) @ core —
      [INFO] Nothing to compile - all classes are up to date
      [INFO]
      [INFO] — maven-datanucleus-plugin:3.0.1:enhance (default) @ core —
      [WARNING] Could not transfer metadata asm:asm/maven-metadata.xml from/to local.repository (file:../../local.repository/trunk): No connector available to access repository local.repository (file:../../local.repository/trunk) of type legacy using the available factories WagonRepositoryConnectorFactory
      [INFO] CP: /home/matthew/.m2/repository/org/datanucleus/maven-datanucleus-plugin/3.0.1/maven-datanucleus-plugin-3.0.1.jar
      [INFO] CP: /home/matthew/.m2/repository/org/datanucleus/datanucleus-core/3.1.0-m1/datanucleus-core-3.1.0-m1.jar
      [INFO] CP: /home/matthew/.m2/repository/org/datanucleus/datanucleus-enhancer/3.0.1/datanucleus-enhancer-3.0.1.jar
      [INFO] CP: /home/matthew/.m2/repository/javax/jdo/jdo-api/3.1-SNAPSHOT-20110926/jdo-api-3.1-SNAPSHOT-20110926.jar
      [INFO] CP: /home/matthew/.m2/repository/javax/transaction/transaction-api/1.1/transaction-api-1.1.jar
      [INFO] CP: /home/matthew/.m2/repository/org/apache/geronimo/specs/geronimo-jpa_2.0_spec/1.0/geronimo-jpa_2.0_spec-1.0.jar
      [INFO] CP: /home/matthew/.m2/repository/asm/asm/3.3.1/asm-3.3.1.jar
      [INFO] CP: /home/matthew/.m2/repository/org/codehaus/plexus/plexus-utils/1.2/plexus-utils-1.2.jar
      [INFO] CP: /home/matthew/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
      [INFO] CP: /home/matthew/temp/core/target/classes
      [INFO] CP: /home/matthew/.m2/repository/log4j/log4j/1.2.16/log4j-1.2.16.jar
      [INFO] CP: /home/matthew/.m2/repository/org/slf4j/slf4j-api/1.6.4/slf4j-api-1.6.4.jar
      [INFO] CP: /home/matthew/.m2/repository/org/slf4j/jcl-over-slf4j/1.6.4/jcl-over-slf4j-1.6.4.jar
      [INFO] CP: /home/matthew/.m2/repository/org/slf4j/slf4j-log4j12/1.6.4/slf4j-log4j12-1.6.4.jar
      [INFO] CP: /home/matthew/.m2/repository/org/aspectj/aspectjrt/1.6.12/aspectjrt-1.6.12.jar
      [INFO] CP: /home/matthew/.m2/repository/org/aspectj/aspectjweaver/1.6.12/aspectjweaver-1.6.12.jar
      [INFO] CP: /home/matthew/.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar
      [INFO] CP: /home/matthew/.m2/repository/net/sf/flexjson/flexjson/2.1/flexjson-2.1.jar
      [INFO] CP: /home/matthew/.m2/repository/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.jar
      [INFO] CP: /home/matthew/.m2/repository/org/springframework/roo/org.springframework.roo.annotations/1.2.1.RELEASE/org.springframework.roo.annotations-1.2.1.RELEASE.jar
      [INFO] CP: /home/matthew/.m2/repository/commons-io/commons-io/2.1/commons-io-2.1.jar
      [INFO] CP: /home/matthew/.m2/repository/commons-codec/commons-codec/1.6/commons-codec-1.6.jar
      [INFO] CP: /home/matthew/.m2/repository/org/springframework/spring-core/3.1.0.RELEASE/spring-core-3.1.0.RELEASE.jar
      [INFO] CP: /home/matthew/.m2/repository/org/springframework/spring-asm/3.1.0.RELEASE/spring-asm-3.1.0.RELEASE.jar
      [INFO] CP: /home/matthew/.m2/repository/org/springframework/spring-context/3.1.0.RELEASE/spring-context-3.1.0.RELEASE.jar
      [INFO] CP: /home/matthew/.m2/repository/org/springframework/spring-beans/3.1.0.RELEASE/spring-beans-3.1.0.RELEASE.jar
      [INFO] CP: /home/matthew/.m2/repository/org/springframework/spring-expression/3.1.0.RELEASE/spring-expression-3.1.0.RELEASE.jar
      [INFO] CP: /home/matthew/.m2/repository/org/springframework/spring-aop/3.1.0.RELEASE/spring-aop-3.1.0.RELEASE.jar
      [INFO] CP: /home/matthew/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar
      [INFO] CP: /home/matthew/.m2/repository/org/springframework/spring-aspects/3.1.0.RELEASE/spring-aspects-3.1.0.RELEASE.jar
      [INFO] CP: /home/matthew/.m2/repository/org/springframework/spring-context-support/3.1.0.RELEASE/spring-context-support-3.1.0.RELEASE.jar
      [INFO] CP: /home/matthew/.m2/repository/org/hsqldb/hsqldb/1.8.0.10/hsqldb-1.8.0.10.jar
      [INFO] CP: /home/matthew/.m2/repository/org/hibernate/hibernate-validator/4.2.0.Final/hibernate-validator-4.2.0.Final.jar
      [INFO] CP: /home/matthew/.m2/repository/javax/validation/validation-api/1.0.0.GA/validation-api-1.0.0.GA.jar
      [INFO] CP: /home/matthew/.m2/repository/cglib/cglib-nodep/2.2.2/cglib-nodep-2.2.2.jar
      [INFO] CP: /home/matthew/.m2/repository/javax/transaction/jta/1.1/jta-1.1.jar
      [INFO] CP: /home/matthew/.m2/repository/org/springframework/spring-jdbc/3.1.0.RELEASE/spring-jdbc-3.1.0.RELEASE.jar
      [INFO] CP: /home/matthew/.m2/repository/org/springframework/spring-tx/3.1.0.RELEASE/spring-tx-3.1.0.RELEASE.jar
      [INFO] CP: /home/matthew/.m2/repository/org/springframework/spring-orm/3.1.0.RELEASE/spring-orm-3.1.0.RELEASE.jar
      [INFO] CP: /home/matthew/.m2/repository/commons-pool/commons-pool/1.5.6/commons-pool-1.5.6.jar
      [INFO] CP: /home/matthew/.m2/repository/commons-dbcp/commons-dbcp/1.3/commons-dbcp-1.3.jar
      [INFO] CP: /home/matthew/.m2/repository/org/datanucleus/datanucleus-core/3.0.7/datanucleus-core-3.0.7.jar
      [INFO] CP: /home/matthew/.m2/repository/org/datanucleus/datanucleus-api-jpa/3.0.6/datanucleus-api-jpa-3.0.6.jar
      [INFO] CP: /home/matthew/.m2/repository/org/datanucleus/datanucleus-rdbms/3.0.6/datanucleus-rdbms-3.0.6.jar
      log4j:ERROR Could not read configuration file from URL file:/home/matthew/temp/core/src/main/resources/log4j.properties.
      java.io.FileNotFoundException: /home/matthew/temp/core/src/main/resources/log4j.properties (No such file or directory)
      at java.io.FileInputStream.open(Native Method)
      at java.io.FileInputStream.<init>(FileInputStream.java:120)
      at java.io.FileInputStream.<init>(FileInputStream.java:79)
      at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
      at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
      at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:524)
      at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:483)
      at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
      at org.apache.log4j.Logger.getLogger(Logger.java:104)
      at org.datanucleus.util.Log4JLogger.<init>(Log4JLogger.java:49)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at org.datanucleus.util.NucleusLogger.getLoggerInstance(NucleusLogger.java:140)
      at org.datanucleus.util.NucleusLogger.<clinit>(NucleusLogger.java:106)
      at org.datanucleus.enhancer.DataNucleusEnhancer.<clinit>(DataNucleusEnhancer.java:86)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.datanucleus.maven.AbstractDataNucleusMojo.executeInJvm(AbstractDataNucleusMojo.java:333)
      at org.datanucleus.maven.AbstractEnhancerMojo.enhance(AbstractEnhancerMojo.java:249)
      at org.datanucleus.maven.AbstractEnhancerMojo.executeDataNucleusTool(AbstractEnhancerMojo.java:72)
      at org.datanucleus.maven.AbstractDataNucleusMojo.execute(AbstractDataNucleusMojo.java:126)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
      log4j:ERROR Ignoring configuration file file:/home/matthew/temp/core/src/main/resources/log4j.properties.
      log4j:WARN No appenders could be found for logger (DataNucleus.Enhancer).
      log4j:WARN Please initialize the log4j system properly.
      log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 3.217s
      [INFO] Finished at: Sat Mar 10 15:10:16 CST 2012
      [INFO] Final Memory: 9M/169M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.datanucleus:maven-datanucleus-plugin:3.0.1:enhance (default) on project core: Error executing enhancer: InvocationTargetException: Plugin (Bundle) "org.datanucleus" is already registered. Ensure you dont have multiple JAR versions of the same plugin in the classpath. The URL "file:/home/matthew/.m2/repository/org/datanucleus/datanucleus-core/3.0.7/datanucleus-core-3.0.7.jar" is already registered, and you are trying to register an identical plugin located at URL "file:/home/matthew/.m2/repository/org/datanucleus/datanucleus-core/3.1.0-m1/datanucleus-core-3.1.0-m1.jar." -> [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
      [email protected]:~/temp/core$

        Attachments

          Activity

            People

            Assignee:
            stewarta Alan Stewart
            Reporter:
            matthewadams Matthew T. Adams
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: