Atomikos Forum |
|
Received the below exception in production.
Looking at the source code 'currentContext' isn't accessed within a synchronised block in some methods and so the pattern if ( currentContext != null && tx != null ) ret = currentContext.... can still produce a NullPointer... What would be the side affect of this? Would my DMLC recover gracefully. We don't see any proceeding logs after this so we were worried the process may have hung. Here is my stacktrace: java.lang.NullPointerException at com.atomikos.datasource.xa.session.SessionHandleState.isInactiveInTransaction(SessionHandleState.java:301)[transactions-jta-3.8.0.jar:] at com.atomikos.jms.AtomikosJmsXaSessionProxy.isInactiveTransaction(AtomikosJmsXaSessionProxy.java:249)[transactions-jms-3.8.0.jar:] at com.atomikos.jms.AtomikosJmsConnectionProxy.isInactiveInTransaction(AtomikosJmsConnectionProxy.java:378)[transactions-jms-3.8.0.jar:] at com.atomikos.jms.AtomikosPooledJmsConnection.canBeRecycledForCallingThread(AtomikosPooledJmsConnection.java:162)[transactions-jms-3.8.0.jar:] at com.atomikos.datasource.pool.ConnectionPool.recycleConnectionIfPossible(ConnectionPool.java:106)[transactions-jta-3.8.0.jar:] at com.atomikos.datasource.pool.ConnectionPool.borrowConnection(ConnectionPool.java:136)[transactions-jta-3.8.0.jar:] at com.atomikos.jms.AtomikosConnectionFactoryBean.createConnection(AtomikosConnectionFactoryBean.java:591)[transactions-jms-3.8.0.jar:] at org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:184)[org.springframework.jms-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.access$0(AbstractPollingMessageListenerContainer.java:1)[org.springframework.jms-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.jms.listener.AbstractPollingMessageListenerContainer$MessageListenerContainerResourceFactory.createConnection(AbstractPollingMessageListenerContainer.java:527)[org.springframework.jms-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.jms.connection.ConnectionFactoryUtils.doGetTransactionalSession(ConnectionFactoryUtils.java:297)[org.springframework.jms-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:289)[org.springframework.jms-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:244)[org.springframework.jms-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1071)[org.springframework.jms-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1063)[org.springframework.jms-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:960)[org.springframework.jms-3.1.2.RELEASE.jar:3.1.2.RELEASE] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_19] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_19] at java.lang.Thread.run(Thread.java:619)[:1.6.0_19] |