OpenJPA
  1. OpenJPA
  2. OPENJPA-1576

maven plugin broken as of 3/16/2010 2:30 AM PST using openjpa-2.0.0-SNAPSHOT

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0-beta3
    • Component/s: None
    • Labels:
    • Environment:
      any

      Description

      maven plugin broken as of 3/16/2010 2:30 AM PST using openjpa-2.0.0-SNAPSHOT

      maven repo checksums also fail.

      tested using vmware rollback of march 13 maven tree, mvn -o install succeeds with given pom, maven will seek out and replace openjpa-2.0.0-SNAPSHOT with non-working version as of this ticket creation. [dump below]

      [INFO] task-segment: [openjpa:enhance]
      [INFO] ------------------------------------------------------------------------
      [INFO] Preparing openjpa:enhance
      [WARNING] Removing: enhance from forked lifecycle, to prevent recursive invocation.
      [INFO] [resources:resources

      {execution: default-resources}

      ]
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] Copying 3 resources
      [INFO] snapshot org.apache.openjpa:openjpa-lib:2.0.0-SNAPSHOT: checking for updates from openjpa-internal
      [WARNING] repository metadata for: 'snapshot org.apache.openjpa:openjpa-lib:2.0.0-SNAPSHOT' could not be retrieved from
      repository: openjpa-internal due to an error: Connection failed: Repository path /internal-repository does not exist,
      and cannot be created.
      [INFO] Repository 'openjpa-internal' will be blacklisted
      [INFO] [compiler:compile

      {execution: default-compile}

      ]
      [INFO] Nothing to compile - all classes are up to date
      [INFO] [openjpa:enhance

      {execution: default-cli}

      ]
      [FATAL ERROR] org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo#execute() caused a linkage error (java.lang.NoClassDefFound
      Error) and may be out-of-date. Check the realms:
      [FATAL ERROR] Plugin realm = app0.child-container[org.codehaus.mojo:openjpa-maven-plugin:1.0]
      urls[0] = file:/home/kiosk/.m2/repository/org/codehaus/mojo/openjpa-maven-plugin/1.0/openjpa-maven-plugin-1.0.jar
      urls[1] = file:/home/kiosk/.m2/repository/org/apache/openjpa/openjpa/2.0.0-SNAPSHOT/openjpa-2.0.0-SNAPSHOT.jar
      urls[2] = file:/home/kiosk/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar
      urls[3] = file:/home/kiosk/.m2/repository/commons-lang/commons-lang/2.1/commons-lang-2.1.jar
      urls[4] = file:/home/kiosk/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
      urls[5] = file:/home/kiosk/.m2/repository/net/sourceforge/serp/serp/1.13.1/serp-1.13.1.jar
      urls[6] = file:/home/kiosk/.m2/repository/junit/junit/3.8.2/junit-3.8.2.jar
      urls[7] = file:/home/kiosk/.m2/repository/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.1.1/geronimo-jms_1.1_spec-1
      .1.1.jar
      urls[8] = file:/home/kiosk/.m2/repository/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1.1/geronimo-jta_1.1_spec-1
      .1.1.jar
      urls[9] = file:/home/kiosk/.m2/repository/commons-pool/commons-pool/1.5.3/commons-pool-1.5.3.jar
      urls[10] = file:/home/kiosk/.m2/repository/org/apache/geronimo/specs/geronimo-jpa_2.0_spec/1.0/geronimo-jpa_2.0_spec-1.
      0.jar
      urls[11] = file:/home/kiosk/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.7/plexus-utils-1.5.7.jar
      urls[12] = file:/home/kiosk/.m2/repository/org/codehaus/plexus/plexus-classworlds/1.2-alpha-13/plexus-classworlds-1.2-a
      lpha-13.jar
      urls[13] = file:/home/kiosk/.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14.jar
      [FATAL ERROR] Container realm = plexus.core
      urls[0] = file:/home/kiosk/apache-maven-2.2.1/lib/maven-2.2.1-uber.jar
      [INFO] ------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] org/apache/openjpa/lib/util/Options
      org.apache.openjpa.lib.util.Options
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      java.lang.NoClassDefFoundError: org/apache/openjpa/lib/util/Options
      at org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.getOptions(OpenJpaEnhancerMojo.java:96)
      at org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.enhance(OpenJpaEnhancerMojo.java:114)
      at org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.execute(OpenJpaEnhancerMojo.java:86)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.ja
      va:387)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
      at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
      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.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      Caused by: java.lang.ClassNotFoundException: org.apache.openjpa.lib.util.Options
      at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
      at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
      at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
      at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
      ... 22 more
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 3 seconds
      [INFO] Finished at: Tue Mar 16 01:36:32 PST 2010
      [INFO] Final Memory: 18M/155M
      [INFO] ------------------------------------------------------------------------
      kiosk@kiosk:~/laptopsanytime/laptopsanytime-model$

        Activity

        Hide
        Donald Woods added a comment -

        The 2.0.0-beta2 is an official release, so it is on the default maven central (repo1.maven.org) and all of it's mirrors around the world.... No special <repository> configuration is needed in your builds. Just use openjpa.version=2.0.0-beta2 instead of 2.0.0-SNAPSHOT.

        And yes, the Apache Snapshot repo can be unreliable at times, due to the shear load on it.....

        Show
        Donald Woods added a comment - The 2.0.0-beta2 is an official release, so it is on the default maven central (repo1.maven.org) and all of it's mirrors around the world.... No special <repository> configuration is needed in your builds. Just use openjpa.version=2.0.0-beta2 instead of 2.0.0-SNAPSHOT. And yes, the Apache Snapshot repo can be unreliable at times, due to the shear load on it.....
        Hide
        jim n added a comment -

        the problem has resolved itself and likely represents poor transactional updates of the maven repo evident by checksum failures on the maven fetch process which is

        a) using SNAPSHOT in the version
        b) fetching SNAPSHOT versions dailly
        c) probably fetching nightly updates being incomplete during nightly builds of dependant projects.

        i see no mention of where to point maven at the beta2 release on the main website to reduce this potential race condition, having a beta2 suffix version instead of SNAPSHOT would allow the team to focus on testing of that release instead of a nightly snapshot that may be half-uploaded at the time of client dependency resolution at large.

        Show
        jim n added a comment - the problem has resolved itself and likely represents poor transactional updates of the maven repo evident by checksum failures on the maven fetch process which is a) using SNAPSHOT in the version b) fetching SNAPSHOT versions dailly c) probably fetching nightly updates being incomplete during nightly builds of dependant projects. i see no mention of where to point maven at the beta2 release on the main website to reduce this potential race condition, having a beta2 suffix version instead of SNAPSHOT would allow the team to focus on testing of that release instead of a nightly snapshot that may be half-uploaded at the time of client dependency resolution at large.
        Hide
        jim n added a comment -

        cop out.

        "using openjpa-2.0.0-SNAPSHOT" does not imply we are using your personal svn build. it's a repo upload issue based on maven fetching SNAPSHOT dependencies.

        here's my 4-month old pom fragment. the plugin didn't change in the past 3 days, just the SNAPSHOT element.

        <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>openjpa-maven-plugin</artifactId>
        <version>1.0</version>
        <configuration>
        <includes>*/.class</includes>
        <addDefaultConstructor>true</addDefaultConstructor>
        <enforcePropertyRestrictions>false</enforcePropertyRestrictions>

        <!-Pass additional properties to the Plugin here->
        <toolProperties>
        <properties>
        <!-<property name="ConnectionURL" value="jdbc:derby:/derby/auth"/>->
        <property name="ConnectionDriverName" value="org.apache.derby.jdbc.ClientDataSource"/>
        <property name="Log" value="SQL=TRACE,INFO"/>
        </properties>

        </toolProperties>

        </configuration>
        <executions>
        <execution>
        <id>enhancer</id>
        <phase>process-classes</phase>
        <goals>
        <goal>enhance</goal>
        </goals>
        </execution>
        </executions>
        <dependencies>
        <dependency>
        <groupId>org.apache.openjpa</groupId>
        <artifactId>openjpa</artifactId>
        <version>2.0.0-SNAPSHOT</version>
        </dependency>
        </dependencies>
        </plugin>

        if i switch to using openjpa-all i get classloader conflicts

        Show
        jim n added a comment - cop out. "using openjpa-2.0.0-SNAPSHOT" does not imply we are using your personal svn build. it's a repo upload issue based on maven fetching SNAPSHOT dependencies. here's my 4-month old pom fragment. the plugin didn't change in the past 3 days, just the SNAPSHOT element. <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>openjpa-maven-plugin</artifactId> <version>1.0</version> <configuration> <includes>* / .class</includes> <addDefaultConstructor>true</addDefaultConstructor> <enforcePropertyRestrictions>false</enforcePropertyRestrictions> <!- Pass additional properties to the Plugin here -> <toolProperties> <properties> <!- <property name="ConnectionURL" value="jdbc:derby:/derby/auth"/> -> <property name="ConnectionDriverName" value="org.apache.derby.jdbc.ClientDataSource"/> <property name="Log" value="SQL=TRACE,INFO"/> </properties> </toolProperties> </configuration> <executions> <execution> <id>enhancer</id> <phase>process-classes</phase> <goals> <goal>enhance</goal> </goals> </execution> </executions> <dependencies> <dependency> <groupId>org.apache.openjpa</groupId> <artifactId>openjpa</artifactId> <version>2.0.0-SNAPSHOT</version> </dependency> </dependencies> </plugin> if i switch to using openjpa-all i get classloader conflicts
        Hide
        Donald Woods added a comment -

        When you report the problem to the Mojo JIRA, can you also include the pom.xml fragment showing how you configured the openjpa-maven-plugin? Make sure you include a dependency on groupId=org.apache.openjpa, artifactId=openjpa and version=2.0.0-SNAPSHOT or 2.0.0-beta2 like -
        <build>
        . . .
        <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>openjpa-maven-plugin</artifactId>
        <version>1.0</version>
        <configuration>
        <!-- next 2 are optional and specific to your project -->
        <includes>org/apache/openjpa/integration/daytrader/*Bean.class</includes>
        <excludes>org/apache/openjpa/persistence/*/.class</excludes>
        <addDefaultConstructor>true</addDefaultConstructor>
        <enforcePropertyRestrictions>true</enforcePropertyRestrictions>
        </configuration>
        <executions>
        <execution>
        <id>enhancer</id>
        <phase>process-classes</phase>
        <goals>
        <goal>enhance</goal>
        </goals>
        </execution>
        </executions>
        <dependencies>
        <dependency>
        <groupId>org.apache.openjpa</groupId>
        <artifactId>openjpa</artifactId>
        <version>2.0.0-SNAPSHOT</version>
        </dependency>
        </dependencies>
        </plugin>
        . . .
        </build>

        Also, what version of Maven and JDK are you using?
        The Options class is still there and hasn't been changed since 3/22/09 -
        drwoods:trunk/$ svn log openjpa-lib/src/main/java/org/apache/openjpa/lib/util/Options.java --limit 4
        ------------------------------------------------------------------------
        r757278 | mikedd | 2009-03-22 19:37:24 -0400 (Sun, 22 Mar 2009) | 1 line
        OPENJPA-896. Setting eol-style:native and removing windows eol characters from source files.

        so it sounds like a configuration problem in your build, as I can use the openjpa-maven-plugin with the latest 2.0.0-SNAPSHOT code built locally yesterday on my Mac....

        Show
        Donald Woods added a comment - When you report the problem to the Mojo JIRA, can you also include the pom.xml fragment showing how you configured the openjpa-maven-plugin? Make sure you include a dependency on groupId=org.apache.openjpa, artifactId=openjpa and version=2.0.0-SNAPSHOT or 2.0.0-beta2 like - <build> . . . <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>openjpa-maven-plugin</artifactId> <version>1.0</version> <configuration> <!-- next 2 are optional and specific to your project --> <includes>org/apache/openjpa/integration/daytrader/*Bean.class</includes> <excludes>org/apache/openjpa/persistence/* / .class</excludes> <addDefaultConstructor>true</addDefaultConstructor> <enforcePropertyRestrictions>true</enforcePropertyRestrictions> </configuration> <executions> <execution> <id>enhancer</id> <phase>process-classes</phase> <goals> <goal>enhance</goal> </goals> </execution> </executions> <dependencies> <dependency> <groupId>org.apache.openjpa</groupId> <artifactId>openjpa</artifactId> <version>2.0.0-SNAPSHOT</version> </dependency> </dependencies> </plugin> . . . </build> Also, what version of Maven and JDK are you using? The Options class is still there and hasn't been changed since 3/22/09 - drwoods:trunk/$ svn log openjpa-lib/src/main/java/org/apache/openjpa/lib/util/Options.java --limit 4 ------------------------------------------------------------------------ r757278 | mikedd | 2009-03-22 19:37:24 -0400 (Sun, 22 Mar 2009) | 1 line OPENJPA-896 . Setting eol-style:native and removing windows eol characters from source files. so it sounds like a configuration problem in your build, as I can use the openjpa-maven-plugin with the latest 2.0.0-SNAPSHOT code built locally yesterday on my Mac....
        Hide
        Donald Woods added a comment -

        The "openjpa-maven-plugin" is developed over at Codehaus in the Mojo project and is not part of the Apache OpenJPA builds or distributions -
        http://mojo.codehaus.org/openjpa-maven-plugin/index.html
        Please open a issue in their JIRA -
        http://jira.codehaus.org/browse/MOJO

        Show
        Donald Woods added a comment - The "openjpa-maven-plugin" is developed over at Codehaus in the Mojo project and is not part of the Apache OpenJPA builds or distributions - http://mojo.codehaus.org/openjpa-maven-plugin/index.html Please open a issue in their JIRA - http://jira.codehaus.org/browse/MOJO

          People

          • Assignee:
            Unassigned
            Reporter:
            jim n
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development