Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-12208

Configuration Guide - XA recovery on Sybase 15.7/16

    XMLWordPrintable

Description

    If XA transaction which includes insert to Sybase 15.7/16 database fails before transaction branch on Sybase is in prepared state but other XA transaction branches are already in prepared state then recovery manager will roll back this XA transaction.

    However because Sybase transaction branch was not in prepared, it will be rolled back by Sybase database itself after its specified timeout and not by recovery manager. As inserting record to table "reserved" primary key of the row. Then repeating of XA transaction and inserting the same record (with same primary key) in another transaction will fail with:

    10:52:46,519 ERROR [org.jboss.qa.hornetq.apps.mdb.SimpleMdbToDb] (Thread-15 (ActiveMQ-client-global-threads)) SQLException thrown during processing of message: ID:eb281e29-6c5e-11e7-a00f-54e1ad305985: com.sybase.jdbc4.jdbc.SybSQLException: Attempt to insert duplicate key row in object 'MESSAGE_INFO2' with unique index 'MESSAGE_IN_MESSAG_10637238612'
    
    	at com.sybase.jdbc4.tds.Tds.processEed(Tds.java:4003)
    	at com.sybase.jdbc4.tds.Tds.nextResult(Tds.java:3093)
    	at com.sybase.jdbc4.jdbc.ResultGetter.nextResult(ResultGetter.java:78)
    	at com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:289)
    	at com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:271)
    	at com.sybase.jdbc4.jdbc.SybStatement.updateLoop(SybStatement.java:2514)
    	at com.sybase.jdbc4.jdbc.SybStatement.executeUpdate(SybStatement.java:2498)
    	at com.sybase.jdbc4.jdbc.SybPreparedStatement.executeUpdate(SybPreparedStatement.java:296)
    	at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:537)
    	at org.jboss.qa.hornetq.apps.mdb.SimpleMdbToDb.processMessageInfo(SimpleMdbToDb.java:93) [mdbToDb.jar:]
    	at org.jboss.qa.hornetq.apps.mdb.SimpleMdbToDb.onMessage(SimpleMdbToDb.java:53) [mdbToDb.jar:]
    	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) [:1.8.0_131]
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_131]
    	at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_131]
    	at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
    	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    	at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43) [wildfly-ejb3-7.1.0.GA-redhat-2.jar:7.1.0.GA-redhat-2]
    	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    	at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45) [wildfly-ee-7.1.0.GA-redhat-2.jar:7.1.0.GA-redhat-2]
    	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    	at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:40)
    	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)
    	at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52)
    	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    	at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51) [wildfly-ejb3-7.1.0.GA-redhat-2.jar:7.1.0.GA-redhat-2]
    	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    	at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:255) [wildfly-ejb3-7.1.0.GA-redhat-2.jar:7.1.0.GA-redhat-2]
    	at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:334) [wildfly-ejb3-7.1.0.GA-redhat-2.jar:7.1.0.GA-redhat-2]
    	at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:240) [wildfly-ejb3-7.1.0.GA-redhat-2.jar:7.1.0.GA-redhat-2]
    	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    	at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [wildfly-ejb3-7.1.0.GA-redhat-2.jar:7.1.0.GA-redhat-2]
    	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    	at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:47) [wildfly-ejb3-7.1.0.GA-redhat-2.jar:7.1.0.GA-redhat-2]
    	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    	at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100) [wildfly-ejb3-7.1.0.GA-redhat-2.jar:7.1.0.GA-redhat-2]
    	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    	at org.jboss.as.ejb3.deployment.processors.StartupAwaitInterceptor.processInvocation(StartupAwaitInterceptor.java:22) [wildfly-ejb3-7.1.0.GA-redhat-2.jar:7.1.0.GA-redhat-2]
    	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    	at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64) [wildfly-ejb3-7.1.0.GA-redhat-2.jar:7.1.0.GA-redhat-2]
    	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    	at org.jboss.as.ejb3.deployment.processors.EjbSuspendInterceptor.processInvocation(EjbSuspendInterceptor.java:57) [wildfly-ejb3-7.1.0.GA-redhat-2.jar:7.1.0.GA-redhat-2]
    	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    	at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:67) [wildfly-ejb3-7.1.0.GA-redhat-2.jar:7.1.0.GA-redhat-2]
    	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    	at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
    	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    	at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54) [wildfly-ejb3-7.1.0.GA-redhat-2.jar:7.1.0.GA-redhat-2]
    	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    	at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentDescription$5$1.processInvocation(MessageDrivenComponentDescription.java:239) [wildfly-ejb3-7.1.0.GA-redhat-2.jar:7.1.0.GA-redhat-2]
    	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    	at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:60)
    	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    	at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:438)
    	at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:609) [wildfly-elytron-1.1.0.CR2-redhat-1.jar:1.1.0.CR2-redhat-1]
    	at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:57)
    	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)
    	at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:198)
    	at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:185)
    	at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:74)
    	at org.jboss.qa.hornetq.apps.mdb.SimpleMdbToDb$$$view1.onMessage(Unknown Source) [mdbToDb.jar:]
    	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) [:1.8.0_131]
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_131]
    	at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_131]
    	at org.jboss.as.ejb3.inflow.MessageEndpointInvocationHandler.doInvoke(MessageEndpointInvocationHandler.java:139) [wildfly-ejb3-7.1.0.GA-redhat-2.jar:7.1.0.GA-redhat-2]
    	at org.jboss.as.ejb3.inflow.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:73) [wildfly-ejb3-7.1.0.GA-redhat-2.jar:7.1.0.GA-redhat-2]
    	at org.jboss.qa.hornetq.apps.mdb.SimpleMdbToDb$$$endpoint1.onMessage(Unknown Source) [mdbToDb.jar:]
    	at org.apache.activemq.artemis.ra.inflow.ActiveMQMessageHandler.onMessage(ActiveMQMessageHandler.java:303)
    	at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:1001)
    	at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl.access$400(ClientConsumerImpl.java:49)
    	at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:1124)
    	at org.apache.activemq.artemis.utils.OrderedExecutorFactory$OrderedExecutor$ExecutorTask.run(OrderedExecutorFactory.java:101)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_131]
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_131]
    	at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_131]
    

    This exception will be thrown until original Sybase transaction branch is rolled back.

    Attachments

      Activity

        People

          rhn-support-ahoffer Andrea Hoffer
          mnovak1@redhat.com Miroslav Novak
          Daniel Simko Daniel Simko (Inactive)
          Daniel Simko Daniel Simko (Inactive)
          Votes:
          0 Vote for this issue
          Watchers:
          5 Start watching this issue

          Dates

            Created:
            Updated:
            Resolved: