openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ari Meyer (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENJPA-822) hidden dependency on javax.jdo.spi.PersistenceCapable???
Date Wed, 10 Dec 2008 05:38:44 GMT
hidden dependency on javax.jdo.spi.PersistenceCapable??? 
---------------------------------------------------------

                 Key: OPENJPA-822
                 URL: https://issues.apache.org/jira/browse/OPENJPA-822
             Project: OpenJPA
          Issue Type: Bug
          Components: kernel
    Affects Versions: 1.2.0
         Environment: Windows XP SP3
Java 6
Maven 2.0.9
            Reporter: Ari Meyer
            Priority: Minor


Hi,

It appears there's a dependency on javax.jdo.spi.PersistenceCapable when either running the
enhancer or performing lazy loading with enhanced classes, but this dependency isn't specified
in the Maven POM nor documented anywhere.  Here's some output running the Ant task via Maven:

[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
     [java] Exception in thread "Main Thread" java.lang.IllegalArgumentException: 

java.lang.NoClassDefFoundError: javax/jdo/spi/PersistenceCapable
     [java]     at serp.util.Strings.toClass(Strings.java:164)
     [java]     at serp.util.Strings.toClass(Strings.java:108)
     [java]     at serp.bytecode.BCClass.getType(BCClass.java:566)
     [java]     at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:248)
     [java]     at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4492)
     [java]     at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4439)
     [java]     at org.apache.openjpa.enhance.PCEnhancer$1.run(PCEnhancer.java:4409)
     [java]     at org.apache.openjpa.lib.conf.Configurations.launchRunnable(Configurations.java:708)
     [java]     at org.apache.openjpa.lib.conf.Configurations.runAgainstAllAnchors(Configurations.java:698)
     [java]     at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4404)
     [java]     at org.apache.openjpa.enhance.PCEnhancer.main(PCEnhancer.java:4395)
     [java] Java Result: 1


I worked around this by specifying this in my POM:

		<dependency>
			<groupId>javax.jdo</groupId>
			<artifactId>jdo2-api</artifactId>
			<version>2.0</version>
		</dependency>

(Note: I chose that version because it was the latest one that didn't have a dependency on
javax.transaction, since that causes Maven pain.)

With that change, everything seems to work fine, but I'm not sure if that dependency is really
supposed to be there at all.  Please review, and, at minimum, update the POM and make this
dependency explicit in the documentation.

Thank you!
Ari

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message