users@jaxb2-commons.java.net

RE: Jaxb2 commons annotate

From: Roshan A. Punnoose <rpunnoose_at_proteus-technologies.com>
Date: Tue, 8 Jul 2008 13:40:40 -0400

Sorry here is the verbose stack trace:

        ClassPath: [C:\dev\workspace\zkTest\target\classes, C:\dev\repository\org\zkoss\common\zcommon\3.0.6\zcommon-3.0.6.jar, C:\dev\repos
itory\commons-fileupload\commons-fileupload\1.2.1\commons-fileupload-1.2.1.jar, C:\dev\repository\org\zkoss\zkforge\el\zcommons-el\1.0.1\zco
mmons-el-1.0.1.jar, C:\dev\repository\org\zkoss\common\zweb\3.0.6\zweb-3.0.6.jar, C:\dev\repository\org\zkoss\zk\zhtml\3.0.6\zhtml-3.0.6.jar
, C:\dev\repository\org\zkoss\zk\zk\3.0.6\zk-3.0.6.jar, C:\dev\repository\org\zkoss\zk\zkex\3.0.6\zkex-3.0.6.jar, C:\dev\repository\org\zkos
s\zk\zul\3.0.6\zul-3.0.6.jar, C:\dev\repository\org\zkoss\zk\zkmax\3.0.6\zkmax-3.0.6.jar, C:\dev\repository\org\zkoss\zk\zkplus\3.0.6\zkplus
-3.0.6.jar, C:\dev\repository\org\zkoss\zk\zml\3.0.6\zml-3.0.6.jar, C:\dev\repository\org\zkoss\zkforge\dojoz\0.4.1-1\dojoz-0.4.1-1.jar, C:\
dev\repository\org\beanshell\bsh\2.0b4\bsh-2.0b4.jar, C:\dev\repository\org\slf4j\slf4j-log4j12\1.4.2\slf4j-log4j12-1.4.2.jar, C:\dev\reposi
tory\org\slf4j\slf4j-api\1.4.2\slf4j-api-1.4.2.jar, C:\dev\repository\log4j\log4j\1.2.14\log4j-1.2.14.jar, C:\dev\repository\org\hibernate\h
ibernate\3.2.6.ga\hibernate-3.2.6.ga.jar, C:\dev\repository\net\sf\ehcache\ehcache\1.2.3\ehcache-1.2.3.jar, C:\dev\repository\commons-loggin
g\commons-logging\1.0.4\commons-logging-1.0.4.jar, C:\dev\repository\commons-collections\commons-collections\2.1.1\commons-collections-2.1.1
.jar, C:\dev\repository\javax\transaction\jta\1.0.1B\jta-1.0.1B.jar, C:\dev\repository\asm\asm-attrs\1.5.3\asm-attrs-1.5.3.jar, C:\dev\repos
itory\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar, C:\dev\repository\antlr\antlr\2.7.6\antlr-2.7.6.jar, C:\dev\repository\cglib\cglib\2.1_3\cglib-2.1_
3.jar, C:\dev\repository\asm\asm\1.5.3\asm-1.5.3.jar, C:\dev\repository\org\hibernate\hibernate-annotations\3.3.1.GA\hibernate-annotations-3
.3.1.GA.jar, C:\dev\repository\org\hibernate\hibernate-commons-annotations\3.0.0.ga\hibernate-commons-annotations-3.0.0.ga.jar, C:\dev\repos
itory\org\hibernate\ejb3-persistence\1.0.1.GA\ejb3-persistence-1.0.1.GA.jar, C:\dev\repository\org\jvnet\jaxb2_commons\annotate\0.4-SNAPSHOT
\annotate-0.4-SNAPSHOT.jar, C:\dev\repository\org\jvnet\jaxb2_commons\tools\0.3-SNAPSHOT\tools-0.3-SNAPSHOT.jar, C:\dev\repository\commons-b
eanutils\commons-beanutils\1.7.0\commons-beanutils-1.7.0.jar, C:\dev\repository\commons-lang\commons-lang\2.2\commons-lang-2.2.jar, C:\dev\r
epository\com\sun\xml\bind\jaxb-impl\2.0.3\jaxb-impl-2.0.3.jar, C:\dev\repository\javax\xml\bind\jaxb-api\2.0\jaxb-api-2.0.jar, C:\dev\repos
itory\javax\activation\activation\1.1\activation-1.1.jar, C:\dev\repository\com\sun\xml\bind\jaxb-xjc\2.1.6\jaxb-xjc-2.1.6.jar, C:\dev\repos
itory\org\jvnet\annox\annox\0.4-SNAPSHOT\annox-0.4-SNAPSHOT.jar, C:\dev\repository\org\jvnet\jaxb2_commons\jaxb-xjc\2.1.6\jaxb-xjc-2.1.6.jar
, C:\dev\repository\com\sun\codemodel\codemodel\2.1\codemodel-2.1.jar, C:\dev\repository\com\sun\xml\dtd-parser\dtd-parser\1.0\dtd-parser-1.
0.jar, C:\dev\repository\com\sun\istack\istack-commons-tools\1.1\istack-commons-tools-1.1.jar, C:\dev\repository\relaxngDatatype\relaxngData
type\20020414\relaxngDatatype-20020414.jar, C:\dev\repository\com\sun\org\apache\xml\internal\resolver\20050927\resolver-20050927.jar, C:\de
v\repository\org\kohsuke\rngom\rngom\20061207\rngom-20061207.jar, C:\dev\repository\com\sun\xsom\xsom\20070407\xsom-20070407.jar, C:\dev\rep
ository\org\compass-project\compass\2.0.1\compass-2.0.1.jar, C:\dev\repository\org\apache\lucene\lucene-core\2.3.1\lucene-core-2.3.1.jar, C:
\dev\repository\org\apache\lucene\lucene-highlighter\2.3.2\lucene-highlighter-2.3.2.jar, C:\dev\repository\hsqldb\hsqldb\1.8.0.7\hsqldb-1.8.
0.7.jar, C:\dev\repository\javax\xml\bind\jsr173_api\1.0\jsr173_api-1.0.jar, C:\dev\repository\org\apache\camel\camel-core\1.3.0\camel-core-
1.3.0.jar, C:\dev\repository\commons-logging\commons-logging-api\1.0.4\commons-logging-api-1.0.4.jar, C:\dev\repository\org\springframework\
security\spring-security-core\2.0.0\spring-security-core-2.0.0.jar, C:\dev\repository\org\springframework\spring-core\2.5.5\spring-core-2.5.
5.jar, C:\dev\repository\org\springframework\spring-context\2.5.5\spring-context-2.5.5.jar, C:\dev\repository\aopalliance\aopalliance\1.0\ao
palliance-1.0.jar, C:\dev\repository\org\springframework\spring-beans\2.5.5\spring-beans-2.5.5.jar, C:\dev\repository\org\springframework\sp
ring-aop\2.0.8\spring-aop-2.0.8.jar, C:\dev\repository\commons-codec\commons-codec\1.3\commons-codec-1.3.jar, C:\dev\repository\org\springfr
amework\spring-web\2.5.5\spring-web-2.5.5.jar, C:\dev\repository\org\springframework\spring-webmvc\2.5.5\spring-webmvc-2.5.5.jar, C:\dev\rep
ository\org\springframework\spring-context-support\2.5.5\spring-context-support-2.5.5.jar, C:\dev\repository\org\springframework\spring-tx\2
.5.5\spring-tx-2.5.5.jar]
[INFO] Depends C:\dev\workspace\zkTest\src\main\resources\Alert.xsd: Tue Jul 08 13:06:47 EDT 2008
[INFO] Depends C:\dev\workspace\zkTest\src\main\resources\nrt.xjb: Mon Jul 07 08:45:33 EDT 2008
[INFO] Depends C:\dev\workspace\zkTest\pom.xml: Tue Jul 08 12:23:46 EDT 2008
[INFO] Depends timeStamp: 1215536807106, produces timestamp: -9223372036854775808
[INFO] Removed old generateDirectory 'C:\dev\workspace\zkTest\target\generated-sources\xjc'.
[INFO] Parsing input schema(s)...
[INFO] Compiling input schema(s)...
[ERROR] XJC while compiling schema(s) file:/C:/dev/workspace/zkTest/src/main/resources/Alert.xsd[12,36]: java.lang.ClassNotFoundException: j
avax.persistence.Entity
        at org.jvnet.jaxb2_commons.plugin.annotate.AnnotatePlugin.annotate(AnnotatePlugin.java:190)
        at org.jvnet.jaxb2_commons.plugin.annotate.AnnotatePlugin.annotateClassOutline(AnnotatePlugin.java:123)
        at org.jvnet.jaxb2_commons.plugin.annotate.AnnotatePlugin.processClassOutline(AnnotatePlugin.java:92)
        at org.jvnet.jaxb2_commons.plugin.annotate.AnnotatePlugin.run(AnnotatePlugin.java:81)
        at com.sun.tools.xjc.model.Model.generateCode(Model.java:290)
        at org.jvnet.jaxb2.maven2.XJC2Mojo.runXJC(XJC2Mojo.java:1068)
        at org.jvnet.jaxb2.maven2.XJC2Mojo.execute(XJC2Mojo.java:696)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
        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)
Embedded ex:java.lang.ClassNotFoundException: javax.persistence.Entity
        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 java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at org.jvnet.annox.parser.XAnnotationParser.parse(XAnnotationParser.java:68)
        at org.jvnet.jaxb2_commons.plugin.annotate.AnnotatePlugin.annotate(AnnotatePlugin.java:185)
        at org.jvnet.jaxb2_commons.plugin.annotate.AnnotatePlugin.annotateClassOutline(AnnotatePlugin.java:123)
        at org.jvnet.jaxb2_commons.plugin.annotate.AnnotatePlugin.processClassOutline(AnnotatePlugin.java:92)
        at org.jvnet.jaxb2_commons.plugin.annotate.AnnotatePlugin.run(AnnotatePlugin.java:81)
        at com.sun.tools.xjc.model.Model.generateCode(Model.java:290)
        at org.jvnet.jaxb2.maven2.XJC2Mojo.runXJC(XJC2Mojo.java:1068)


-----Original Message-----
From: Roshan A. Punnoose [mailto:rpunnoose_at_proteus-technologies.com]
Sent: Tue 7/8/2008 1:35 PM
To: users_at_jaxb2-commons.dev.java.net
Subject: Jaxb2 commons annotate
 

When using the maven annotate plugin for jaxb2, I keep getting a class not found exception if I am trying to add an annotation for a class not directly in the Java SDK. For example, the Java lang example works; however, the Entity Java persistence class annotation does not get picked up, even though it is in the classpath.

Roshan