[
https://issues.apache.org/jira/browse/OPENJPA-1576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845904#action_12845904
]
Donald Woods commented on OPENJPA-1576:
---------------------------------------
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....
> maven plugin broken as of 3/16/2010 2:30 AM PST using openjpa-2.0.0-SNAPSHOT
> -----------------------------------------------------------------------------
>
> Key: OPENJPA-1576
> URL: https://issues.apache.org/jira/browse/OPENJPA-1576
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 2.0.0
> Environment: any
> Reporter: jim n
>
> 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]
> ------------------------------------------------------------------------
> ki...@kiosk:~/laptopsanytime/laptopsanytime-model$
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.