[ 
https://issues.apache.org/jira/browse/AXIS2-5487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13687689#comment-13687689
 ] 

Giovanni Fischetto commented on AXIS2-5487:
-------------------------------------------

Hi,
I tried to debug code.
I discovered that the issue is due to the BAAOutputStream.read(InputStream is, 
long maxRead) method. When an attachment is longer than 4k (= Buffer Size), 
it's read using a while-loop. At the 1st loop the InputStream is correctly 
read; at the 2nd, the InputSream variable is empty (line 112). This cause an 
IOException that is caught and a StreamCopyException is thowned.
try {
                bytesRead = is.read(currBuffer, index, len);
            } catch (IOException ex) {
                throw new StreamCopyException(StreamCopyException.READ, ex);
            }
Bye
                
> Attempted read on closed stream - II
> ------------------------------------
>
>                 Key: AXIS2-5487
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5487
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.6.2
>         Environment: Windows XP SP2, JDK 1.7, AXIS2-1.6.2, Jetty 7.2.0
>            Reporter: Espen Rydningen
>            Priority: Blocker
>              Labels: apache-mime4j-core-0.7.2, axiom_1.2.13, axis2_1.6.2
>         Attachments: DebugAndStacktrace.txt, wsRequest.txt, wsResponse.txt
>
>
> After upgrading from Axis2 1.5.6 to Axis2 1.6.2 we started receiving this 
> "org.apache.axiom.om.OMException: java.io.IOException: Attempted read on 
> closed stream." 
> WS request and response is attached
> Debug log and stacktrace is attached

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to