ClassCastException:org.apache.xerces.jaxp.DocumentBuilderFactoryImpl与javax.xml.parsers.DocumentBuilderFactory不兼容
我在尝试将应用程序部署到Websphere时遇到以下错误 ClassCastException:org.apache.xerces.jaxp.DocumentBuilderFactoryImpl与javax.xml.parsers.DocumentBuilderFactory不兼容 如果排除ClassCastException:org.apache.xerces.jaxp.DocumentBuilderFactoryImpl与javax.xml.parsers.DocumentBuilderFactory不兼容,java,jasper-reports,websphere,classcastexception,xerces,Java,Jasper Reports,Websphere,Classcastexception,Xerces,我在尝试将应用程序部署到Websphere时遇到以下错误 ClassCastException:org.apache.xerces.jaxp.DocumentBuilderFactoryImpl与javax.xml.parsers.DocumentBuilderFactory不兼容 如果排除xmlapi依赖项,则会出现以下错误 NoClassDefFoundError:com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl 该应用程序使
xmlapi
依赖项,则会出现以下错误
NoClassDefFoundError:com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl
该应用程序使用以下命令
- WebSphere8.5
- 爪哇7
- jasperreports 6.1.0
你有NoClassDefFoundError的堆栈吗?还有。。。你真的需要加载父类吗?您很少需要使用自己的JAXP/JAXB实现,并且使用parent first几乎肯定会消除这个问题(因为所有内容都将委托给父加载程序,所有版本的XML类都将来自一致的类加载程序)。