You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Jérôme Lelong <ar...@gmail.com> on 2011/06/08 20:23:08 UTC
Stream is closed exception when calling CXF WS
Hi,
When i call a CXF WS, an exception (Stream is closed) is thrown.
In my search i have found a Jira, but i don't know if it's the same problem
?
https://issues.apache.org/jira/browse/CXF-3554
Could you help me, or provide me way to analyse the problem ?
Thanks
Jérôme
========================= Route Builder =====
from("file://in/to_archive")
.process(new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
final List<String> params = new ArrayList<String>();
params.add("C:/Perso/Dev/EsbPOC/ptf_confiance/project/readmie.txt");
exchange.getIn().setBody(params);
exchange.getIn().setHeader("operationName", "archiveFile");
}})
.to("cxf:bean:vaultServiceEndpoint");
Nota : from("file...") is only to start calling webservice for my tests,
nothing is done with the file for the moment.
========================= Client cxfEndpoint declaration ====
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:cxf="http://cxf.apache.org/core"
xmlns:camel-cxf="http://camel.apache.org/schema/cxf"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
http://camel.apache.org/schema/cxf
http://camel.apache.org/schema/cxf/camel-cxf.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd ">
<cxf:bus>
<cxf:features>
<cxf:logging/>
</cxf:features>
</cxf:bus>
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-http.xml" />
<bean id="testIntegrationRouteBuilder"
class="com.sts.confiance.test.TestIntegrationRouteBuilder" />
<camelContext xmlns="http://camel.apache.org/schema/spring"
trace="true">
<routeBuilder ref="testIntegrationRouteBuilder" />
</camelContext>
<camel-cxf:cxfEndpoint
id="vaultServiceEndpoint"
address="http://localhost:9000/vaultService"
serviceClass="com.sts.confiance.vault.ws.VaultWSService">
</camel-cxf:cxfEndpoint>
</beans>
========================= The exception ====
20:13:15,147 | ERROR | ://in/to_archive | ache.camel.processor.CamelLogger
232 | 55 - org.apache.camel.camel-core - 2.7.1 | Failed delivery for
exchangeId: ID-LGOP018-3563-1307538693903-13-15212. Exhausted after delivery
attempt: 1 caught: org.apache.cxf.interceptor.Fault: Could not send Message.
org.apache.cxf.interceptor.Fault: Could not send Message.
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)[124:org.apache.cxf.bundle:2.4.0]
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)[124:org.apache.cxf.bundle:2.4.0]
at
org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:484)[124:org.apache.cxf.bundle:2.4.0]
at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:407)[124:org.apache.cxf.bundle:2.4.0]
at
org.apache.camel.component.cxf.CxfProducer.process(CxfProducer.java:94)[125:org.apache.camel.camel-cxf:2.7.1]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)[55:org.apache.camel.camel-core:2.7.1]
at
org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104)[55:org.apache.camel.camel-core:2.7.1]
at
org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)[55:org.apache.camel.camel-core:2.7.1]
at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)[55:org.apache.camel.camel-core:2.7.1]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)[55:org.apache.camel.camel-core:2.7.1]
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[55:org.apache.camel.camel-core:2.7.1]
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[55:org.apache.camel.camel-core:2.7.1]
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[55:org.apache.camel.camel-core:2.7.1]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)[55:org.apache.camel.camel-core:2.7.1]
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[55:org.apache.camel.camel-core:2.7.1]
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[55:org.apache.camel.camel-core:2.7.1]
at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:174)[55:org.apache.camel.camel-core:2.7.1]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)[55:org.apache.camel.camel-core:2.7.1]
at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[55:org.apache.camel.camel-core:2.7.1]
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[55:org.apache.camel.camel-core:2.7.1]
at
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:269)[55:org.apache.camel.camel-core:2.7.1]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)[55:org.apache.camel.camel-core:2.7.1]
at
org.apache.camel.processor.Pipeline.process(Pipeline.java:125)[55:org.apache.camel.camel-core:2.7.1]
at
org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[55:org.apache.camel.camel-core:2.7.1]
at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:109)[55:org.apache.camel.camel-core:2.7.1]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)[55:org.apache.camel.camel-core:2.7.1]
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[55:org.apache.camel.camel-core:2.7.1]
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[55:org.apache.camel.camel-core:2.7.1]
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[55:org.apache.camel.camel-core:2.7.1]
at
org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:330)[55:org.apache.camel.camel-core:2.7.1]
at
org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:157)[55:org.apache.camel.camel-core:2.7.1]
at
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:121)[55:org.apache.camel.camel-core:2.7.1]
at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97)[55:org.apache.camel.camel-core:2.7.1]
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_16]
at
java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_16]
at
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[:1.6.0_16]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[:1.6.0_16]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)[:1.6.0_16]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)[:1.6.0_16]
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_16]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_16]
at java.lang.Thread.run(Thread.java:619)[:1.6.0_16]
Caused by: java.io.IOException: IOException invoking
http://localhost:9000/vaultService: Stream is closed
at sun.reflect.GeneratedConstructorAccessor54.newInstance(Unknown
Source)[:1.6.0_16]
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)[:1.6.0_16]
at
java.lang.reflect.Constructor.newInstance(Constructor.java:513)[:1.6.0_16]
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1385)[124:org.apache.cxf.bundle:2.4.0]
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1370)[124:org.apache.cxf.bundle:2.4.0]
at
org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)[124:org.apache.cxf.bundle:2.4.0]
at
org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)[124:org.apache.cxf.bundle:2.4.0]
at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)[124:org.apache.cxf.bundle:2.4.0]
at
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:614)[124:org.apache.cxf.bundle:2.4.0]
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)[124:org.apache.cxf.bundle:2.4.0]
... 41 more
Caused by: java.io.IOException: Stream is closed
at
sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.checkError(HttpURLConnection.java:2639)[:1.6.0_16]
at
sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:2628)[:1.6.0_16]
at
org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:46)[124:org.apache.cxf.bundle:2.4.0]
at
org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69)[124:org.apache.cxf.bundle:2.4.0]
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1342)[124:org.apache.cxf.bundle:2.4.0]
... 46 more
Re: Stream is closed exception when calling CXF WS
Posted by Jérôme Lelong <ar...@gmail.com>.
Hello,
Thanks a lot, that's work for me now.
Jérôme
2011/6/9 Willem Jiang <wi...@gmail.com>
> Hi,
>
> It's a bug of CXF, you can work around it by changing the log level setting
> on the HTTPConduit.
> You can find more information here[1]
>
> [1]https://issues.apache.org/**jira/browse/CXF-3466<https://issues.apache.org/jira/browse/CXF-3466>
>
>
> On 6/9/11 2:23 AM, Jérôme Lelong wrote:
>
>> Hi,
>>
>> When i call a CXF WS, an exception (Stream is closed) is thrown.
>>
>> In my search i have found a Jira, but i don't know if it's the same
>> problem
>> ?
>> https://issues.apache.org/**jira/browse/CXF-3554<https://issues.apache.org/jira/browse/CXF-3554>
>>
>> Could you help me, or provide me way to analyse the problem ?
>>
>> Thanks
>>
>> Jérôme
>>
>>
>
> --
> Willem
> ------------------------------**----
> FuseSource
> Web: http://www.fusesource.com
> Blog: http://willemjiang.blogspot.**com<http://willemjiang.blogspot.com>(English)
> http://jnn.javaeye.com (Chinese)
> Twitter: willemjiang
> Weibo: willemjiang
>
Re: Stream is closed exception when calling CXF WS
Posted by Willem Jiang <wi...@gmail.com>.
Hi,
It's a bug of CXF, you can work around it by changing the log level
setting on the HTTPConduit.
You can find more information here[1]
[1]https://issues.apache.org/jira/browse/CXF-3466
On 6/9/11 2:23 AM, Jérôme Lelong wrote:
> Hi,
>
> When i call a CXF WS, an exception (Stream is closed) is thrown.
>
> In my search i have found a Jira, but i don't know if it's the same problem
> ?
> https://issues.apache.org/jira/browse/CXF-3554
>
> Could you help me, or provide me way to analyse the problem ?
>
> Thanks
>
> Jérôme
>
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang