In spring boot application we are dependent on Sax XML parsers and dozer mappers. So we have used xercesImpl.jar which internally has xml-apis as dependency.
When we install and run application in WAS, giving exception as below,
java.lang.RuntimeException: XPathFactory#newInstance() failed to create an XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException: No XPathFctory implementation found for the object model: http://java.sun.com/jaxp/xpath/dom at javax.xml.xpath.XPathFactory.newInstance(Unknown Source)
When I excluded xml-apis dependency then app is coming up but it's failing to load dozer xmls, with below exception
java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal
We have set application class loader config to parent last as spring boot 2.3.12 is conflicting with parent first class loder config.
Versions Spring boot - 2.3.12, xercesImpl.jar - 2.12.2, xml-apis - 1.4, Websphere - 8.5, Class Loader : PARENT_LAST
Summarising - with xml-apis, app is not coming up. If we exclude xml-apis app is coming up but nothing working.
Looking for suggestions.
Thanks,