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] Created: (CXF-1059) CachedOutputStream closes streams prematurely

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.


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

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


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

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

willem Jiang resolved CXF-1059.
-------------------------------

    Resolution: Fixed

This patch has been applied in the revision 578705.
I also added a postClose method for closing the other stream after the cached stream closed to fix the rm systest.

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


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

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


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

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

willem Jiang reassigned CXF-1059:
---------------------------------

    Assignee: willem Jiang

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


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

Posted by "Fedor Malyshkin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fedor Malyshkin updated CXF-1059:
---------------------------------

    Attachment: NodeDataReader.patch

Fedor's patch.

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


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

Posted by "willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530055 ] 

willem Jiang commented on CXF-1059:
-----------------------------------

Hi Fedor,
The patch is in the svn repository. 
Thanks.
Willem.

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