I'm deploying a Java EE 6 JAX-RS web service on JBoss 6, and I'd like to use Woodstox instead of whatever SAX/StAX parser is currently being used. Since some stack traces list classes in (among other packages):
org.apache.xerces.parsers
org.apache.xerces.impl
org.apache.xerces.jaxp
...I'm guessing that it's using Xerces.
I've tried adding the necessary JARs (woodstox-core-asl-4.1.1.jar
and stax2-api-3.1.1.jar
) into the EAR (deployed in /lib
directory) and also in the WAR (in WEB-INF/lib
) but this didn't seem to affect anything, as stack traces from exceptions in XML parsing still reference Xerces packages.
I've already read this question but I think that I've already tried the "add it to your classpath" option as above. I've also already tried adding the following VM args as per this thread:
-Djavax.xml.stream.XMLInputFactory=com.ctc.wstx.stax.WstxInputFactory
-Djavax.xml.stream.XMLOutputFactory=com.ctc.wstx.stax.WstxOutputFactory
-Djavax.xml.stream.XMLEventFactory=com.ctc.wstx.stax.WstxEventFactory
-Dcom.sun.xml.ws.api.streaming.XMLStreamReaderFactory.woodstox=true
-Dcom.sun.xml.ws.api.streaming.XMLStreamWriterFactory.woodstox=true
What am I doing wrong? How do I get JAXB to use Woodstox instead of (I think) Xerces?