12 Replies Latest reply on Sep 4, 2010 6:28 AM by Divakar B

    unwinding now org.apache.cxf.interceptor.Fault: java.io.IOException: Stream

    Divakar B Newbie

      Any help on the below exception is much appreciated.

       

      unwinding now org.apache.cxf.interceptor.Fault: java.io.IOException: Stream closed

              at org.apache.servicemix.cxfbc.interceptors.JbiOutInterceptor.extractHeaderFromMessagePart(JbiOutInterceptor.java:84)

              at org.apache.servicemix.cxfbc.interceptors.JbiOutInterceptor.handleMessage(JbiOutInterceptor.java:71)

              at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)

              at org.apache.servicemix.cxfbc.CxfBcProvider.process(CxfBcProvider.java:250)

              at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:617)

              at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:571)

              at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchangeInTx(AsyncBaseLifeCycle.java:468)

              at org.apache.servicemix.common.AsyncBaseLifeCycle$2.run(AsyncBaseLifeCycle.java:347)

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

              at java.lang.Thread.run(Unknown Source)

      Caused by: javax.xml.transform.TransformerException: java.io.IOException: Stream closed

              at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)

              at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)

              at org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransformer.java:135)

              at org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransformer.java:113)

              at org.apache.servicemix.jbi.jaxp.SourceTransformer.toDOMNodeFromSAX(SourceTransformer.java:311)

              at org.apache.servicemix.jbi.jaxp.SourceTransformer.toDOMSourceFromSAX(SourceTransformer.java:306)

              at org.apache.servicemix.jbi.jaxp.SourceTransformer.toDOMSource(SourceTransformer.java:183)

              at org.apache.servicemix.jbi.jaxp.SourceTransformer.toDOMNode(SourceTransformer.java:323)

              at org.apache.servicemix.jbi.jaxp.SourceTransformer.toDOMElement(SourceTransformer.java:373)

              at org.apache.servicemix.cxfbc.interceptors.JbiOutInterceptor.extractHeaderFromMessagePart(JbiOutInterceptor.java:82)

              ... 10 more

      Caused by: java.io.IOException: Stream closed

              at java.io.StringReader.ensureOpen(Unknown Source)

              at java.io.StringReader.read(Unknown Source)

              at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown Source)

              at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(Unknown Source)

              at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(Unknown Source)

              at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown Source)

              at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)

              at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)

              at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)

              at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)

              at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(Unknown Source)

              ... 20 more

        • 1. Re: unwinding now org.apache.cxf.interceptor.Fault: java.io.IOException: Stream
          Freeman(Yue) Fang Master

          Hi,

           

          This exception generally means the stream you want to read somehow is closed. But I can't tell more without more details. You may probably clarify more about your working flow.

           

          Freeman

          • 2. Re: unwinding now org.apache.cxf.interceptor.Fault: java.io.IOException: Stream
            Willem Jiang Master

            Here is a ServiceMix FAQ that you may take a look. 

             

            Willem

            • 3. Re: unwinding now org.apache.cxf.interceptor.Fault: java.io.IOException: Stream
              Divakar B Newbie

              Hi,

               

              I have attached the debug stack trace for the cause of the error I have posted.

               

              What I am doing is from:actiqvemq -> to:cxfbc provider (with out interceptors)

               

              Any help on this is much appreciated..

               

              Thanks,

              Divakar B

              • 4. Re: unwinding now org.apache.cxf.interceptor.Fault: java.io.IOException: Stream
                Divakar B Newbie

                Hi,

                 

                I have responded to Freeman with the text attached to the message.

                 

                Thanks,

                Divakar B

                • 5. Re: unwinding now org.apache.cxf.interceptor.Fault: java.io.IOException: Stream
                  Divakar B Newbie

                  Any help on this issue is much appreciated, I have been struck with this quite along time.

                   

                  Please do the needful.

                  • 6. Re: unwinding now org.apache.cxf.interceptor.Fault: java.io.IOException: Stream
                    Willem Jiang Master

                    Hi

                    Which version of ServiceMix are you using ?

                    I just found some camel converters auto loading errors

                       23:05:55,896 | DEBUG | tenerContainer-1 | DefaultPackageScanClassResolver  | .DefaultPackageScanClassResolver  276 | Cannot read entries in url: bundleresource://71.fwk2091149/org/apache/camel/component/file/
                    java.io.FileNotFoundException: \org\apache\camel\component\file (The system cannot find the path specified)
                    

                     

                     

                    If you are using Fuse ESB 4.2, please make sure you just install the camel-spring-osgi bundle and don't install the camel-spring bundle.

                     

                    Willem

                    • 7. Re: unwinding now org.apache.cxf.interceptor.Fault: java.io.IOException: Stream
                      Divakar B Newbie

                      Thanks,

                       

                      Yes, camel-spring-osgi bundle is installed and the FileNotFoundException is resolved.

                       

                      But I am still struggling with the Stream Closed error I am clueless.

                       

                      I have imported a X509 DER self signed certificate to the cacerts keystore to fix the below,

                       

                       

                       

                      When I do the above thing I land up on this "Stream Closed" error

                       

                      20:52:49,301 | WARN  | -cxf-bc-thread-2 | PhaseInterceptorChain            | ache.cxf.common.logging.LogUtils  365 | Interceptor for SecurityPWS has thrown exception, unwinding now

                      org.apache.cxf.interceptor.Fault: java.io.IOException: Stream closed

                           at org.apache.servicemix.cxfbc.interceptors.JbiOutInterceptor.extractHeaderFromMessagePart(JbiOutInterceptor.java:84)

                           at org.apache.servicemix.cxfbc.interceptors.JbiOutInterceptor.handleMessage(JbiOutInterceptor.java:71)

                           at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)

                           at org.apache.servicemix.cxfbc.CxfBcProvider.process(CxfBcProvider.java:250)

                           at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:617)

                           at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:571)

                           at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchangeInTx(AsyncBaseLifeCycle.java:468)

                           at org.apache.servicemix.common.AsyncBaseLifeCycle$2.run(AsyncBaseLifeCycle.java:347)

                           at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                           at java.lang.Thread.run(Thread.java:619)

                      Caused by: javax.xml.transform.TransformerException: java.io.IOException: Stream closed

                           at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:719)

                           at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:313)

                           at org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransformer.java:135)

                           at org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransformer.java:113)

                           at org.apache.servicemix.jbi.jaxp.SourceTransformer.toDOMNodeFromSAX(SourceTransformer.java:311)

                           at org.apache.servicemix.jbi.jaxp.SourceTransformer.toDOMSourceFromSAX(SourceTransformer.java:306)

                           at org.apache.servicemix.jbi.jaxp.SourceTransformer.toDOMSource(SourceTransformer.java:183)

                           at org.apache.servicemix.jbi.jaxp.SourceTransformer.toDOMNode(SourceTransformer.java:323)

                           at org.apache.servicemix.jbi.jaxp.SourceTransformer.toDOMElement(SourceTransformer.java:373)

                           at org.apache.servicemix.cxfbc.interceptors.JbiOutInterceptor.extractHeaderFromMessagePart(JbiOutInterceptor.java:82)

                           ... 10 more

                      Caused by: java.io.IOException: Stream closed

                           at java.io.StringReader.ensureOpen(StringReader.java:39)

                           at java.io.StringReader.read(StringReader.java:73)

                           at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1742)

                           at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(XMLEntityScanner.java:1619)

                           at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(XMLEntityScanner.java:1657)

                           at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:193)

                           at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:772)

                           at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)

                           at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)

                           at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)

                           at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:636)

                           at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:707)

                       

                      Edited by: divakar on Aug 26, 2010 4:45 PM

                      • 9. Re: unwinding now org.apache.cxf.interceptor.Fault: java.io.IOException: Stream
                        Divakar B Newbie

                        I did tried with it, but no luck.

                         

                        Is there any thing I need to take care of when the tragetURI is https. Below is my cxf bc provider configuration.

                         

                        Please do the needful, its been with be for almost a week now.

                         

                         

                                <constructor-arg value="$" />

                                              

                                        <entry key="user" value="$" />

                                         

                        • 10. Re: unwinding now org.apache.cxf.interceptor.Fault: java.io.IOException: Stream
                          Divakar B Newbie

                          I am getting this Stream Closed error, when I use the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files.

                           

                          If I am using the strong one I am getting the below Fault.

                           

                           

                          How can I post it to the user community to get this problem resolved.

                          • 11. Re: unwinding now org.apache.cxf.interceptor.Fault: java.io.IOException: Stream
                            Fernando Salceda Novice

                            I'm having the same problem "Stream closed" with my provider.  And the service I'm calling is working fine. When it happens I have to restart servicemix to make it work again.

                            • 12. Re: unwinding now org.apache.cxf.interceptor.Fault: java.io.IOException: Stream
                              Divakar B Newbie

                              Newer Fuse 4.3 version resolved this problem, 4.2_02_00 had bad memory management for SSL communications in Cxf BC, I believe...