当我们在类路径中具有XML-APIS依赖关系时,Spring Boot应用程序不会在WebSphere 8.5中出现。班级加载程序是parent_last

发布于 2025-01-21 20:23:06 字数 1188 浏览 0 评论 0原文

在Spring Boot应用程序中,我们取决于SAX XML解析器和推土机映射器。因此,我们使用的是Xercesimpl.jar,其内部具有XML-APIS作为依赖关系。
当我们安装和运行应用程序时,给出下面的例外,

java.lang.runtimeException:xPathFactory#newInstance()未能为默认对象模型创建XPathFactory: http://java.sun.com/jaxp/jaxp/xpath/dom 与xpathfactoryconfigurationexpection:javax.xml.xml.xml.xpath.xpath.xpathfactoryconfactoryconfigurationexception:no xpatheration:no xpathfctory:no为对象模型找到的实现: http://java.sun.com/jaxp/jaxp/jaxp/xpath/domdom/domdom 在javax.xml.xpath.xpath.xpathfactory.newinstance(未知来源)

,当我排除XML-apis依赖性时,App即将上升,但是它未能加载Dorker XMLS,而下面的exception

java.lang.lang.noclang.noclassdefferderror: org/w3c/dom/elementTraversal

我们已经将应用程序类加载程序配置设置为parent的最后一个spring boot 2.3.12与父级loder config发生冲突。

版本 春季靴子-2.3.12, xercesimpl.jar -2.12.2, xml -apis -1.4, WebSphere -8.5, class loader:parent_last

总结 - 使用XML -apis,应用程序不会出现。如果我们排除了XML-APIS应用程序即将出现,但无效。

寻找建议。

谢谢,

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,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文