Uploaded image for project: 'ServiceMix 4'
  1. ServiceMix 4
  2. SMX4-1314

CXF NMR transport throws NPE when it handles the fault message

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.4.2
    • 4.4.3, 4.5.0
    • cxf-nmr
    • None

    Description

      When the user has a Camel route which has CXF Endpoints using the NMR transport. They have a camel processor which throws an exception and when using the NMR transports the client times out and receives:
      EXCEPTION: null

      java.lang.NullPointerException 
      at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:439) 
      at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:424) 
      at org.apache.servicemix.cxf.transport.nmr.NMRMessageHelper.convertMessageToInputStream(NMRMessageHelper.java:43)
      at org.apache.servicemix.cxf.transport.nmr.NMRConduitOutputStream.commitOutputMessage(NMRConduitOutputStream.java:172)
      at org.apache.servicemix.cxf.transport.nmr.NMRConduitOutputStream.doClose(NMRConduitOutputStream.java:84)
      at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:184) 
      at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
      at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:187) 
      at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) 
      at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
      at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:533) 
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463) 
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366) 
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319) 
      at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:88) 
      at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134) 
      at $Proxy131.talk(Unknown Source) 
      at test.CompositeProcessor.process(CompositeProcessor.java:13) 
      at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) 
      at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) 
      at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
      at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:71)
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) 
      at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
      at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) 
      at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
      at org.apache.camel.fabric.FabricTraceProcessor.process(FabricTraceProcessor.java:81) 
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) 
      at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:330)
      at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)
      at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
      at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:304)
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) 
      at org.apache.camel.processor.Pipeline.process(Pipeline.java:117) 
      at org.apache.camel.processor.Pipeline.process(Pipeline.java:80) 
      at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
      at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
      at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
      at org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:50)
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) 
      at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
      at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:71)
      at org.apache.camel.component.jetty.CamelContinuationServlet.service(CamelContinuationServlet.java:113)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) 
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:547) 
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1359)
      at org.eclipse.jetty.servlets.MultiPartFilter.doFilter(MultiPartFilter.java:97) 
      at org.apache.camel.component.jetty.CamelFilterWrapper.doFilter(CamelFilterWrapper.java:44)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1330)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:478) 
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:941)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:409) 
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:875) 
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) 
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110) 
      at org.eclipse.jetty.server.Server.handle(Server.java:349) 
      at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441) 
      at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:919)
      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:582) 
      at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218) 
      at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:51) 
      at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:586)
      at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:44) 
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598) 
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533) 
      at java.lang.Thread.run(Thread.java:680)
      

      Attachments

        Activity

          People

            njiang Willem Jiang
            njiang Willem Jiang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: