How to use custom stax-1.2.0.jar in EAP 6/7 rather than the packaged JBoss woodstox implementation?
Issue
- JBoss contains an "org.codehaus.woodstox" module that utilizes woodstox-core-asl-4.x.x.redhat-1.jar (EAP 6) / woodstox-core-asl-5.x.x.redhat-1.jar (EAP 7) . Though my application is not using the woodstox implementation and we haven't included it as a runtime or compile time dependency, this "org.codehaus.woodstox" module is taking precedence and loading at runtime and using its implementation rather than the stax-1.2.0.jar implementation that we're packaging. For instance in our application trace output we get:
The XMLStreamWriter implementation class: --> com.ctc.wstx.sw.SimpleNsStreamWriter
-
I tried excluding "org.codehaus.woodstox" in my application's jboss-deployment-structure.xml but this does not work
-
Commenting out the resource woodstox-core-asl-4.x.x.redhat-1.jar (EAP 6) / woodstox-core-asl-5.x.x.redhat-1.jar (EAP 7) in the module.xml for "org.codehaus.woodstox" works but is not feasible because of supportability issues
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
- 7.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
