Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-6683

NullPointerException on transaction prepare in JdbcMememoryTransactionStore

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 5.14.5
    • None
    • Broker, JDBC
    • None

    Description

      From time to time an exception occurs:

      Caused by: java.lang.NullPointerException
                      at org.apache.activemq.store.jdbc.JdbcMemoryTransactionStore.prepare(JdbcMemoryTransactionStore.java:75)
                      at org.apache.activemq.transaction.XATransaction.prepare(XATransaction.java:188)
                      at org.apache.activemq.broker.TransactionBroker.prepareTransaction(TransactionBroker.java:247)
                      at org.apache.activemq.broker.MutableBrokerFilter.prepareTransaction(MutableBrokerFilter.java:133)
                      at org.apache.activemq.broker.MutableBrokerFilter.prepareTransaction(MutableBrokerFilter.java:133)
                      at org.apache.activemq.broker.TransportConnection.processPrepareTransaction(TransportConnection.java:519)
                      at org.apache.activemq.command.TransactionInfo.visit(TransactionInfo.java:98)
                      at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:336)
                      at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:200)
                      at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
                      at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:125)
                      at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:301)
                      at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
                      at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:233)[47:org.apache.activemq.activemq-osgi:5.14.5]
                      at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:215)[47:org.apache.activemq.activemq-osgi:5.14.5]
                      at java.lang.Thread.run(Thread.java:745)[:1.8.0_131]
      

      On client side there is an exception:

      XID:[1197822575,globalId=2c162f175c1006f72672e6170616368652e61726965732e7472616e73616374696f6e0000000000000000000000000000,branchId=2000ffffffe5ffffff8319175c1006170616368652e61726965732e7472616e73616374696f6e0000000000000000000000000000] failed with: javax.jms.JMSException: java.lang.NullPointerException
      javax.jms.JMSException: java.lang.NullPointerException
                      at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:54)
                      at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1399)
                      at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1428)
                      at org.apache.activemq.TransactionContext.prepare(TransactionContext.java:469)
                      at org.apache.geronimo.transaction.manager.WrapperNamedXAResource.prepare(WrapperNamedXAResource.java:86)
                      at org.apache.geronimo.transaction.manager.TransactionImpl.internalPrepare(TransactionImpl.java:429)
                      at org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:312)
                      at org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:252)
                      at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1020)
                      at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:761)
                      at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:730)
                      at org.apache.aries.transaction.internal.AriesPlatformTransactionManager.commit(AriesPlatformTransactionManager.java:75)
                      at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:484)
                      at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:291)
                      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
                      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[90:org.apache.servicemix.bundles.spring-aop:4.2.8.RELEASE_1]
                      at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655)
                      at ...... // custom service
      

      ActiveMQ is configured with jdbc persistence adapter over postgresql:

      <bean id="postgres-ds" class="org.apache.commons.dbcp2.BasicDataSource">
              <property name="url" value="jdbc:postgresql://postgres:5432/activemq" />
              <property name="connectionProperties" value="[targetServerType=master,readOnly=false]"/>
              <property name="username" value="abc"/>
              <property name="password" value="abc"/>
              <property name="initialSize" value="5" />
              <property name="maxTotal" value="20" />
              <property name="maxIdle" value="5" />
              <property name="validationQuery" value="select 1" />
              <property name="testWhileIdle" value="true" />
              <property name="timeBetweenEvictionRunsMillis" value="3000" />
          </bean>
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            ragnor84 Jakub
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: