Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-2129

Misleading exception when a Camel-CXF Service call times out (Null InputStream is not a valid argument)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 1.6.2, 2.1.0
    • camel-cxf
    • None

    Description

      We use camel-cxf and camel-jms to offer CXF services over SOAP/JMS.

      When the client calls the service by using the generated stub code and a timeout occurs I get an exception "Null InputStream is not a valid argument". I would rather expect something like "Timeout calling service". Full stack trace is attached below.

      The routing config is attached below.
      <client id="customerService" xmlns="http://cxf.apache.org/jaxws"
      xmlns:service="http://examples.etg.services.enbw.net/"
      serviceName="service:CustomerService"
      endpointName="service:CustomerServiceEndpoint"
      serviceClass="net.enbw.services.etg.examples.customerservice.CustomerServiceV1"
      address="camel://direct:client">
      </client>

      <camelContext id="camelContext" trace="false" xmlns="http://camel.apache.org/schema/spring">
      <route>
      <from uri="direct:client"/>
      <to uri="jms://queue.net.enbw.services.etg.examples.customerservice.CustomerService" />
      </route>
      </camelContext>

      ------
      03.11.2009 13:20:58 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
      WARNUNG: Interceptor has thrown exception, unwinding now
      java.lang.IllegalArgumentException: Null InputStream is not a valid argument
      at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:614)
      at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:324)
      at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:879)
      at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:83)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
      at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:664)
      at org.apache.camel.component.cxf.transport.CamelConduit$CamelOutputStream.handleResponse(CamelConduit.java:191)
      at org.apache.camel.component.cxf.transport.CamelConduit$CamelOutputStream.commitOutputMessage(CamelConduit.java:183)
      at org.apache.camel.component.cxf.transport.CamelConduit$CamelOutputStream.doClose(CamelConduit.java:153)
      at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:185)
      at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
      at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:478)
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:308)
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:260)
      at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
      at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
      at $Proxy63.readCustomersByName(Unknown Source)
      at net.enbw.endur.AppModule.doBusiness(AppModule.java:34)
      at net.enbw.endur.AppMain.main(AppMain.java:23)
      Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Null InputStream is not a valid argument
      at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:146)
      at $Proxy63.readCustomersByName(Unknown Source)
      at net.enbw.endur.AppModule.doBusiness(AppModule.java:34)
      at net.enbw.endur.AppMain.main(AppMain.java:23)
      Caused by: java.lang.IllegalArgumentException: Null InputStream is not a valid argument
      at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:614)
      at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:324)
      at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:879)
      at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:83)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
      at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:664)
      at org.apache.camel.component.cxf.transport.CamelConduit$CamelOutputStream.handleResponse(CamelConduit.java:191)
      at org.apache.camel.component.cxf.transport.CamelConduit$CamelOutputStream.commitOutputMessage(CamelConduit.java:183)
      at org.apache.camel.component.cxf.transport.CamelConduit$CamelOutputStream.doClose(CamelConduit.java:153)
      at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:185)
      at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
      at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:478)
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:308)
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:260)
      at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
      at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
      ... 3 more

      Attachments

        1. camel-core-2.0.0.patch
          0.8 kB
          Christian Schneider

        Activity

          People

            njiang Willem Jiang
            cschneider Christian Schneider
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: