2 Replies Latest reply on Apr 13, 2010 3:19 AM by maciej.krysiuk

    anonymous error

    maciej.krysiuk

      Hi All,

       

      I have a simple question:

      I get a following error in my logs. All classes in stack trace are from camel or servicemix package. How can I relate this to my DSL code? I can't figure out in which of my routes/endpoints/components the error occurs. The exchange ID ID-273851-web1.mydomain.com does not say much. There are lots of occurences of mydomain.com in my code and none of 'web1'.

       

      Thanks for any help,

      Matt

       

       

      ERROR

       

      org.apache.camel.processor.DeadLetterChannel

       

      Failed delivery for exchangeId: ID-273851-web1.mydomain.com/36619-1270631406408/0-459. On delivery attempt: 16 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.GeneratedMethodAccessor98.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: anonymous error
          njiang

          Hi,

           

          You should give us the version of ServiceMix and Camel which you are using, so we can identify the error more quickly.

          "org.xml.sax.SAXParseException: Premature end of file." It's a common error that you read the xml stream which is already read. You just need to enable the stream cache in Camel, and this stream cache option is turn off by default in Camel 2.0.

           

          you can find more information about it here

           

          Willem

          • 2. Re: anonymous error
            maciej.krysiuk

            Hi Willem,

             

            Thank you for your advice.

             

            I'm using ServiceMix 3.4 and Camel 1.6 - that means that stream caching is enabled by default. I've googled the ServiceMix streaming problem and found a contrary advice - to turn off the stream caching. This is then confusing.

             

            Regards,

            Matt

             

            Edited by: maciej.krysiuk on Apr 13, 2010 7:19 AM