8 Replies Latest reply on Aug 27, 2011 7:25 AM by pchakinala_praveen.chakinala

    IOException: Attempted read on closed stream

    mrostan

      Hi,

      I'm new to Fuse ESB and I'm trying to develop a very simple service to proxy an http connection, so I'm using http endpoints, the version I'm using is: apache-servicemix-4.3.1-fuse-00-00

      I've modified the bridge-camel example to route to a second http endpoint and the request is arriving to the destination service, but when the endpoint is processing the response I'm receiving the error shown below.

       

      The new http endpoint in xbean.xml is declared as follows:

       

        <http:endpoint service="b:http2" endpoint="http2"

                       locationURI="http://server:8180/test-service"

                       role="provider"

                defaultMep="http://www.w3.org/2004/08/wsdl/in-out">

        </http:endpoint>

       

      The exception is:

      Caused by: java.io.IOException: Attempted read on closed stream.

           at org.apache.commons.httpclient.AutoCloseInputStream.isReadAllowed(AutoCloseInputStream.java:183)[155:org.apache.servicemix.bundles.commons-httpclient:3.1.0.5]

           at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:107)[155:org.apache.servicemix.bundles.commons-httpclient:3.1.0.5]

           at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)[:1.6.0_18]

           at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)[:1.6.0_18]

           at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)[:1.6.0_18]

           at java.io.InputStreamReader.read(InputStreamReader.java:167)[:1.6.0_18]

           at com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:250)[86:woodstox-core-asl:4.0.8]

           at com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:133)[86:woodstox-core-asl:4.0.8]

           at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:531)[86:woodstox-core-asl:4.0.8]

       

      I've found a very similar issue in http://fusesource.com/issues/browse/ESB-73 but it seems to be fixed.

       

      Any ideas?

       

      Thanks in advance.

      Martin