使用WebLogic解析XML时出现ClassCastException [英] ClassCastException while parsing XML with WebLogic
问题描述
我收到以下错误消息:
java.lang.ClassCastException:weblogic.xml.jaxp.RegistryDocumentBuilderFactory无法强制转换到javax.xml.parsers.DocumentBuilderFactory
java.lang.ClassCastException: weblogic.xml.jaxp.RegistryDocumentBuilderFactory cannot be cast to javax.xml.parsers.DocumentBuilderFactory
我经历了一些研究这个的论坛。他们说要删除 xml-apis.jar
或者说JAR文件存在冲突。但即使我完成了所有建议的步骤,我也会遇到同样的错误。
I've gone through some forums researching this. They said to remove xml-apis.jar
or that JAR files were conflicting. But even though I did all the suggested steps, I'm getting the same error.
推荐答案
它始终是 XML-apis.jar
。从类路径中删除它们(例如,从webapp的WEB-INF / lib中删除它们)。
It's always the xml-apis.jar
. Remove them from your classpath (e.g. remove them from WEB-INF/lib of your webapp).
这篇关于使用WebLogic解析XML时出现ClassCastException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!