You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Christian Schneider (JIRA)" <ji...@apache.org> on 2009/11/03 14:01:52 UTC

[jira] Created: (CAMEL-2129) Misleading exception when a Camel-CXF Service call times out

Misleading exception when a Camel-CXF Service call times out
------------------------------------------------------------

                 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


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.


[jira] Commented: (CAMEL-2129) Misleading exception when a Camel-CXF Service call times out (Null InputStream is not a valid argument)

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55168#action_55168 ] 

Willem Jiang commented on CAMEL-2129:
-------------------------------------

@Christian
I rechecked to code of CamelConduit and found we should check the template's exception before we continue to process the message.
I will commit a quick patch for this. You should get a IOException with the cause message now.

> 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
>
> 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.


[jira] Commented: (CAMEL-2129) Misleading exception when a Camel-CXF Service call times out (Null InputStream is not a valid argument)

Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55170#action_55170 ] 

Christian Schneider commented on CAMEL-2129:
--------------------------------------------

Hi Willem,

could you change the two places where you throw the exception into:
  throw new IOException("Can't get the response message", ex);
instead of:
  throw new IOException("Can't get the response message. Caused by: " + ex);

and 

   throw new IOException("Can't get the response message", exchange.getException());
instead of 
   throw new IOException("Can't get the response message. Caused by " + exchange.getException());

This will forward the stack trace.

After this additional change when I simply start a cxf client that forwards its message to camel jms I get the exception below. This still does not look correct. The root cause is a nullpointer exception in SimpleMessageListenerContainer.doShutdown. The attributes consumers and sessions are null. The implementation does not check this though. This results in the throw ex not being executed:

if (ex != null) {
  stop(childrenStarted); <----- inside here we get the nullpointer ex
  throw ex; <---- So this exception is lost
}

As we can not directly fix this I think the way to fix the problem is catching this exception in camel.impl.ServiceSupport.stop. A try catch that ignores all errors should do the trick. 

org.apache.cxf.interceptor.Fault: Could not send Message.
	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:471)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:301)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:121)
	at $Proxy61.getCustomersByName(Unknown Source)
	at com.example.customerservice.impl.CustomerServiceClient.main(CustomerServiceClient.java:45)
Caused by: java.io.IOException: Can't get the response message
	at org.apache.camel.component.cxf.transport.CamelConduit$CamelOutputStream.commitOutputMessage(CamelConduit.java:186)
	at org.apache.camel.component.cxf.transport.CamelConduit$CamelOutputStream.doClose(CamelConduit.java:155)
	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:177)
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
	... 8 more
Caused by: org.apache.camel.FailedToCreateProducerException: Failed to create Producer for endpoint: Endpoint[jms://queue:CustomerService]. Reason: java.lang.NullPointerException
	at org.apache.camel.component.jms.JmsProducer.testAndSetRequestor(JmsProducer.java:116)
	at org.apache.camel.component.jms.JmsProducer.processInOut(JmsProducer.java:175)
	at org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:147)
	at org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:81)
	at org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:79)
	at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:141)
	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:78)
	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:61)
	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:61)
	at org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:186)
	at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:155)
	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:88)
	at org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49)
	at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:148)
	at org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:54)
	at org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)
	at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:45)
	at org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:170)
	at org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:156)
	at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:141)
	at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:155)
	at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:111)
	at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:101)
	at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:88)
	at org.apache.camel.component.cxf.transport.CamelConduit$CamelOutputStream.commitOutputMessage(CamelConduit.java:172)
	... 12 more
Caused by: java.lang.NullPointerException
	at org.springframework.jms.listener.SimpleMessageListenerContainer.doShutdown(SimpleMessageListenerContainer.java:304)
	at org.springframework.jms.listener.AbstractJmsListeningContainer.shutdown(AbstractJmsListeningContainer.java:211)
	at org.springframework.jms.listener.AbstractJmsListeningContainer.destroy(AbstractJmsListeningContainer.java:149)
	at org.apache.camel.component.jms.requestor.Requestor.doStop(Requestor.java:212)
	at org.apache.camel.impl.ServiceSupport.stop(ServiceSupport.java:74)
	at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:57)
	at org.apache.camel.component.jms.JmsProducer.testAndSetRequestor(JmsProducer.java:108)
	... 36 more


> 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
>
>
> 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.


[jira] Commented: (CAMEL-2129) Misleading exception when a Camel-CXF Service call times out (Null InputStream is not a valid argument)

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55171#action_55171 ] 

Willem Jiang commented on CAMEL-2129:
-------------------------------------

@Christian
JDK 1.5 doesn't provide the construction method of IOException like this
IOException(String message, Throwable t);

So I took the advise of Claus to use the utils method of camel to create IOException like this
{code}
IOException cause = new IOException("xxxx"):
cause.initCause(e);
{code}

Can you try out the last trunk code which contains my change to verify it ?


> 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
>
>
> 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.


[jira] Resolved: (CAMEL-2129) Misleading exception when a Camel-CXF Service call times out (Null InputStream is not a valid argument)

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang resolved CAMEL-2129.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.0
                   1.6.2

trunk
http://svn.apache.org/viewvc?rev=832981&view=rev
camel 1.x branch
http://svn.apache.org/viewvc?rev=832983&view=rev

> 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
>
>
> 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.


[jira] Issue Comment Edited: (CAMEL-2129) Misleading exception when a Camel-CXF Service call times out (Null InputStream is not a valid argument)

Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55170#action_55170 ] 

Christian Schneider edited comment on CAMEL-2129 at 11/5/09 12:28 AM:
----------------------------------------------------------------------

Hi Willem,

could you change the two places where you throw the exception into:
  throw new IOException("Can't get the response message", ex);
instead of:
  throw new IOException("Can't get the response message. Caused by: " + ex);

and 

   throw new IOException("Can't get the response message", exchange.getException());
instead of 
   throw new IOException("Can't get the response message. Caused by " + exchange.getException());

This will forward the stack trace.

After this additional change when I simply start a cxf client that forwards its message to camel jms I get the exception below. This still does not look correct. The root cause is a nullpointer exception in SimpleMessageListenerContainer.doShutdown. The attributes consumers and sessions are null. The implementation does not check this though. This results in the throw ex not being executed:

if (ex != null) {

  stop(childrenStarted); <----- inside here we get the nullpointer ex

  throw ex; <---- So this exception is lost

}

As we can not directly fix this I think the way to fix the problem is catching this exception in camel.impl.ServiceSupport.stop. A try catch that ignores all errors should do the trick. 

org.apache.cxf.interceptor.Fault: Could not send Message.
	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:471)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:301)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:121)
	at $Proxy61.getCustomersByName(Unknown Source)
	at com.example.customerservice.impl.CustomerServiceClient.main(CustomerServiceClient.java:45)
Caused by: java.io.IOException: Can't get the response message
	at org.apache.camel.component.cxf.transport.CamelConduit$CamelOutputStream.commitOutputMessage(CamelConduit.java:186)
	at org.apache.camel.component.cxf.transport.CamelConduit$CamelOutputStream.doClose(CamelConduit.java:155)
	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:177)
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
	... 8 more
Caused by: org.apache.camel.FailedToCreateProducerException: Failed to create Producer for endpoint: Endpoint[jms://queue:CustomerService]. Reason: java.lang.NullPointerException
	at org.apache.camel.component.jms.JmsProducer.testAndSetRequestor(JmsProducer.java:116)
	at org.apache.camel.component.jms.JmsProducer.processInOut(JmsProducer.java:175)
	at org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:147)
	at org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:81)
	at org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:79)
	at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:141)
	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:78)
	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:61)
	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:61)
	at org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:186)
	at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:155)
	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:88)
	at org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49)
	at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:148)
	at org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:54)
	at org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)
	at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:45)
	at org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:170)
	at org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:156)
	at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:141)
	at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:155)
	at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:111)
	at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:101)
	at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:88)
	at org.apache.camel.component.cxf.transport.CamelConduit$CamelOutputStream.commitOutputMessage(CamelConduit.java:172)
	... 12 more
Caused by: java.lang.NullPointerException
	at org.springframework.jms.listener.SimpleMessageListenerContainer.doShutdown(SimpleMessageListenerContainer.java:304)
	at org.springframework.jms.listener.AbstractJmsListeningContainer.shutdown(AbstractJmsListeningContainer.java:211)
	at org.springframework.jms.listener.AbstractJmsListeningContainer.destroy(AbstractJmsListeningContainer.java:149)
	at org.apache.camel.component.jms.requestor.Requestor.doStop(Requestor.java:212)
	at org.apache.camel.impl.ServiceSupport.stop(ServiceSupport.java:74)
	at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:57)
	at org.apache.camel.component.jms.JmsProducer.testAndSetRequestor(JmsProducer.java:108)
	... 36 more


      was (Author: chris@die-schneider.net):
    Hi Willem,

could you change the two places where you throw the exception into:
  throw new IOException("Can't get the response message", ex);
instead of:
  throw new IOException("Can't get the response message. Caused by: " + ex);

and 

   throw new IOException("Can't get the response message", exchange.getException());
instead of 
   throw new IOException("Can't get the response message. Caused by " + exchange.getException());

This will forward the stack trace.

After this additional change when I simply start a cxf client that forwards its message to camel jms I get the exception below. This still does not look correct. The root cause is a nullpointer exception in SimpleMessageListenerContainer.doShutdown. The attributes consumers and sessions are null. The implementation does not check this though. This results in the throw ex not being executed:

if (ex != null) {
  stop(childrenStarted); <----- inside here we get the nullpointer ex
  throw ex; <---- So this exception is lost
}

As we can not directly fix this I think the way to fix the problem is catching this exception in camel.impl.ServiceSupport.stop. A try catch that ignores all errors should do the trick. 

org.apache.cxf.interceptor.Fault: Could not send Message.
	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:471)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:301)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:121)
	at $Proxy61.getCustomersByName(Unknown Source)
	at com.example.customerservice.impl.CustomerServiceClient.main(CustomerServiceClient.java:45)
Caused by: java.io.IOException: Can't get the response message
	at org.apache.camel.component.cxf.transport.CamelConduit$CamelOutputStream.commitOutputMessage(CamelConduit.java:186)
	at org.apache.camel.component.cxf.transport.CamelConduit$CamelOutputStream.doClose(CamelConduit.java:155)
	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:177)
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
	... 8 more
Caused by: org.apache.camel.FailedToCreateProducerException: Failed to create Producer for endpoint: Endpoint[jms://queue:CustomerService]. Reason: java.lang.NullPointerException
	at org.apache.camel.component.jms.JmsProducer.testAndSetRequestor(JmsProducer.java:116)
	at org.apache.camel.component.jms.JmsProducer.processInOut(JmsProducer.java:175)
	at org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:147)
	at org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:81)
	at org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:79)
	at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:141)
	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:78)
	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:61)
	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:61)
	at org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:186)
	at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:155)
	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:88)
	at org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49)
	at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:148)
	at org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:54)
	at org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)
	at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:45)
	at org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:170)
	at org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:156)
	at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:141)
	at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:155)
	at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:111)
	at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:101)
	at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:88)
	at org.apache.camel.component.cxf.transport.CamelConduit$CamelOutputStream.commitOutputMessage(CamelConduit.java:172)
	... 12 more
Caused by: java.lang.NullPointerException
	at org.springframework.jms.listener.SimpleMessageListenerContainer.doShutdown(SimpleMessageListenerContainer.java:304)
	at org.springframework.jms.listener.AbstractJmsListeningContainer.shutdown(AbstractJmsListeningContainer.java:211)
	at org.springframework.jms.listener.AbstractJmsListeningContainer.destroy(AbstractJmsListeningContainer.java:149)
	at org.apache.camel.component.jms.requestor.Requestor.doStop(Requestor.java:212)
	at org.apache.camel.impl.ServiceSupport.stop(ServiceSupport.java:74)
	at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:57)
	at org.apache.camel.component.jms.JmsProducer.testAndSetRequestor(JmsProducer.java:108)
	... 36 more

  
> 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
>
>
> 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.


[jira] Assigned: (CAMEL-2129) Misleading exception when a Camel-CXF Service call times out (Null InputStream is not a valid argument)

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang reassigned CAMEL-2129:
-----------------------------------

    Assignee: Willem Jiang

> 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
>
> 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.


[jira] Issue Comment Edited: (CAMEL-2129) Misleading exception when a Camel-CXF Service call times out (Null InputStream is not a valid argument)

Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55143#action_55143 ] 

Christian Schneider edited comment on CAMEL-2129 at 11/3/09 5:06 AM:
---------------------------------------------------------------------

The same exception appears if the jms server is not started. In this case I would expect an exception like "JMS Component could not connect to jms server". At least shortly after this exception an info message is logged that says "Could not refresh JMS Connection".

Stack trace:
-- 
03.11.2009 14:03:42 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:25)
	at net.enbw.endur.AppMain.main(AppMain.java:23)
14:05:09,213 INFO  org.springframework.jms.listener.DefaultMessageListenerContainer refreshConnectionUntilSuccessful - Could not refresh JMS Connection - retrying in 100000 ms: javax.jms.JMSException: Failed to connect to the server at tcp://localhost:7222


      was (Author: chris@die-schneider.net):
    The same exception appears if the jms server is not started. In this case I would expect an exception like "JMS Component could not connect to jms server"
  
> 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
>
> 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.


[jira] Commented: (CAMEL-2129) Misleading exception when a Camel-CXF Service call times out (Null InputStream is not a valid argument)

Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55143#action_55143 ] 

Christian Schneider commented on CAMEL-2129:
--------------------------------------------

The same exception appears if the jms server is not started. In this case I would expect an exception like "JMS Component could not connect to jms server"

> 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
>
> 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.


[jira] Updated: (CAMEL-2129) Misleading exception when a Camel-CXF Service call times out (Null InputStream is not a valid argument)

Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

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

> 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
>
> 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.


[jira] Reopened: (CAMEL-2129) Misleading exception when a Camel-CXF Service call times out (Null InputStream is not a valid argument)

Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Schneider reopened CAMEL-2129:
----------------------------------------


I have tested your new patch. Looks good to me but we should still fix the bug that causes the "Could not connect to broker" to be swallowed. I will add a patch for this.

> 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
>
>
> 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.


[jira] Resolved: (CAMEL-2129) Misleading exception when a Camel-CXF Service call times out (Null InputStream is not a valid argument)

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang resolved CAMEL-2129.
---------------------------------

    Resolution: Fixed

Applied the patch with thanks to Christian
trunk
http://svn.apache.org/viewvc?rev=833285&view=rev
camel 1.x branch
http://svn.apache.org/viewvc?rev=833288&view=rev

> 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.


[jira] Closed: (CAMEL-2129) Misleading exception when a Camel-CXF Service call times out (Null InputStream is not a valid argument)

Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Schneider closed CAMEL-2129.
--------------------------------------


> 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.


[jira] Updated: (CAMEL-2129) Misleading exception when a Camel-CXF Service call times out (Null InputStream is not a valid argument)

Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
     [ 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.