You could try to execute xjc from command line[1]
This is a feature we're still planning to include in a next version.
When running the plugin in debug-mode you should see the arguments used ( "JAXB 
2.0 args: " ...)
These combined should give you the same problem, at least that's what I would 
expect. In this case it's a problem of your Java instance.
Another source of info is the FAQ page of Xalan[2]
 
-Robert
 
[1]  http://download.oracle.com/javase/6/docs/technotes/tools/share/xjc.html
[2] http://xml.apache.org/xalan-j/faq.html
 


Date: Fri, 25 Feb 2011 08:07:13 -0500
From: [email protected]
To: [email protected]
Subject: RE: [mojo-user] jaxb2-maven-plugin dependencies










Removing the dependency & placing the xerces-2.11.0.jar in the 
%JAVA_HOME%\jre\lib\endorsed directory causes the same error.
 




From: [email protected] [mailto:[email protected]] On Behalf Of Robert 
Scholte
Sent: Wednesday, February 23, 2011 4:04 PM
To: [email protected]
Subject: RE: [mojo-user] jaxb2-maven-plugin dependencies
 
Problems with xml + java means almost every time xalan and/or xerces conflicts .
I suggest to add the Xerces jar to the %JAVA_HOME%\jre\lib\endorsed  folder 
instead of adding it as a dependency to solve this problem and give it another 
try.
 
-Robert
 



Date: Wed, 23 Feb 2011 14:59:24 -0500
From: [email protected]
To: [email protected]
Subject: [mojo-user] jaxb2-maven-plugin dependencies

I’m using the jaxb2-maven-plugin to create classes from an xsd – works as 
expected.  However, within my code, I have to use a Marshaller object to do 
some validation against the schema which I’m “nv-ing” to ignore a maxOccurs 
bug.  After some research, I found that I can use the latest version of Xerces 
(2.11.0).  However, if I create a dependency on that, I break the plugin - 
[ERROR] Failed to execute goal org.codehaus.mojo:jaxb2-maven-plugin:1.3:xjc 
(default-cli) on project nytd-model: Execution default-cli of goal 
org.codehaus.mojo:jaxb2-maven-plugin:1.3:xjc failed: A required class was 
missing while executing org.codehaus.mojo:jaxb2-maven-plugin:1.3:xjc: 
org/w3c/dom/ElementTraversal 
 
So, I’m not sure what next.  Is this a bug for Codehaus, or something I can 
change in my setup?
 
Thanks,
Oblio                                     

Reply via email to