This topic is related withProblems with WordProcessingMLPackage.
I have a Weblogic domain with a bunch of deployments. One of them is using docx4j-2.7.1.jar. At some point the XmlUtils (org.docx4j.XmlUtils ) class is changing the javax.xml.parsers properties in the JVM. Unfortunately Weblogic is not using the required implementation, xalan/xerces, and the server is completely screw up. I.e., after changing these properties is not able to perform deploy/undeploy operations.
One workaround that I am thinking of is to override the setProperty method, via java.util.Properties extension, and forbid the setting of the javax.xml.parsers. See How to detect if a Java System property has changed?
Also I can declare, in the application, the use of a specific implementation:
- Code: Select all
<xml>
<parser-factory>
<saxparser-factory>org.apache.xerces.jaxp.SAXParserFactoryImpl</saxparser-factory>
<document-builder-factory>org.apache.xerces.jaxp.DocumentBuilderFactoryImpl</document-builder-factory>
<transformer-factory>org.apache.xalan.processor.TransformerFactoryImpl</transformer-factory>
</parser-factory>
</xml>
... and add the required libraries to the application Classpath, but how I can avoid the System.setProperty invocation? Change the source code of the docx4java library?
Any thoughts on this?
Thanks in advance,
Luis