0 Replies Latest reply on Jun 18, 2014 8:53 AM by anikulin

    Failed to extract body due to: javax.jms.JMSException

    anikulin

      Hi Guys

       

      I'm using a HornetQ and SwitchYard to implement JMS messages and topics. The system works ok, but in several hours after start it start producing WARN messages like this one:

       

      2014/06/18 04:25:01,663 WARN  [org.apache.camel.component.jms.EndpointMessageListener] (Camel (camel-1) thread #5 - JmsConsumer[dataTopic]) Execution of JMS message listener failed. Caused by: [org.apache.camel.RuntimeCamelException - Failed to extract body due to: javax.jms.JMSException. Message: HornetQMessage[null]:NON-PERSISTENT]: org.apache.camel.RuntimeCamelException: Failed to extract body due to: javax.jms.JMSException. Message: HornetQMessage[null]:NON-PERSISTENT
        at org.apache.camel.component.jms.JmsBinding.extractBodyFromJms(JmsBinding.java:148) [camel-jms-2.10.0.jar:2.10.0]
        at org.apache.camel.component.jms.JmsMessage.createBody(JmsMessage.java:214) [camel-jms-2.10.0.jar:2.10.0]
        at org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:41) [camel-core-2.10.0.jar:2.10.0]
        at org.apache.camel.impl.DefaultUnitOfWork.<init>(DefaultUnitOfWork.java:88) [camel-core-2.10.0.jar:2.10.0]
        at org.apache.camel.impl.DefaultUnitOfWork.<init>(DefaultUnitOfWork.java:71) [camel-core-2.10.0.jar:2.10.0]
        at org.apache.camel.processor.UnitOfWorkProcessor.createUnitOfWork(UnitOfWorkProcessor.java:190) [camel-core-2.10.0.jar:2.10.0]
        at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102) [camel-core-2.10.0.jar:2.10.0]
        at org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48) [camel-core-2.10.0.jar:2.10.0]
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90) [camel-core-2.10.0.jar:2.10.0]
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) [camel-core-2.10.0.jar:2.10.0]
        at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99) [camel-core-2.10.0.jar:2.10.0]
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90) [camel-core-2.10.0.jar:2.10.0]
        at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73) [camel-core-2.10.0.jar:2.10.0]
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99) [camel-core-2.10.0.jar:2.10.0]
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:86) [camel-core-2.10.0.jar:2.10.0]
        at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:104) [camel-jms-2.10.0.jar:2.10.0]
        at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:560)
        at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:498)
        at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:467)
        at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)
        at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)
        at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1058)
        at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1050)
        at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:947)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
        at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
      Caused by: javax.jms.JMSException
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1370) [rt.jar:1.7.0_45]
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370) [rt.jar:1.7.0_45]
        at java.util.TreeMap.buildFromSorted(TreeMap.java:2402) [rt.jar:1.7.0_45]
        at java.util.TreeMap.buildFromSorted(TreeMap.java:2418) [rt.jar:1.7.0_45]
        at java.util.TreeMap.buildFromSorted(TreeMap.java:2418) [rt.jar:1.7.0_45]
        at java.util.TreeMap.buildFromSorted(TreeMap.java:2418) [rt.jar:1.7.0_45]
        at java.util.TreeMap.buildFromSorted(TreeMap.java:2418) [rt.jar:1.7.0_45]
        at java.util.TreeMap.buildFromSorted(TreeMap.java:2418) [rt.jar:1.7.0_45]
        at java.util.TreeMap.buildFromSorted(TreeMap.java:2418) [rt.jar:1.7.0_45]
        at java.util.TreeMap.buildFromSorted(TreeMap.java:2418) [rt.jar:1.7.0_45]
        at java.util.TreeMap.buildFromSorted(TreeMap.java:2418) [rt.jar:1.7.0_45]
        at java.util.TreeMap.buildFromSorted(TreeMap.java:2418) [rt.jar:1.7.0_45]
        at java.util.TreeMap.buildFromSorted(TreeMap.java:2418) [rt.jar:1.7.0_45]
        at java.util.TreeMap.buildFromSorted(TreeMap.java:2344) [rt.jar:1.7.0_45]
        at java.util.TreeMap.readObject(TreeMap.java:2290) [rt.jar:1.7.0_45]
        at sun.reflect.GeneratedMethodAccessor73.invoke(Unknown Source) [:1.7.0_45]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]
        at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]
        at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017) [rt.jar:1.7.0_45]
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893) [rt.jar:1.7.0_45]
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798) [rt.jar:1.7.0_45]
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350) [rt.jar:1.7.0_45]
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370) [rt.jar:1.7.0_45]
        at java.util.HashMap.readObject(HashMap.java:1184) [rt.jar:1.7.0_45]
        at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source) [:1.7.0_45]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]
        at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]
        at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017) [rt.jar:1.7.0_45]
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893) [rt.jar:1.7.0_45]
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798) [rt.jar:1.7.0_45]
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350) [rt.jar:1.7.0_45]
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990) [rt.jar:1.7.0_45]
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915) [rt.jar:1.7.0_45]
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798) [rt.jar:1.7.0_45]
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350) [rt.jar:1.7.0_45]
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990) [rt.jar:1.7.0_45]
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915) [rt.jar:1.7.0_45]
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798) [rt.jar:1.7.0_45]
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350) [rt.jar:1.7.0_45]
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370) [rt.jar:1.7.0_45]
        at org.hornetq.jms.client.HornetQObjectMessage.getObject(HornetQObjectMessage.java:159) [hornetq-jms-client-2.3.5.Final-redhat-2.jar:2.3.5.Final-redhat-2]
        at org.apache.camel.component.jms.JmsBinding.extractBodyFromJms(JmsBinding.java:123) [camel-jms-2.10.0.jar:2.10.0]
        ... 26 more
      
      

       

      Can you please help me what can be the reason of such failures? If I restart server, it works ok and then starts printing failures in several hours again.

      I see such WARN logs not for all messages, some of them are received and handled in a proper way.

       

      I disabled ID generator and manually set NON-PERSISTENT delivery mode for messages.

       

      Thanks, Anton