我发现在我们的实时环境中经常发生以下异常:
2013-01-08 00:09:45,886 ERROR [org.jboss.aspects.tx.TxPolicy] (Thread-70534 (HornetQ- client-global-threads-225905014)) javax.ejb.EJBTransactionRolledbackException
2013-01-08 00:09:45,886 ERROR [org.hornetq.ra.inflow.HornetQMessageHandler] (Thread- 70534 (HornetQ-client-global-threads-225905014)) Failed to deliver message
javax.ejb.EJBTransactionRolledbackException
at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:115)
at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:194)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2. java:79)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.interceptor.EJB3TCCLInterceptor.invoke(EJB3TCCLInterceptor.java:86)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.mdb.MessagingContainer.localInvoke(MessagingContainer.java:281)
at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:311)
at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:153)
at org.hornetq.ra.inflow.HornetQMessageHandler.onMessage(HornetQMessageHandler.java:324)
at org.hornetq.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:1028)
at org.hornetq.core.client.impl.ClientConsumerImpl.access$400(ClientConsumerImpl.java:50)
at org.hornetq.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:1173)
at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100)
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:662)
Caused by: java.lang.NullPointerException
...
2013-01-08 00:09:45,897 WARN [org.hornetq.core.server.impl.QueueImpl] (Thread-1 (HornetQ-server-HornetQServerImpl::serverUUID=2de2c2a9-440f-11e2-ae8e-0024e83c51d2- 1125034725)) Message Reference[160399362]:RELIABLE:ServerMessage[messageID=160399362,priority=9, bodySize=474,expiration=0, durable=true, address=jms.queue.phaseQueueFromEngine,properties=TypedProperties[{_HQ_GROUP_ID=S129737044}] ]@1530618770 has reached maximum delivery attempts, sending it to Dead Letter Address jms.queue.DLQ from jms.queue.phaseQueueFromEngine
我不确定为什么会发生这种情况,大多数情况下都会正确处理消息,但有时它们会引发下面的异常。 我试图深入研究Jboss代码,但我无法弄明白。 任何线索?
答案 0 :(得分:1)
我找到了异常的原因,它在代码中是一个空指针,但是没有显示异常(完整堆栈跟踪)的来源。