HTTP Status 500 - Handler processing failed; nested exception is java.lang.AbstractMethodError: org.apache.xerces.dom.ElementNSImpl.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/Object;
type Exception report
message Handler processing failed; nested exception is java.lang.AbstractMethodError: org.apache.xerces.dom.ElementNSImpl.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/Object;
description The server encountered an internal error that prevented it from fulfilling this request.
exception
org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.AbstractMethodError: org.apache.xerces.dom.ElementNSImpl.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/Object; org.springframework.web.servlet.DispatcherServlet.triggerAfterCompletionWithError(DispatcherServlet.java:1280) org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:958) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852) javax.servlet.http.HttpServlet.service(HttpServlet.java:618) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837) javax.servlet.http.HttpServlet.service(HttpServlet.java:725) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:232) net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:209) com.iron.air.module.elb.filters.CorsFilter.doFilter(CorsFilter.java:135) com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)
root cause
java.lang.AbstractMethodError: org.apache.xerces.dom.ElementNSImpl.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/Object; org.apache.cxf.staxutils.StaxUtils.addLocation(StaxUtils.java:1189) org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:1077) org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:1050) org.apache.cxf.staxutils.StaxUtils.read(StaxUtils.java:977) org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:234) org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:192) org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:78) org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:292) org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:235) org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:228) org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:183) com.iron.air.module.inventory.resource.InventoryResource.syncHisDrugInventory(InventoryResource.java:102) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215) org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132) org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749) org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689) org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83) org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852) javax.servlet.http.HttpServlet.service(HttpServlet.java:618) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837) javax.servlet.http.HttpServlet.service(HttpServlet.java:725) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:232) net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:209) com.iron.air.module.elb.filters.CorsFilter.doFilter(CorsFilter.java:135) com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)
note The full stack trace of the root cause is available in the Apache Tomcat/8.0.9 logs.
发现 war 包中 WEB-INF\lib 存在:xercesImpl-2.6.2.jar 与 xml-apis-1.0.b2.jar 冲突了。
不知道是什么哪个jar包的引用引起的。
解决办法:升级 xercesImpl 版本。
<dependency> <groupId>xerces</groupId> <artifactId>xercesImpl</artifactId> <version>2.9.1</version></dependency>
原文地址:https://www.cnblogs.com/vipsoft/p/10562026.html