I need to change the default implementation within my project for org.w3c.dom.Document
.
I followed this link to change the default implementation for:
javax.xml.parsers.DocumentBuilderFactory
javax.xml.parsers.SAXParserFactory
javax.xml.transform.TransformerFactory
I've created 3 files with the above names with in META-INF/services
and put in each the following lines:
In file: javax.xml.parsers.DocumentBuilderFactory
I put: com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
In file: javax.xml.parsers.SAXParserFactory
I put: com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
In file: javax.xml.transform.TransformerFactory
I put: org.apache.xalan.processor.TransformerFactoryImpl
But when I deployed over Oracle Application Server I got that the implementation class of org.w3c.dom.Document
is : oracle.xml.parser.v2.XMLDocument
instead of com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl
that is being printed when development on Jetty.
I am developing on Jetty and deploying on Oracle application server.