[ 
https://issues.apache.org/activemq/browse/CAMEL-2129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christian Schneider updated CAMEL-2129:
---------------------------------------

    Attachment: camel-core-2.0.0.patch

This is a patch for camel core done on basis of camel 2.0.0. The bug is in 
ServiceSupport.start().
After an exception happens it tries to stop the service without catch possible 
exceptions the could happen inside the stop method. I just added a try catch 
and ignored any exceptions. A comment explains why the catch is empty.

> Misleading exception when a Camel-CXF Service call times out (Null 
> InputStream is not a valid argument)
> -------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2129
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2129
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.0.0
>            Reporter: Christian Schneider
>            Assignee: Willem Jiang
>             Fix For: 1.6.2, 2.1.0
>
>         Attachments: camel-core-2.0.0.patch
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to