UT005023: Exception handling request to ... AbstractMethodError: org.apache.xerces.dom.DeferredDocumentImpl.setXmlStandalone in JBoss EAP 7
Environment
Red Hat JBoss Enterprise Application Platform (EAP) 7
Issue
- Our JAXWS Application is logging this error when we try to get the wsdl : http://localhost:8080/helloWorld?wsdl
19:28:45,537 ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /helloWorld: java.lang.AbstractMethodError: org.apache.xerces.dom.DeferredDocumentImpl.setXmlStandalone(Z)V
at org.apache.cxf.frontend.WSDLGetUtils.updateDoc(WSDLGetUtils.java:332)
at org.apache.cxf.frontend.WSDLGetUtils.writeWSDLDocument(WSDLGetUtils.java:708)
at org.apache.cxf.frontend.WSDLGetUtils.getDocument(WSDLGetUtils.java:151)
at org.apache.cxf.frontend.WSDLGetInterceptor.getDocument(WSDLGetInterceptor.java:129)
at org.apache.cxf.frontend.WSDLGetInterceptor.handleMessage(WSDLGetInterceptor.java:77)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:110)
at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:134)
at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:88)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:301)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:225)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:503)
at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:136)
at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:590)
Resolution
Remove the old Xerces jar from the application or depend on the org.apache.xerces module which effectively ignores the xerces packaged in the application.
Example: jboss-deployment-structure.xml:
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
<deployment>
<dependencies>
<module name="org.apache.xerces" />
</dependencies>
</deployment>
</jboss-deployment-structure>
Root Cause
The application is packaging an incompatible JAXP implementation jar (such as an old xerces.jar)
Diagnostic Steps
The tattletale tool mentioned in the article below can create a report showing if the application is packaging the class org.apache.xerces.dom.DeferredDocumentImpl
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.