CXF on JBoss AS7: NoClassDefFoundError: com/ctc/wstx/io/DefaultInputResolver

Today we encountered a classloading problem in JBoss AS 7.1.1 while using JAX-WS. JBoss uses CXF as its JAX-WS implementation and CXF in turn depends on Woodstox as its default StAX implementation. The problem was that JBoss failed to load Woodstox now and then when parsing SOAP requests. The full stacktrace:

10:34:57,037 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/xxxx-ws].[xxxxWebservice]] (http-- Servlet.service() for servlet xxxxWebservice threw exception: java.lang.NoClassDefFoundError: com/ctc/wstx/io/DefaultInputResolver
at com.ctc.wstx.stax.WstxInputFactory.createSR( [woodstox-core-asl-4.1.1.jar:4.1.1]
at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader( [woodstox-core-asl-4.1.1.jar:4.1.1]
at _redirected.XMLInputFactory.createXMLStreamReader( [jboss-modules.jar:1.1.1.GA]
at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader( [cxf-common-utilities-2.4.6.jar:2.4.6]
at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage( [cxf-rt-core-2.4.6.jar:2.4.6]
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept( [cxf-api-2.4.6.jar:2.4.6]
at org.apache.cxf.transport.ChainInitiationObserver.onMessage( [cxf-rt-core-2.4.6.jar:2.4.6]
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke( [cxf-rt-transports-http-2.4.6.jar:2.4.6]
at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(
at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(
at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest( [cxf-rt-transports-http-2.4.6.jar:2.4.6]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost( [cxf-rt-transports-http-2.4.6.jar:2.4.6]
at javax.servlet.http.HttpServlet.service( [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.jboss.wsf.stack.cxf.CXFServletExt.service(
at org.jboss.wsf.spi.deployment.WSFServlet.service( [jbossws-spi-2.0.3.GA.jar:2.0.3.GA]
at javax.servlet.http.HttpServlet.service( [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

It looked like a Heisenbug at first but after a while we noticed a pattern: It only seemed to occur after undeploying and then redeploying the application on a running server. The issue didn’t occur after cold server restarts as well as hot (re)deployments. We needed an explicit undeployment first.


The CXF module in JBoss is missing an import of Woodstox. Open $JBOSS_HOME/modules/org/apache/cxf/main/module.xml and add the following import to the list of dependencies:

    <module name="org.codehaus.woodstox" />

I believe this to be a bug in JBoss AS7 and will file a bug report shortly.


  • Facebook
  • LinkedIn

2 thoughts on “CXF on JBoss AS7: NoClassDefFoundError: com/ctc/wstx/io/DefaultInputResolver

  1. Hi Florian,

    I have to dig deep since it’s been over a year since we encountered this issue. If I recall correctly we haven’t filed a bug report (yet). We were still verifying if the proposed solution fixes the whole issue. Feel free to create one yourself.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>