微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

java.lang.LinkageError:加载器约束冲突:解析方法时“org.apache.xerces.parsers.DOMParser.getDocument()Lorg/w3c/dom/Document

如何解决java.lang.LinkageError:加载器约束冲突:解析方法时“org.apache.xerces.parsers.DOMParser.getDocument()Lorg/w3c/dom/Document

在 Wildfly 服务器上部署 myfile.ear 后,我可以在服务器日志中看到此错误

我正在使用 17.0 野蝇 Java 版本是 1.8

Caused by: java.lang.LinkageError: loader constraint violation: when resolving method "org.apache.xerces.parsers.DOMParser.getDocument()Lorg/w3c/dom/Document;" the class loader (instance of org/jboss/modules/ModuleClassLoader) of the current class,xml/XMLDocument,and the class loader (instance of org/jboss/modules/ModuleClassLoader) for the method's defining class,org/apache/xerces/parsers/DOMParser,have different Class objects for the type org/w3c/dom/Document used in the signature
        at xml.XMLDocument.doParse(UnkNown Source)

有人可以帮助我了解可能导致这种情况的原因吗?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。