How to use Oracle / Sun specific JAXP features in JBoss EAP 5
Issue
- How to use the JDK's JAXP (Xerces / Xalan) implementation in JBoss EAP 5 ?
- When trying JDK1.6 release 91 on JBoss 5.1.2 on our local environment, we found errors similar to those specified in Oracle Doc ID 1951255.1, copied below:
15:26:17,075 ERROR [STDERR] Warning: org.apache.xerces.parsers.SAXParser: Feature 'http://javax.xml.XMLConstants/feature/secure-processing' is not recognized.
15:26:17,078 ERROR [STDERR] Warning: org.apache.xerces.parsers.SAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
15:26:19,165 ERROR [STDERR] Warning: org.apache.xerces.parsers.SAXParser: Feature 'http://javax.xml.XMLConstants/feature/secure-processing' is not recognized.
15:26:19,167 ERROR [STDERR] Warning: org.apache.xerces.parsers.SAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
According to Oracle it is caused by:
The incorrect version of the Xalan and/or Xerces implementation is used which results in an incompatibility that leads to these warnings.
The issue happens as a consequence of several factors:
The JVM provided an updated implementation of the Xerces and Xalan libraries starting in JDK 1.6.0_75
JBoss ships with its own versions of the Xerces and Xalan libraries in the jboss-eap-5.1/jboss-as/lib/endorsed/ directory
The atg.xml.tools.XSLProcessorImpl implementation changes the classloader while processing XML files
These all contribute to the problem such that different versions of Xerces/Xalan are in use at the same time which results in the warnings.
Is it okay to remove those two jar files from Jboss?
jboss-eap-5.1/jboss-as/lib/endorsed/xercesImpl.jar
jboss-eap-5.1/jboss-as/lib/endorsed/xalan.jar
Environment
Red Hat JBoss Enterprise Application Platform (EAP) 5.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.