CXF:java.lang.AbstractMethodError:org.apache.xerces.dom.ElementNSImpl.setUserData
来源:互联网 发布:win10蓝牙 浏览软件 编辑:程序博客网 时间:2024/05/22 02:13
前言:
在一个JavaWeb项目中,要接入WebService时,使用CXF,但是接入的时候出现异常:
java.lang.AbstractMethodError: org.apache.xerces.dom.ElementNSImpl.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/Object;at org.apache.cxf.staxutils.StaxUtils.addLocation(StaxUtils.java:1133)at org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:1021)at org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:994)at org.apache.cxf.staxutils.StaxUtils.read(StaxUtils.java:921)at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:231)
解决过程:
根据网上查找的答案,是因为xerces-2.6.2.jar这个jar包冲突,将xerces升级到2.8以上版本就不会有这个问题。
1、将xerces-2.6.2.jar从项目中删除。
2、因为本项目是maven项目,直接在pom.xml中添加2.8版本的xerces依赖
<dependency> <groupId>xerces</groupId> <artifactId>xercesImpl</artifactId> <version>2.8.0</version></dependency>
3、重新运行项目,异常解决成功!
阅读全文
0 0
- CXF:java.lang.AbstractMethodError:org.apache.xerces.dom.ElementNSImpl.setUserData
- org.apache.xerces.dom.ElementNSImpl.setUserData
- java.lang.AbstractMethodError: org.apache.xerces.dom.DocumentImpl.setXmlVersion
- 关于java.lang.AbstractMethodError: org.apache.xerces.dom.DocumentImpl.setXmlVersion问题的解决
- 错误解决:java.lang.ClassCastException: org.apache.xerces.dom.DeferredDocumentImpl
- java.lang.ClassCastException: com.sun.org.apache.xerces.internal.dom.DeferredTextImpl cannot be cas
- java.lang.ClassCastException: com.sun.org.apache.xerces.internal.dom.DeferredCommentImpl cannot be c
- 报错:java.lang.AbstractMethodError: org.apache.commons.dbcp.PoolingDataSource...
- java.lang.AbstractMethodError: org.apache.bval.jsr303.ConfigurationImpl.getDefaultParameterName....
- weblogic10.3 java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
- weblogic10.3 java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
- Caused by: java.lang.NoClassDefFoundError: org/apache/xerces/util/EncodingMap
- java.lang.ClassNotFoundException:org.apache.xerces.parsers.SAXParser
- java.lang.NoClassDefFoundError: org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl$DaysInMonth
- java.lang.ClassNotFoundException: org/apache/xerces/parsers/SAXParser
- 配置Paoding分词时出现的错误:java.lang.AbstractMethodError: org.apache.lucene.analysis.TokenStream.incrementToken()
- 配置Paoding分词时出现的错误:java.lang.AbstractMethodError: org.apache.lucene.analysis.TokenStream.incrementTo
- java.lang.ClassNotFoundException: org.apache.cxf.transport.servlet.CXFServlet
- LeetCode-290-Word Pattern
- mongodb 分片与副本集
- html a标签打电话,发短信等。
- 第八周项目2-顺序串算法(2)
- 移植到64位应用程序出现0xc00007b的解决办法
- CXF:java.lang.AbstractMethodError:org.apache.xerces.dom.ElementNSImpl.setUserData
- Spring中AOP详解
- iOS-【转载】震惊!iOS 系统居然自带悬浮窗口调试工具
- 我的Linux系统入坑之路
- 第7周项目4- 队列数组
- 第8周项目2
- 《由浅到深使用回调函数 3》(有参回调函数)
- weblogic常用监控指标
- java list之ArrayList与Vector的区别