报错信息如下:
weblogic.xml.jaxp.RegistrySAXParserFactory cannot be cast to javax.xml.parsers.SAXParserFactory
解决办法:
删除xml-apis-1.3.03 从WEB-INF/lib下 。
配置weblogic.xml ,强制weblogic 首先加载应用WEB-INF 中的class。内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app>
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
</weblogic-web-app>
直接将
weblogic.xml放到和web.xml同目录下就可以了。这样可以优先执行web-inf下的包或者类。可以解决包冲突的解决办法。
本文介绍了解决WebLogic中出现的特定错误的方法,即'weblogic.xml.jaxp.RegistrySAXParserFactorycannotbecasttojavax.xml.parsers.SAXParserFactory'。通过删除指定的xml-apis依赖并配置weblogic.xml文件来优先加载WEB-INF下的类,可以有效避免此类包冲突问题。

161

被折叠的 条评论
为什么被折叠?



