Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem with xmlparserv2.jar

User_W2G3YAug 27 2021 — edited Aug 30 2021

Hello,
I hope this is good category for this problem. I am trying to add XMLTYPE column support to my application, so I added two new jars: com.oracle.database.xml.xdb and com.oracle.database.xml.xmlparserv2 from maven repository(newest available 21.1.0.0).
But i encountered that problem during maven build:
[WARNING] Exception in thread "main" java.lang.RuntimeException: javax.xml.parsers.ParserConfigurationException
[WARNING] at org.apache.cxf.helpers.DOMUtils.createDocument(DOMUtils.java:187)
[WARNING] at org.apache.cxf.staxutils.StaxUtils.read(StaxUtils.java:1163)
[WARNING] at org.apache.cxf.staxutils.StaxUtils.read(StaxUtils.java:1160)
[WARNING] at org.apache.cxf.staxutils.StaxUtils.read(StaxUtils.java:1124)
[WARNING] at org.apache.cxf.tools.wsdlto.core.PluginLoader.getPlugin(PluginLoader.java:234)
[WARNING] at org.apache.cxf.tools.wsdlto.core.PluginLoader.getPlugin(PluginLoader.java:193)
[WARNING] at org.apache.cxf.tools.wsdlto.core.PluginLoader.loadPlugin(PluginLoader.java:122)
[WARNING] at org.apache.cxf.tools.wsdlto.core.PluginLoader.loadPlugins(PluginLoader.java:102)
[WARNING] at org.apache.cxf.tools.wsdlto.core.PluginLoader.init(PluginLoader.java:79)
[WARNING] at org.apache.cxf.tools.wsdlto.core.PluginLoader.<init>(PluginLoader.java:73)
[WARNING] at org.apache.cxf.tools.wsdlto.core.PluginLoader.newInstance(PluginLoader.java:106)
[WARNING] at org.apache.cxf.tools.wsdlto.WSDLToJava.<init>(WSDLToJava.java:48)
[WARNING] at org.apache.cxf.maven_plugin.wsdl2java.ForkOnceWSDL2Java.main(ForkOnceWSDL2Java.java:51)
[WARNING] Caused by: javax.xml.parsers.ParserConfigurationException
[WARNING] at oracle.xml.jaxp.JXDocumentBuilderFactory.setFeature(JXDocumentBuilderFactory.java:380)
[WARNING] at org.apache.cxf.helpers.DOMUtils.createDocumentBuilder(DOMUtils.java:148)
[WARNING] at org.apache.cxf.helpers.DOMUtils.getDocumentBuilder(DOMUtils.java:138)
[WARNING] at org.apache.cxf.helpers.DOMUtils.createDocument(DOMUtils.java:185)
[WARNING] ... 12 more
It's look like conflict with org.apache.cxf:cxf-core:3.4.4 library. In your class in method setFeature on entry param 'http://apache.org/xml/features/disallow-doctype-decl' method throws ParserConfigurationException.
Can you prepare fix for it?
Workaround for this problem is run java with this arg: javax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
edit:
I temporarily solved this problem with removing two files from xmlparserv2.jar: javax.xml.parsers.DocumentBuilderFactory and javax.xml.parsers.SAXParserFactory from META-INF/services directory.

Comments

TonyScalese
Look at the accelerators in workbench...
1 - 1

Post Details

Added on Aug 27 2021
0 comments
1,518 views