2 Replies Latest reply on Jan 20, 2009 10:46 AM by torf

    XAException XAER_DUPID in CMP EJB finder invoked from a sche

      Hi,

      we have a org.jboss.varia.scheduler.Schedulable implementation which invokes a SLSB (MessageSchedulerTimer), which in turn invokes a CMP entity bean's (MessageEntryBean) finder method. Often it works fine, but sometimes the finder fails with a XAExcpetion with errorCode XAER_DUPID.

      It is running on a JBoss 4.0.4.GA with no other cluster members, and no other JBoss instances running on the same computer.

      Stack trace for a successful scheduler run (at 15:00:00), followed by one with XAER_DUPID (at 15:00:20). (Not shown here: the next run at 15:00:40 succeeds.)

      2007-01-11 15:00:00,962 DEBUG [org.jboss.varia.scheduler.Scheduler$Listener] Listener.handleNotification(), notification: javax.management.timer.TimerNotification[source=jboss:service=Timer][type=Schedule][message=Scheduler Notification]
      2007-01-11 15:00:00,962 DEBUG [org.jboss.varia.scheduler.Scheduler$Listener] Scheduler is started: true
      2007-01-11 15:00:00,962 DEBUG [de.mobilcom.messenger.scheduler.SchedulerTimerBean] onTimeout() invoked
      2007-01-11 15:00:00,962 DEBUG [de.mobilcom.messenger.scheduler.SchedulerTimerBean] handleOverduedMessages() invoked with RescheduleDelayMin=1,RescheduleDelayMax=50000000,RescheduleCountMax=1000
      2007-01-11 15:00:00,962 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.MessageEntryBean#findByTransmissionDate] Executing SQL: SELECT t0_o.id, t0_o.deleteDate, t0_o.message, t0_o.originator, t0_o.originatorCode, t0_o.originatorKey, t0_o.transmissionDate, t0_o.transmissionDate FROM messenger_messages t0_o WHERE (t0_o.transmissionDate < ?) ORDER BY t0_o.transmissionDate DESC
      2007-01-11 15:00:00,972 DEBUG [de.mobilcom.messenger.scheduler.SchedulerTimerBean] handleOverduedMessages() no overdued messages found
      2007-01-11 15:00:00,972 DEBUG [de.mobilcom.messenger.scheduler.SchedulerTimerBean] handleOutdatedMessages() invoked with RemoveCountMax=-1
      2007-01-11 15:00:00,972 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.MessageEntryBean#findByDeleteDate] Executing SQL: SELECT t0_o.id, t0_o.deleteDate, t0_o.message, t0_o.originator, t0_o.originatorCode, t0_o.originatorKey, t0_o.transmissionDate, t0_o.deleteDate FROM messenger_messages t0_o WHERE (t0_o.deleteDate < ?) ORDER BY t0_o.deleteDate ASC
      2007-01-11 15:00:00,982 DEBUG [de.mobilcom.messenger.scheduler.SchedulerTimerBean] handleOutdatedMessages() no outdated messages found
      2007-01-11 15:00:00,982 DEBUG [de.mobilcom.messenger.scheduler.SchedulerTimerBean] onTimeout() returned within 20 [ms]
      2007-01-11 15:00:00,982 DEBUG [org.jboss.varia.scheduler.Scheduler$Listener] Remaining Repititions: -1, wait for next call to stop: false
      2007-01-11 15:00:20,991 DEBUG [org.jboss.varia.scheduler.Scheduler$Listener] Listener.handleNotification(), notification: javax.management.timer.TimerNotification[source=jboss:service=Timer][type=Schedule][message=Scheduler Notification]
      2007-01-11 15:00:20,991 DEBUG [org.jboss.varia.scheduler.Scheduler$Listener] Scheduler is started: true
      2007-01-11 15:00:20,991 DEBUG [de.mobilcom.messenger.scheduler.SchedulerTimerBean] onTimeout() invoked
      2007-01-11 15:00:20,991 DEBUG [de.mobilcom.messenger.scheduler.SchedulerTimerBean] handleOverduedMessages() invoked with RescheduleDelayMin=1,RescheduleDelayMax=50000000,RescheduleCountMax=1000
      2007-01-11 15:00:20,991 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.MessageEntryBean#findByTransmissionDate] Executing SQL: SELECT t0_o.id, t0_o.deleteDate, t0_o.message, t0_o.originator, t0_o.originatorCode, t0_o.originatorKey, t0_o.transmissionDate, t0_o.transmissionDate FROM messenger_messages t0_o WHERE (t0_o.transmissionDate < ?) ORDER BY t0_o.transmissionDate DESC
      2007-01-11 15:00:20,991 WARN [org.jboss.tm.TransactionImpl] XAException: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=1052360-D/368, BranchQual=, localId=368] errorCode=XAER_DUPID
      javax.transaction.xa.XAException
       at com.informix.jdbcx.IfxXAResource.start(IfxXAResource.java:451)
       at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:117)
       at org.jboss.tm.TransactionImpl$Resource.startResource(TransactionImpl.java:2063)
       at org.jboss.tm.TransactionImpl.enlistResource(TransactionImpl.java:581)
       at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.enlist(TxConnectionManager.java:757)
       at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:548)
       at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:323)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:501)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:382)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:812)
       at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
       at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:225)
       at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:144)
       at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntitiesCommand.execute(JDBCFindEntitiesCommand.java:54)
       at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.findEntities(JDBCStoreManager.java:613)
       at org.jboss.ejb.plugins.CMPPersistenceManager.findEntities(CMPPersistenceManager.java:337)
       at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntities(CachedConnectionInterceptor.java:242)
       at org.jboss.ejb.EntityContainer.findLocal(EntityContainer.java:655)
       at sun.reflect.GeneratedMethodAccessor97.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
       at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1130)
       at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
       at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:203)
       at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:189)
       at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
       at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:134)
       at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:76)
       at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:43)
       at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:56)
       at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:125)
       at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
       at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:161)
       at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:145)
       at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:132)
       at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:107)
       at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:514)
       at org.jboss.ejb.Container.invoke(Container.java:975)
       at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:359)
       at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:133)
       at $Proxy95.findByTransmissionDate(Unknown Source)
       at de.mobilcom.messenger.repository.RepositoryEntityImpl.queryOverduedMessages(RepositoryEntityImpl.java:232)
       at de.mobilcom.messenger.scheduler.SchedulerTimerBean.handleOverduedMessages(SchedulerTimerBean.java:271)
       at de.mobilcom.messenger.scheduler.SchedulerTimerBean.onTimeout(SchedulerTimerBean.java:212)
       at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
       at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
       at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
       at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
       at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
       at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
       at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
       at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
       at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
       at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
       at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
       at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
       at org.jboss.ejb.Container.invoke(Container.java:954)
       at sun.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
       at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
       at org.jboss.invocation.InvokerInterceptor.invokeLocalMarshalled(InvokerInterceptor.java:292)
       at org.jboss.invocation.MarshallingInvokerInterceptor.invoke(MarshallingInvokerInterceptor.java:61)
       at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
       at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
       at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
       at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
       at $Proxy77.onTimeout(Unknown Source)
       at de.mobilcom.framework.timer.TimedObjectSchedulableRemote.perform(TimedObjectSchedulableRemote.java:118)
       at org.jboss.varia.scheduler.Scheduler$Listener.handleNotification(Scheduler.java:1235)
       at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)
       at $Proxy10.handleNotification(Unknown Source)
       at javax.management.NotificationBroadcasterSupport.handleNotification(Unknown Source)
       at javax.management.NotificationBroadcasterSupport.sendNotification(Unknown Source)
       at javax.management.timer.Timer.sendNotification(Unknown Source)
       at javax.management.timer.Timer.notifyAlarmClock(Unknown Source)
       at javax.management.timer.TimerAlarmClock.run(Unknown Source)
       at java.util.TimerThread.mainLoop(Unknown Source)
       at java.util.TimerThread.run(Unknown Source)
      2007-01-11 15:00:20,991 ERROR [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.MessageEntryBean#findByTransmissionDate] Find failed
      org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=1052360-D/368, BranchQual=, localId=368]); - nested throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=1052360-D/368, BranchQual=, localId=368]))
       at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94)
       at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:225)
       at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:144)
       at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntitiesCommand.execute(JDBCFindEntitiesCommand.java:54)
       at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.findEntities(JDBCStoreManager.java:613)
       at org.jboss.ejb.plugins.CMPPersistenceManager.findEntities(CMPPersistenceManager.java:337)
       at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntities(CachedConnectionInterceptor.java:242)
       at org.jboss.ejb.EntityContainer.findLocal(EntityContainer.java:655)
       at sun.reflect.GeneratedMethodAccessor97.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
       at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1130)
       at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
       at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:203)
       at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:189)
       at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
       at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:134)
       at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:76)
       at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:43)
       at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:56)
       at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:125)
       at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
       at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:161)
       at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:145)
       at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:132)
       at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:107)
       at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:514)
       at org.jboss.ejb.Container.invoke(Container.java:975)
       at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:359)
       at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:133)
       at $Proxy95.findByTransmissionDate(Unknown Source)
       at de.mobilcom.messenger.repository.RepositoryEntityImpl.queryOverduedMessages(RepositoryEntityImpl.java:232)
       at de.mobilcom.messenger.scheduler.SchedulerTimerBean.handleOverduedMessages(SchedulerTimerBean.java:271)
       at de.mobilcom.messenger.scheduler.SchedulerTimerBean.onTimeout(SchedulerTimerBean.java:212)
       at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
       at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
       at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
       at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
       at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
       at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
       at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
       at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
       at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
       at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
       at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
       at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
       at org.jboss.ejb.Container.invoke(Container.java:954)
       at sun.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
       at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
       at org.jboss.invocation.InvokerInterceptor.invokeLocalMarshalled(InvokerInterceptor.java:292)
       at org.jboss.invocation.MarshallingInvokerInterceptor.invoke(MarshallingInvokerInterceptor.java:61)
       at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
       at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
       at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
       at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
       at $Proxy77.onTimeout(Unknown Source)
       at de.mobilcom.framework.timer.TimedObjectSchedulableRemote.perform(TimedObjectSchedulableRemote.java:118)
       at org.jboss.varia.scheduler.Scheduler$Listener.handleNotification(Scheduler.java:1235)
       at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)
       at $Proxy10.handleNotification(Unknown Source)
       at javax.management.NotificationBroadcasterSupport.handleNotification(Unknown Source)
       at javax.management.NotificationBroadcasterSupport.sendNotification(Unknown Source)
       at javax.management.timer.Timer.sendNotification(Unknown Source)
       at javax.management.timer.Timer.notifyAlarmClock(Unknown Source)
       at javax.management.timer.TimerAlarmClock.run(Unknown Source)
       at java.util.TimerThread.mainLoop(Unknown Source)
       at java.util.TimerThread.run(Unknown Source)
      Caused by: org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=1052360-D/368, BranchQual=, localId=368])
       at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:329)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:501)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:382)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:812)
       at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
       ... 81 more
      Caused by: javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=1052360-D/368, BranchQual=, localId=368]
       at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.checkEnlisted(TxConnectionManager.java:728)
       at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:561)
       at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:323)
       ... 85 more
      2007-01-11 15:00:21,001 DEBUG [de.mobilcom.messenger.scheduler.SchedulerTimerBean] handleOverduedMessages() no overdued messages found
      2007-01-11 15:00:21,001 DEBUG [de.mobilcom.messenger.scheduler.SchedulerTimerBean] handleOutdatedMessages() invoked with RemoveCountMax=-1
      2007-01-11 15:00:21,001 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.MessageEntryBean#findByDeleteDate] Executing SQL: SELECT t0_o.id, t0_o.deleteDate, t0_o.message, t0_o.originator, t0_o.originatorCode, t0_o.originatorKey, t0_o.transmissionDate, t0_o.deleteDate FROM messenger_messages t0_o WHERE (t0_o.deleteDate < ?) ORDER BY t0_o.deleteDate ASC
      2007-01-11 15:00:21,001 WARN [org.jboss.tm.TransactionImpl] XAException: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=1052360-D/368, BranchQual=, localId=368] errorCode=XAER_DUPID
      javax.transaction.xa.XAException
       at com.informix.jdbcx.IfxXAResource.start(IfxXAResource.java:451)
       at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:117)
      


      The Schedulable deployment is:
      <?xml version="1.0" encoding="UTF-8"?>
      <server>
       <classpath codebase="deploy/applications/MessengerService" archives="MessengerService-api-v3.0.jar"/>
       <mbean code="org.jboss.varia.scheduler.Scheduler" name=":service=Scheduler,schedule=MessengerService">
       <depends>jboss.j2ee:service=EARDeployment,url='MessengerService-all-v3.0.0.ear'</depends>
       <attribute name="StartAtStartup">true</attribute>
       <attribute name="SchedulableClass">de.mobilcom.framework.timer.TimedObjectSchedulableRemote</attribute>
       <attribute name="SchedulableArguments">ejb/MessageSchedulerTimer</attribute>
       <attribute name="SchedulableArgumentTypes">java.lang.String</attribute>
       <attribute name="InitialStartDate">0</attribute>
       <attribute name="SchedulePeriod">20000</attribute>
       <attribute name="InitialRepetitions">-1</attribute>
       </mbean>
      </server>
      


      The relevant part of ejb-jar.xml:
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
      2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
      <ejb-jar >
       <description><![CDATA[No Description.]]></description>
       <display-name>Generated by XDoclet</display-name>
      
       <enterprise-beans>
       <!-- Session Beans -->
       <session >
       <description><![CDATA[The
      periodically invoked scheduler timer bean searches for any overdued message
      transmissions and immediately reschedules these messages. Normally this
      should not happen as all scheduled messages should be handled immediately by
      the <code> SchedulerMessageBean</code> on timed JMS scheduling message
      delivery. Nevertheless, due to the high importance of reliable message
      delivery, the scheduler timer acts as a fallback system for ensuring message
      transmission even in case of scheduling errors (e.g.]]></description>
      
       <ejb-name>MessageSchedulerTimer</ejb-name>
      
       <home>de.mobilcom.messenger.scheduler.MessageSchedulerTimerRemoteHome</home>
       <remote>de.mobilcom.messenger.scheduler.MessageSchedulerTimerRemote</remote>
       <ejb-class>de.mobilcom.messenger.scheduler.SchedulerTimerBean</ejb-class>
       <session-type>Stateless</session-type>
       <transaction-type>Container</transaction-type>
      
       <env-entry>
       <description><![CDATA[JMS user identity for sending scheduled JMS
      messages to internal queue]]></description>
       <env-entry-name>JMSQueueUser</env-entry-name>
       <env-entry-type>java.lang.String</env-entry-type>
       <env-entry-value><![CDATA[xxx]]></env-entry-value>
       </env-entry>
       <env-entry>
       <description><![CDATA[JMS user password]]></description>
       <env-entry-name>JMSQueuePassword</env-entry-name>
       <env-entry-type>java.lang.String</env-entry-type>
       <env-entry-value><![CDATA[xxx]]></env-entry-value>
       </env-entry>
      
       <security-identity>
       <run-as>
       <role-name>Service</role-name>
       </run-as>
       </security-identity>
       </session>
      
       <!-- Entity Beans -->
       <entity >
       <description><![CDATA[Message entry entity bean]]></description>
       <display-name>MessageEntryBean</display-name>
      
       <ejb-name>MessageEntryBean</ejb-name>
      
       <local-home>de.mobilcom.messenger.repository.MessageEntryBeanLocalHome</local-home>
       <local>de.mobilcom.messenger.repository.MessageEntryBeanLocal</local>
      
       <ejb-class>de.mobilcom.messenger.repository.MessageEntryBean</ejb-class>
       <persistence-type>Container</persistence-type>
       <prim-key-class>java.lang.Integer</prim-key-class>
       <reentrant>False</reentrant>
       <cmp-version>2.x</cmp-version>
       <abstract-schema-name>messages</abstract-schema-name>
       <cmp-field >
       <description><![CDATA[Gets the message delete date]]></description>
       <field-name>deleteDate</field-name>
       </cmp-field>
       <cmp-field >
       <description><![CDATA[Gets the message id (primary key)]]></description>
       <field-name>id</field-name>
       </cmp-field>
       <cmp-field >
       <description><![CDATA[Gets the message persistence value]]></description>
       <field-name>message</field-name>
       </cmp-field>
       <cmp-field >
       <description><![CDATA[Gets the originator persistence value]]></description>
       <field-name>originator</field-name>
       </cmp-field>
       <cmp-field >
       <description><![CDATA[Gets the originator code persistence value]]></description>
       <field-name>originatorCode</field-name>
       </cmp-field>
       <cmp-field >
       <description><![CDATA[Gets the originator key persistence value]]></description>
       <field-name>originatorKey</field-name>
       </cmp-field>
       <cmp-field >
       <description><![CDATA[Gets the next transmission date]]></description>
       <field-name>transmissionDate</field-name>
       </cmp-field>
       <primkey-field>id</primkey-field>
      
       <query>
       <query-method>
       <method-name>findByOriginatorAsc</method-name>
       <method-params>
       <method-param>java.lang.String</method-param>
       </method-params>
       </query-method>
       <ejb-ql><![CDATA[SELECT OBJECT(o) FROM messages AS o WHERE o.originator=?1 ORDER BY o.id ASC]]></ejb-ql>
       </query>
       <query>
       <query-method>
       <method-name>findByOriginatorDesc</method-name>
       <method-params>
       <method-param>java.lang.String</method-param>
       </method-params>
       </query-method>
       <ejb-ql><![CDATA[SELECT OBJECT(o) FROM messages AS o WHERE o.originator=?1 ORDER BY o.id DESC]]></ejb-ql>
       </query>
       <query>
       <query-method>
       <method-name>findByOriginatorAndOriginatorKeyAsc</method-name>
       <method-params>
       <method-param>java.lang.String</method-param>
       <method-param>java.lang.String</method-param>
       </method-params>
       </query-method>
       <ejb-ql><![CDATA[SELECT OBJECT(o) FROM messages AS o WHERE o.originator=?1 AND o.originatorKey=?2 ORDER BY o.id ASC]]></ejb-ql>
       </query>
       <query>
       <query-method>
       <method-name>findByOriginatorAndOriginatorKeyDesc</method-name>
       <method-params>
       <method-param>java.lang.String</method-param>
       <method-param>java.lang.String</method-param>
       </method-params>
       </query-method>
       <ejb-ql><![CDATA[SELECT OBJECT(o) FROM messages AS o WHERE o.originator=?1 AND o.originatorKey=?2 ORDER BY o.id DESC]]></ejb-ql>
       </query>
       <query>
       <query-method>
       <method-name>findByTransmissionDate</method-name>
       <method-params>
       <method-param>java.util.Date</method-param>
       </method-params>
       </query-method>
       <ejb-ql><![CDATA[SELECT OBJECT(o) FROM messages AS o WHERE o.transmissionDate < ?1 ORDER BY o.transmissionDate DESC]]></ejb-ql>
       </query>
       <query>
       <query-method>
       <method-name>findByDeleteDate</method-name>
       <method-params>
       <method-param>java.util.Date</method-param>
       </method-params>
       </query-method>
       <ejb-ql><![CDATA[SELECT OBJECT(o) FROM messages AS o WHERE o.deleteDate < ?1 ORDER BY o.deleteDate ASC]]></ejb-ql>
       </query>
       <!-- Write a file named ejb-finders-MessageEntryBean.xml if you want to define extra finders. -->
       </entity>
      
       </enterprise-beans>
      
       <!-- Relationships -->
      
       <!-- Assembly Descriptor -->
       <!--
       To specify your own assembly descriptor info here, add a file to your
       XDoclet merge directory called assembly-descriptor.xml that contains
       the <assembly-descriptor></assembly-descriptor> markup.
       -->
      
       <assembly-descriptor >
      
       <method-permission >
       <description><![CDATA[description not supported yet by ejbdoclet]]></description>
       <unchecked/>
       <method >
       <description><![CDATA[description not supported yet by ejbdoclet]]></description>
       <ejb-name>MessageEntryBean</ejb-name>
       <method-intf>Local</method-intf>
       <method-name>*</method-name>
       </method>
       </method-permission>
       <method-permission >
       <description><![CDATA[description not supported yet by ejbdoclet]]></description>
       <unchecked/>
       <method >
       <description><![CDATA[description not supported yet by ejbdoclet]]></description>
       <ejb-name>MessageEntryBean</ejb-name>
       <method-intf>LocalHome</method-intf>
       <method-name>*</method-name>
       </method>
       </method-permission>
       <method-permission >
       <description><![CDATA[description not supported yet by ejbdoclet]]></description>
       <unchecked/>
       <method >
       <description><![CDATA[description not supported yet by ejbdoclet]]></description>
       <ejb-name>MessageEntryBean</ejb-name>
       <method-intf>Remote</method-intf>
       <method-name>*</method-name>
       </method>
       </method-permission>
       <method-permission >
       <description><![CDATA[description not supported yet by ejbdoclet]]></description>
       <unchecked/>
       <method >
       <description><![CDATA[description not supported yet by ejbdoclet]]></description>
       <ejb-name>MessageEntryBean</ejb-name>
       <method-intf>Home</method-intf>
       <method-name>*</method-name>
       </method>
       </method-permission>
      
       <method-permission >
       <description><![CDATA[description not supported yet by ejbdoclet]]></description>
       <unchecked/>
       <method >
       <description><![CDATA[description not supported yet by ejbdoclet]]></description>
       <ejb-name>MessageSchedulerTimer</ejb-name>
       <method-intf>Local</method-intf>
       <method-name>*</method-name>
       </method>
       </method-permission>
       <method-permission >
       <description><![CDATA[description not supported yet by ejbdoclet]]></description>
       <unchecked/>
       <method >
       <description><![CDATA[description not supported yet by ejbdoclet]]></description>
       <ejb-name>MessageSchedulerTimer</ejb-name>
       <method-intf>LocalHome</method-intf>
       <method-name>*</method-name>
       </method>
       </method-permission>
       <method-permission >
       <description><![CDATA[description not supported yet by ejbdoclet]]></description>
       <unchecked/>
       <method >
       <description><![CDATA[description not supported yet by ejbdoclet]]></description>
       <ejb-name>MessageSchedulerTimer</ejb-name>
       <method-intf>Remote</method-intf>
       <method-name>*</method-name>
       </method>
       </method-permission>
       <method-permission >
       <description><![CDATA[description not supported yet by ejbdoclet]]></description>
       <unchecked/>
       <method >
       <description><![CDATA[description not supported yet by ejbdoclet]]></description>
       <ejb-name>MessageSchedulerTimer</ejb-name>
       <method-intf>Home</method-intf>
       <method-name>*</method-name>
       </method>
       </method-permission>
      
       <!-- transactions -->
       <!--
       To specify additional container-transaction elements, add a file in the merge
       directory called ejb-container-transactions.ent that contains them.
       -->
       <container-transaction >
       <method >
       <ejb-name>MessageEntryBean</ejb-name>
       <method-name>*</method-name>
       </method>
       <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction >
       <method >
       <ejb-name>MessageSchedulerTimer</ejb-name>
       <method-name>*</method-name>
       </method>
       <trans-attribute>Required</trans-attribute>
       </container-transaction>
      
       <!-- finder transactions -->
      
       <!-- message destinations -->
       <!--
       To specify additional message-destination elements, add a file in the merge
       directory called ejb-message-destinations.ent that contains them.
       -->
      
       <!-- exclude list -->
       <!--
       To specify an exclude-list element, add a file in the merge directory
       called ejb-exclude-list.xml that contains it.
       -->
       </assembly-descriptor>
      
      </ejb-jar>
      


      Can anyone please help?
      Thanks,
      Christoph

        • 1. Re: XAException XAER_DUPID in CMP EJB finder invoked from a
          ashwinde

          Hi,

          I was wondering if you ever solved your problem. If so, can you please share your findings?

          Ash

          • 2. Re: XAException XAER_DUPID in CMP EJB finder invoked from a

            Hi,

            yes, it was solved somehow, but unfortunately i don't know how.

            It is still running on JBoss 4.0.4GA. Maybe it works due to a newer Informix JDBC driver (we are using 3.00 JC3 now)?

            Or maybe the datasource config was changed. It currently looks like this:

            <?xml version="1.0" encoding="UTF-8"?>
            <datasources>
             <xa-datasource>
             <jndi-name>SystemDefaultDS</jndi-name>
             <xa-datasource-class>com.informix.jdbcx.IfxXADataSource</xa-datasource-class>
             <xa-datasource-property name="IfxIFXHOST">...</xa-datasource-property>
             <xa-datasource-property name="PortNumber">1723</xa-datasource-property>
             <xa-datasource-property name="DatabaseName">system_default_02</xa-datasource-property>
             <xa-datasource-property name="ServerName">zap_db_net</xa-datasource-property>
             <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
             <user-name>...</user-name>
             <password>...</password>
             <track-connection-by-tx>true</track-connection-by-tx>
             <prepared-statement-cache-size>100</prepared-statement-cache-size>
             <isSameRM-override-value>false</isSameRM-override-value>
             <no-tx-separate-pools/>
             <new-connection-sql>set lock mode to wait</new-connection-sql>
             <check-valid-connection-sql>set lock mode to wait</check-valid-connection-sql>
             <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.InformixExceptionSorter</exception-sorter-class-name>
             <!--pooling parameters-->
             <min-pool-size>1</min-pool-size>
             <max-pool-size>50</max-pool-size>
             <blocking-timeout-millis>5000</blocking-timeout-millis>
             <idle-timeout-minutes>5</idle-timeout-minutes>
             <metadata>
             <type-mapping>InformixDB</type-mapping>
             </metadata>
             </xa-datasource>
            </datasources>
            


            I'm sorry that i cannot be more helpful.

            Christoph