I ran into some problems with the Xerces library, which is used by a third party lib that I rely on.
Xerces does not support JAXP 1.5, but it is contained in the latest releases of JDK 1.7 and JDK 8. This leads to some problems if Xerces is used as an XML parser, which can happen when several XML parsers are known. Removing xercesImpl-v2.9.0.jarimmediately fixes the problem, but then the third-party library no longer works.
I see two solutions to the problem:
It seems that the only bit from the Xerces library that is actually used is org.apache.xerces.util.XMLCatalogResolver used in CustomResolver.java. Are there other options for a directory converter instead of Xerces?
Another option seems to be to explicitly define the system properties for parsing XML when starting the JVM. That way, the JVM can tell which XML parser to use, and it will no longer select Xerces.
I found the following three properties:
-Djavax.xml.transform.TransformerFactory
-Djavax.xml.parsers.SAXParserFactory
-Djavax.xml.parsers.DocumentBuilderFactory
This leads to two questions: - Are these three properties the only system properties that must be set to redirect the JVM to a specific XML parser? - Can property settings explicitly have any side effects?
Many thanks.
Greetings
Martin