For some reason we need the xdb.jar from the Oracle XDK. This jar depends on the xmlparserv2.jar. The actual problem is that the xmlparserv2.jar comes with some provider-configuration files (META-INF/services). The jar has Services Providers for javax.xml.transform.TransformerFactory, javax.xml.parsers.SAXParserFactory and javax.xml.parsers.DocumentBuilderFactory. The implementations (from oracle.*) don't work together with some other parts of our software (they need the standard factories).
Asked
Active
Viewed 1,100 times
4 Answers
1
You could use separate classloaders to isolate the jars from the rest of the application. This question about covers it.

Community
- 1
- 1

M Platvoet
- 1,679
- 1
- 10
- 14
0
You could just remove these classes from the xmlparserv2.jar

Fortega
- 19,463
- 14
- 75
- 113
-
Sorry, but that's not possible. The license of xmlparserv2.jar doesn't allow that. And the xmlparserv2.jar needs these classes. – alexvetter Jun 21 '11 at 07:40
0
-
Thanks but it doesn't solve my problem. The xmlparserv2.jar is overwriting classes which are in the jre. I can't load the xmlparserv2.jar before the jre. (Can I?) – alexvetter Jun 20 '11 at 15:25
-
-
Okay, then I don't really understand the workaround. The xmlparserv2.jar includes following packages: org.xml.sax.* org.w3c.dom.* oracle.xml.* javax.xml.* The problem proberbly came from the javax.xml.* package... But how can I tell the runtime not to use this part of the jar? – alexvetter Jun 21 '11 at 06:54
0
I solved the problem by removing the services (META-INF/services). We ran our unit tests and everything worked. Even the parts of our software which are depending on xmlparserv2.jar/xdb.jar.

alexvetter
- 1,998
- 2
- 16
- 42