You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Ryan Moquin (JIRA)" <ji...@apache.org> on 2007/09/23 02:51:50 UTC

[jira] Updated: (CXF-1059) CachedOutputStream closes streams prematurely

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

Ryan Moquin updated CXF-1059:
-----------------------------

    Attachment: CachedOutputStream.patch

Suggested patch for this issue.

> CachedOutputStream closes streams prematurely
> ---------------------------------------------
>
>                 Key: CXF-1059
>                 URL: https://issues.apache.org/jira/browse/CXF-1059
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.1
>         Environment: Windows XP
>            Reporter: Ryan Moquin
>         Attachments: CachedOutputStream.patch
>
>
> I receive this error when I return a large amount of data from my webservice (and get past the ClassCastException that I filed a jira about yesterday):
> Sep 22, 2007 7:46:46 PM org.apache.cxf.transport.jbi.JBIDestinationOutputStream commitOutputMessage
> SEVERE: error sending Out message
> java.io.IOException: Cached file was deleted, java.io.FileNotFoundException: C:\DOCUME~1\ryan\LOCALS~1\Temp\att25960tmp (
> The system cannot find the file specified)
>         at org.apache.cxf.io.CachedOutputStream.getInputStream(CachedOutputStream.java:283)
>         at org.apache.cxf.transport.jbi.JBIDestinationOutputStream.commitOutputMessage(JBIDestinationOutputStream.java:78
> )
>         at org.apache.cxf.transport.jbi.JBIDestinationOutputStream.doClose(JBIDestinationOutputStream.java:60)
>         at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:119)
>         at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>         at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSender
> Interceptor.java:62)
>         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
>         at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:73)
>         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
>         at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:73)
>         at org.apache.cxf.transport.jbi.JBIDispatcherUtil.dispatch(JBIDispatcherUtil.java:148)
>         at org.apache.servicemix.cxfse.CxfSeEndpoint.process(CxfSeEndpoint.java:167)
>         at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
>         at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
>         at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>         at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
>         at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
>         at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
>         at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>         at java.lang.Thread.run(Thread.java:595)
> The problem is that the close method in CachedOutputStream closes the stream (and deletes any temporary file associated) and then indicates the close was made so that child classes can also perform any closing operations.  The problem is that the JBIDestinationOutputStream at that point wants to read some data from the stream and hence the above error occurs.  The methods simply need reordered so that the temp file isn't closed before the doClose is executed.

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