jdk version? WildFly version?
Sorry, I should have included that.
Java 8. Wildfly 9.0.2 Final
Can you post the entire exception stacktrace, the output of:
jar -tf yourear.ear
and if possible attach the application which reproduces this? The snippet of the code from your application, which triggers this will help too.
Thanks for the request. Unfortunately, it is impossible to attach our application due to its size but I tried creating a Sample App to demonstrate the problem. Please find it attached. Deploy it and enter "http://localhost:8080/SampleWar" in a browser window.
With the Sample App, I could not get exceptions thrown like we're seeing in our application. But the output shows that org.apache.xml classes are loaded from the Xalan/Xerces JARs in the WAR's lib folder but the XPath classes are loaded from the JRE rt.jar. The XPath classes also seem to be in the Xalan/Xerces JARs (specifically xml-apis.jar) in our WAR's lib folder as well and that is where I think we need them to come from in our application's environment to ensure compatibility. Puzzling... If I can get the Sample App to throw an exception I'll update it here.
jar -tf SampleEar.ear produces:
I'm working on getting the output of "jar -tf" from our application if I'm able to post it.
SampleEar.ear 4.4 MB
We finally figured out our problem. The root cause was a copy of the Xalan 2.6 classes combined into an application JAR. We removed these classes and no longer had issues.