2 Replies Latest reply on Apr 22, 2010 9:59 AM by Maciej Krysiuk

    FUSE server stops responding

    Maciej Krysiuk Newbie

      Hi everybody,

       

      My fuse server throws an enourmous amount of an exception of the following type. The exception is difficult to be related with anything specific in the implementation. I've tried already turning onn/off strean caching in Camel, but with no effect. What is more the server stops responding once in a while, which might be a result of this exception. I'm using Fuse ServiceMix 3.4 and Camel 1.6. I would apprciate any help/advice.

       

      With regards,

      Matt

       

      org.apache.camel.processor.DeadLetterChannel

       

      Failed delivery for exchangeId: ID-273851-web1.mydomain.com/38494-1271345719255/0-6803. On delivery attempt: 3 caught: org.apache.camel.RuntimeCamelException: org.xml.sax.SAXParseException: Premature end of file.

       

      org.apache.camel.RuntimeCamelException: org.xml.sax.SAXParseException: Premature end of file.

           at org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:591)

           at org.apache.camel.impl.converter.InstanceMethodTypeConverter.convertTo(InstanceMethodTypeConverter.java:57)

           at org.apache.camel.impl.converter.DefaultTypeConverter.doConvertTo(DefaultTypeConverter.java:119)

           at org.apache.camel.impl.converter.DefaultTypeConverter.convertTo(DefaultTypeConverter.java:90)

           at org.apache.camel.util.ExchangeHelper.convertToType(ExchangeHelper.java:180)

           at org.apache.servicemix.camel.JbiBinding.convertBodyToJbi(JbiBinding.java:66)

           at org.apache.servicemix.camel.JbiMessage.setBody(JbiMessage.java:148)

           at org.apache.camel.builder.xml.StringResultHandler.setBody(StringResultHandler.java:40)

           at org.apache.camel.builder.xml.XsltBuilder.process(XsltBuilder.java:84)

           at org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:92)

           at org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:66)

           at org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)

           at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:84)

           at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)

           at org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:189)

           at org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:133)

           at org.apache.camel.processor.Pipeline.process(Pipeline.java:115)

           at org.apache.camel.processor.Pipeline.process(Pipeline.java:89)

           at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)

           at org.apache.camel.processor.interceptor.StreamCachingInterceptor.proceed(StreamCachingInterceptor.java:87)

           at org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(StreamCachingInterceptor.java:82)

           at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:52)

           at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)

           at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:66)

           at org.apache.servicemix.camel.CamelProviderEndpoint.handleActiveProviderExchange(CamelProviderEndpoint.java:116)

           at org.apache.servicemix.camel.CamelProviderEndpoint.process(CamelProviderEndpoint.java:74)

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

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

           at org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:535)

           at org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)

           at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:623)

           at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)

           at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)

           at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)

           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: org.xml.sax.SAXParseException: Premature end of file.

           at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)

           at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)

           at org.apache.camel.converter.jaxp.XmlConverter.toDOMSourceFromStream(XmlConverter.java:387)

           at org.apache.camel.converter.jaxp.XmlConverter.toDOMSource(XmlConverter.java:233)

           at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source)

           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

           at java.lang.reflect.Method.invoke(Method.java:597)

           at org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:587)

           ... 36 more

        • 1. Re: FUSE server stops responding
          Claus Ibsen Master

          Hi

           

          Premature end of file smells like a stream which cannot be read.

           

          You can try to convert the body to String when you receive it in Camel to avoid working with those pesky streams.

           

          from(jbi)
          .convertBodyTo(String.class)
          ...
          

           

          • 2. Re: FUSE server stops responding
            Maciej Krysiuk Newbie

            Hi there,

             

            Well, I'm already applying:

            <camel:convertBodyTo type="javax.xml.transform.dom.DOMSource" />

             

            in my code. I still get the exception.

             

            The problems is that:

            I don't really know on which route i should apply convertBodyTo, as the stack trace does not indicate that whatsoever. I dont' want remove all stream because I might have big messages and don't want to reach memory limit or have slowdowns caused by garbage collecting.

             

            I applied <camel:convertBodyTo type="javax.xml.transform.dom.DOMSource" /> on a route, that gets activated more or less at the time when server stops responding. But it doesn't help, as I mentioned.