0 Replies Latest reply on Feb 27, 2006 12:02 PM by Stephen Schwenker

    TransactionRolledbackException in method

    Stephen Schwenker Newbie

      Hello,

      I'm using JMS to execute actions in the backgroud. Basically, I've got a servlet that sends a message to a JMS Topic, then I have an enterprise Message bean that executes when the message arrives. The message bean then uses a stateless session bean to do the work.

      half the time, the logic works and the other half, it throws an exception. Can anyone help me figure out why this isn't working?

      Thank you,



      Here's the Exceptions...



      2006-02-27 11:49:06,593 DEBUG [org.jboss.mq.il.uil2.ServerSocketManagerHandler] Exiting on IOE
      java.net.SocketException: socket closed
      at java.net.SocketInputStream.socketRead0(Native Method)
      at java.net.SocketInputStream.read(SocketInputStream.java:129)
      at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
      at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
      at org.jboss.util.stream.NotifyingBufferedInputStream.read(NotifyingBufferedInputStream.java:67)
      at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2200)
      at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(ObjectInputStream.java:2380)
      at java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java:2447)
      at java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream.java:2519)
      at java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputStream.java:2668)
      at java.io.ObjectInputStream.readByte(ObjectInputStream.java:864)
      at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:290)
      at java.lang.Thread.run(Thread.java:595)
      2006-02-27 11:49:06,593 DEBUG [org.jboss.mq.il.uil2.SocketManager] End ReadTask.run
      2006-02-27 11:49:06,593 DEBUG [org.jboss.mq.il.uil2.UILClientILService] Stopping
      2006-02-27 11:49:06,593 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackException in method: public abstract com.thestar.om.db.Pubsession com.thestar.om.interfaces.PubSessionAction.loadPubSession(long) throws java.rmi.RemoteException, causedBy:
      java.lang.NullPointerException
      at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:439)
      at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:366)
      at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105)
      at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561)
      at org.hibernate.loader.Loader.doQuery(Loader.java:661)
      at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:223)
      at org.hibernate.loader.Loader.doList(Loader.java:2147)
      at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2026)
      at org.hibernate.loader.Loader.list(Loader.java:2021)
      at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:369)
      at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:298)
      at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1020)
      at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
      at com.thestar.om.ejb.PubSessionActionBean.loadPubSession(PubSessionActionBean.java:149)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:154)
      at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:54)
      at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
      at org.jboss.ejb.Container.invoke(Container.java:873)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:155)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:104)
      at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:179)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:165)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
      at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:97)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
      at $Proxy58.loadPubSession(Unknown Source)
      at com.thestar.om.ejb.PubSessionArticleIndexerBean.onMessage(PubSessionArticleIndexerBean.java:65)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
      at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:475)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
      at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:101)
      at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
      at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389)
      at org.jboss.ejb.Container.invoke(Container.java:873)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1077)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1379)
      at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
      at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904)
      at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:160)
      at org.jboss.mq.SpySession.run(SpySession.java:333)
      at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
      at java.lang.Thread.run(Thread.java:595)
      2006-02-27 11:49:06,593 INFO [STDOUT] javax.transaction.TransactionRolledbackException: null; nested exception is:
      java.lang.NullPointerException
      2006-02-27 11:49:06,593 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:259)
      2006-02-27 11:49:06,593 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
      2006-02-27 11:49:06,593 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
      2006-02-27 11:49:06,593 DEBUG [org.jboss.mq.il.uil2.SocketManager] End WriteTask.run
      2006-02-27 11:49:06,593 DEBUG [org.jboss.mq.il.uil2.SocketManager] End ReadTask.run
      2006-02-27 11:49:06,593 DEBUG [org.jboss.mq.il.uil2.SocketManager] End WriteTask.run
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.ejb.Container.invoke(Container.java:873)
      2006-02-27 11:49:06,609 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2006-02-27 11:49:06,609 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2006-02-27 11:49:06,609 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2006-02-27 11:49:06,609 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:155)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:104)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:179)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:165)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:97)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
      2006-02-27 11:49:06,609 INFO [STDOUT] at $Proxy58.loadPubSession(Unknown Source)
      2006-02-27 11:49:06,609 INFO [STDOUT] at com.thestar.om.ejb.PubSessionArticleIndexerBean.onMessage(PubSessionArticleIndexerBean.java:65)
      2006-02-27 11:49:06,609 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2006-02-27 11:49:06,609 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2006-02-27 11:49:06,609 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2006-02-27 11:49:06,609 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:475)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:101)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.ejb.Container.invoke(Container.java:873)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1077)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1379)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:160)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.mq.SpySession.run(SpySession.java:333)
      2006-02-27 11:49:06,609 INFO [STDOUT] at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
      2006-02-27 11:49:06,609 INFO [STDOUT] at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
      2006-02-27 11:49:06,625 INFO [STDOUT] at java.lang.Thread.run(Thread.java:595)
      2006-02-27 11:49:06,625 INFO [STDOUT] Caused by: java.lang.NullPointerException
      2006-02-27 11:49:06,625 INFO [STDOUT] at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:439)
      2006-02-27 11:49:06,625 INFO [STDOUT] at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:366)
      2006-02-27 11:49:06,625 INFO [STDOUT] at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105)
      2006-02-27 11:49:06,625 INFO [STDOUT] at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561)
      2006-02-27 11:49:06,625 INFO [STDOUT] at org.hibernate.loader.Loader.doQuery(Loader.java:661)
      2006-02-27 11:49:06,625 INFO [STDOUT] at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:223)
      2006-02-27 11:49:06,625 INFO [STDOUT] at org.hibernate.loader.Loader.doList(Loader.java:2147)
      2006-02-27 11:49:06,625 INFO [STDOUT] at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2026)
      2006-02-27 11:49:06,625 INFO [STDOUT] at org.hibernate.loader.Loader.list(Loader.java:2021)
      2006-02-27 11:49:06,625 INFO [STDOUT] at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:369)
      2006-02-27 11:49:06,625 INFO [STDOUT] at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:298)
      2006-02-27 11:49:06,625 INFO [STDOUT] at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1020)
      2006-02-27 11:49:06,625 INFO [STDOUT] at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
      2006-02-27 11:49:06,625 INFO [STDOUT] at com.thestar.om.ejb.PubSessionActionBean.loadPubSession(PubSessionActionBean.java:149)
      2006-02-27 11:49:06,625 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2006-02-27 11:49:06,625 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2006-02-27 11:49:06,625 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2006-02-27 11:49:06,625 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
      2006-02-27 11:49:06,625 INFO [STDOUT] at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
      2006-02-27 11:49:06,625 INFO [STDOUT] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
      2006-02-27 11:49:06,625 INFO [STDOUT] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
      2006-02-27 11:49:06,625 INFO [STDOUT] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:154)
      2006-02-27 11:49:06,625 INFO [STDOUT] at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:54)
      2006-02-27 11:49:06,625 INFO [STDOUT] at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
      2006-02-27 11:49:06,625 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
      2006-02-27 11:49:06,625 INFO [STDOUT] ... 52 more