cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fedor Malyshkin (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-1059) CachedOutputStream closes streams prematurely
Date Mon, 24 Sep 2007 10:44:50 GMT

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

Fedor Malyshkin commented on CXF-1059:
--------------------------------------

I experienced almost the same problem when implemented my JAX-WS Provider service and invoked
it with big XML.
It don't close itself, but it is closed by other DataReader's instance.
I didn't keep my exception, but i offer my patch for this problem.

> 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
>            Assignee: willem Jiang
>         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.


Mime
View raw message