Atomikos Forum

ExtendedSystemException: Unexpected error during enlist

We use:
Atomikos 3.9.3
Spring servicemix 4.1.6.RELEASE_1
ActiveMQ 5.12.1

We have the following setup:

* XML configuration:

<context:property-placeholder properties-ref="messageServiceActiveMQConfig" system-properties-mode="NEVER"/>

    <amq:broker id="broker" useJmx="true" persistent="${broker.persistent}" dedicatedTaskRunner="false" useShutdownHook="false" start="false" schedulerSupport="true">
        <amq:managementContext>
            <amq:managementContext createConnector="false"/>
        </amq:managementContext>
       
        <amq:persistenceAdapter>
            <bean class="be.aca.osgi.messageservice.activemq.internal.store.jdbc.JDBCPersistenceAdapterWithJobSchedulerSupport">
                <property name="dataSource" ref="dataSource" />
                <property name="lockKeepAlivePeriod" value="5000" />
                <property name="statements">
                    <bean class="be.aca.osgi.messageservice.activemq.internal.store.jdbc.JDBCJobSchedulerSupportAwareStatements" />
                </property>
                <property name="locker">
                    <bean class="org.apache.activemq.store.jdbc.LeaseDatabaseLocker">
                        <property name="lockAcquireSleepInterval" value="10000" />
                    </bean>
                </property>
            </bean>
        </amq:persistenceAdapter>
       
        <amq:transportConnectors>
            <amq:transportConnector uri="tcp://${broker.host:0.0.0.0}:0" discoveryUri="clustermessageprotocol://cluster" />
        </amq:transportConnectors>

        <amq:plugins>
            <amq:redeliveryPlugin>
                <amq:redeliveryPolicyMap>
                    <amq:redeliveryPolicyMap>
                        <amq:defaultEntry>
                            <ref bean="configurableBrokerRedeliveryPolicy"/>
                        </amq:defaultEntry>
                    </amq:redeliveryPolicyMap>
                </amq:redeliveryPolicyMap>
            </amq:redeliveryPlugin>
        </amq:plugins>

    </amq:broker>
    
    <amq:xaConnectionFactory id="connectionFactory" brokerURL="discovery:(clustermessageprotocol://cluster)?initialReconnectDelay=100">    
        <amq:redeliveryPolicyMap>
            <amq:redeliveryPolicyMap>
                <amq:defaultEntry>
                    <ref bean="configurableClientRedeliveryPolicy"/>
                </amq:defaultEntry>
            </amq:redeliveryPolicyMap>
        </amq:redeliveryPolicyMap>
    </amq:xaConnectionFactory>

    <bean id="pooledConnectionFactory" class="org.apache.activemq.jms.pool.XaPooledConnectionFactory" destroy-method="stop">
        <property name="connectionFactory" ref="connectionFactory"/>
        <property name="transactionManager" ref="jtaTransactionManager"/>
      </bean>

    <bean id="messageConverter" class="be.aca.osgi.messageservice.activemq.internal.MappingJackson2MessageConverter">
        <property name="typeIdPropertyName" value="javaClassProperty" />
        <property name="targetType" value="TEXT" />
        <property name="mdcLoggingPropertiesHandler" ref="mdcLoggingPropertiesHandler" />
    </bean>

* Dynamically creating ActiveMQueue

@Named
public class DefaultMessageListenerContainerFactory {

    @Inject
    private XaPooledConnectionFactory pooledConnectionFactory;

    @Inject
    private PlatformTransactionManager platformTransactionManager;

    @Inject
    private MappingJackson2MessageConverter mappingJackson2MessageConverter;

    @Inject
    private MDCLoggingPropertiesHandler mdcLoggingPropertiesHandler;

    public void createAndStart(MessageServiceListener messageServiceListener) {
        ActiveMQQueue queue = new ActiveMQQueue("myQueueName");

        DefaultMessageListenerContainer listenerContainer = new DefaultMessageListenerContainer();
        listenerContainer.setConnectionFactory(pooledConnectionFactory);
        listenerContainer.setDestination(queue);
        listenerContainer.setMessageListener(new MessageQueueListener(messageServiceListener, mappingJackson2MessageConverter, mdcLoggingPropertiesHandler));
        listenerContainer.setTransactionManager(platformTransactionManager);
        listenerContainer.afterPropertiesSet();
        listenerContainer.start();
    }
}

Occasionally it will output the following warning:

(2016-05-06/09:12:38.660/CEST) WARN  org.springframework.jms.listener.DefaultMessageListenerContainer  - Setup of JMS message listener invoker failed for destination 'queue://be.vabfs.services.vehicle.internal.attachment.DeleteVehicleAttachmentRequest' - trying to recover. Cause: System Exception  [DefaultMessageListenerContainer-1]
javax.jms.JMSException: System Exception
  at org.apache.activemq.jms.pool.XaConnectionPool.createSession(XaConnectionPool.java:80)
  at org.apache.activemq.jms.pool.PooledConnection.createSession(PooledConnection.java:167)
  at org.springframework.jms.support.JmsAccessor.createSession(JmsAccessor.java:192)
  at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.access$200(AbstractPollingMessageListenerContainer.java:76)
  at org.springframework.jms.listener.AbstractPollingMessageListenerContainer$MessageListenerContainerResourceFactory.createSession(AbstractPollingMessageListenerContainer.java:487)
  at org.springframework.jms.connection.ConnectionFactoryUtils.doGetTransactionalSession(ConnectionFactoryUtils.java:315)
  at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:271)
  at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:226)
  at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1144)
  at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1136)
  at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1033)
  at java.lang.Thread.run(Thread.java:745)
Caused by: com.atomikos.icatch.jta.ExtendedSystemException: Unexpected error during enlist
  at com.atomikos.icatch.jta.TransactionImp.enlistResource(TransactionImp.java:330)
  at org.apache.activemq.jms.pool.XaConnectionPool.createSession(XaConnectionPool.java:70)
  ... 11 more


What is causing this warning? It does not happen everytime, happens once and doesn't return after.
Bert De Wolf Send private email
Friday, May 20, 2016
 
 
We haven't seen this before - you might benefit from a support subscription so we can dig this out for you...
Guy Pardon Send private email
Friday, June 10, 2016
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics