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
