代码整合异常信息本地代码启动正常,但是上传到服务器以后,整合以前的老代码就出现此异常:loader constraint violation: when resolving interface method "org.w3c.dom.Node.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/Object;" the class loader (instance of weblogic/utils/classloaders/ChangeAwareClassLoader) of the current class, org/apache/cxf/staxutils/StaxUtils, and the class loader (instance of <bootloader>) for resolved class, org/w3c/dom/Node, have different Class objects for the type org/w3c/dom/UserDataHandler used in the signature
一句话不懂问度娘,然后百度各种说法都有,说是jar冲突了需要删除包含Node的jar包或者找到StaxUtils的源码注掉冲突的地方,然后重新打包---没有测试,可供参考...
第二种方案就是删除jaxrpc.jar stax-api-1.0.1.jar里的相关内容--未测试,可供参考
第三种方法问了我的老师,说是jar冲突了,是版本不一致问题,这个查起来很麻烦,不想整
最后是设置jar的调用优先级设置在WEB_INFO下引用weblogic.xml配置
<container-descriptor>
<index-directory-enabled>true</index-directory-enabled>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
BG:问题所在,我本地代码就是没有这段,而服务器上有这段,如果没有添加再试,如果有这注掉再试,问题处理
希望遇到此类问题的朋友,该文章对你有用.....