strange xaRes not enlisted exceptions
bruces Jun 20, 2002 5:32 PMWith the released 3.0 product we've hit several situations in our regression tests that are throwing exceptions involving jca connections obtained in stateful session bean methods. The server traces listed here include adapter debugging output showing points at which the container invoked methods on the adapter.
1) bean method has Never transaction attribute, gets a connection through jca adapter, tries to create a stateful session bean and gets IllegalArgumentException
12:20:28,094 INFO [STDOUT] [06/20/02 12:20:28.094 PDT]::::: NEVER->NEVER BEGIN :::::
12:20:28,095 INFO [STDOUT] [06/20/02 12:20:28.095 PDT]::::: Getting Connection
12:20:28,096 INFO [Facets] [06/20/02 12:20:28.096 PDTRMI TCP Connection(8)-10.80.10.114] [Facets] using pooled connection CC3( PM 200 (workspace 4) (inactive manual txn) inJTx=false)
12:20:28,098 INFO [Facets] [06/20/02 12:20:28.097 PDTRMI TCP Connection(8)-10.80.10.114] #mc.getConnection# CC3( PM 200 (workspace 4) (inactive manual txn) inJTx=false)
12:20:28,099 INFO [Facets] [06/20/02 12:20:28.099 PDTRMI TCP Connection(8)-10.80.10.114] [Facets] no user/password for CC3( PM 200 (workspace 4) (inactive manual txn) inJTx=false)
12:20:28,102 INFO [STDOUT] [06/20/02 12:20:28.101 PDT]::::: Connection obtained
12:20:28,103 INFO [STDOUT] [06/20/02 12:20:28.103 PDT]::::: jca.ejb.cmtx.TestServiceBean.testSessionCall_Never SID: 200 TxID: 358170207715330 Tx: false
12:20:28,107 INFO [Facets] [06/20/02 12:20:28.106 PDTRMI TCP Connection(8)-10.80.10.114] #mc.cleanup# CC3( PM 200 (workspace 4) (inactive manual txn) inJTx=false)
12:20:28,108 INFO [Facets] [06/20/02 12:20:28.108 PDTRMI TCP Connection(8)-10.80.10.114] #mc.getXAResource# CC3( PM 200 (workspace 4) (inactive manual txn) inJTx=false)
12:20:28,111 ERROR [STDERR] java.rmi.ServerException: xaRes not enlisted; nested exception is:
java.lang.IllegalArgumentException: xaRes not enlisted
12:20:28,112 ERROR [STDERR] java.lang.IllegalArgumentException: xaRes not enlisted
12:20:28,113 ERROR [STDERR] at org.jboss.tm.TxCapsule.delistResource(TxCapsule.java:546)
12:20:28,113 ERROR [STDERR] at org.jboss.tm.TransactionImpl.delistResource(TransactionImpl.java:93)
12:20:28,114 ERROR [STDERR] at org.jboss.resource.connectionmanager.XATxConnectionManager$XAConnectionEventListener.delist(XATxConnectionManager.java:284)
12:20:28,115 ERROR [STDERR] at org.jboss.resource.connectionmanager.XATxConnectionManager.managedConnectionDisconnected(XATxConnectionManager.java:219)
12:20:28,116 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2.disconnect(BaseConnectionManager2.java:627)
12:20:28,116 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionManager.disconnect(CachedConnectionManager.java:358)
12:20:28,118 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionManager.pushMetaAwareObject(CachedConnectionManager.java:126)
12:20:28,118 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:212)
12:20:28,119 ERROR [STDERR] at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invokeHome(StatefulSessionInstanceInterceptor.java:128)
12:20:28,120 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:98)
12:20:28,121 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:167)
12:20:28,121 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)
12:20:28,122 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:109)
12:20:28,123 ERROR [STDERR] at org.jboss.ejb.StatefulSessionContainer.invokeHome(StatefulSessionContainer.java:368)
12:20:28,124 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:726)
12:20:28,124 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
12:20:28,125 ERROR [STDERR] at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:98)
12:20:28,126 ERROR [STDERR] at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
12:20:28,126 ERROR [STDERR] at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:73)
12:20:28,127 ERROR [STDERR] at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76)
12:20:28,128 ERROR [STDERR] at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:185)
12:20:28,129 ERROR [STDERR] at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
12:20:28,129 ERROR [STDERR] at $Proxy28.create(Unknown Source)
12:20:28,131 ERROR [STDERR] at jca.ejb.cmtx.TestServiceBean.testSessionCall_Never(TestServiceBean.java:206)
12:20:28,131 ERROR [STDERR] at java.lang.reflect.Method.invoke(Native Method)
12:20:28,132 ERROR [STDERR] at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:823)
12:20:28,133 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:129)
12:20:28,133 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
12:20:28,134 ERROR [STDERR] at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:266)
12:20:28,135 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:96)
12:20:28,136 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:282)
12:20:28,136 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:61)
12:20:28,139 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)
12:20:28,140 ERROR [STDERR] at org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:380)
12:20:28,141 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:705)
12:20:28,141 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
12:20:28,142 ERROR [STDERR] at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:362)
12:20:28,143 ERROR [STDERR] at java.lang.reflect.Method.invoke(Native Method)
12:20:28,144 ERROR [STDERR] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:236)
12:20:28,145 ERROR [STDERR] at sun.rmi.transport.Transport$1.run(Transport.java:147)
12:20:28,146 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method)
12:20:28,146 ERROR [STDERR] at sun.rmi.transport.Transport.serviceCall(Transport.java:143)
12:20:28,147 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
12:20:28,148 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
12:20:28,149 ERROR [STDERR] at java.lang.Thread.run(Thread.java:479)
12:20:28,150 INFO [Facets] [06/20/02 12:20:28.149 PDTRMI TCP Connection(8)-10.80.10.114] [Facets] Closing PM 200 (workspace 4) (inactive manual txn)
12:20:28,151 INFO [Facets] [06/20/02 12:20:28.151 PDTRMI TCP Connection(8)-10.80.10.114] #mc.notifyListeners# connection closed
2) The same thing happens in a NotSupported method that's invoking another bean
3) Ditto in a bean method with Supports invoking another bean when there's no transaction
4) In a bean method with RequiresNew invoking another bean method with RequiresNew, the exception happens after creating the bean:
12:20:29,127 INFO [STDOUT] [06/20/02 12:20:29.126 PDT]::::: REQUIRES NEW->REQUIRES NEW BEGIN :::::
12:20:29,128 INFO [STDOUT] [06/20/02 12:20:29.127 PDT]::::: Getting Connection
12:20:29,508 INFO [Facets] [06/20/02 12:20:29.508 PDTRMI TCP Connection(8)-10.80.10.114] [Facets] created connection CC6( PM 203 (workspace 7) (inactive manual txn) inJTx=false)
12:20:29,510 INFO [Facets] [06/20/02 12:20:29.509 PDTRMI TCP Connection(8)-10.80.10.114] #mc.getXAResource# CC6( PM 203 (workspace 7) (inactive manual txn) inJTx=false)
12:20:29,511 INFO [Facets] [06/20/02 12:20:29.511 PDTRMI TCP Connection(8)-10.80.10.114] #xa.start[hash=2099080,session=PM 203 (workspace 7) (inactive manual txn)] xid=XidImpl [FormatId=257, GlobalId=dirt//26, BranchQual=1]
12:20:29,512 INFO [Facets] [06/20/02 12:20:29.512 PDTRMI TCP Connection(8)-10.80.10.114] #mc.getConnection# CC6( PM 203 (workspace 7) (active manual txn) inJTx=true)
12:20:29,514 INFO [Facets] [06/20/02 12:20:29.513 PDTRMI TCP Connection(8)-10.80.10.114] [Facets] no user/password for CC6( PM 203 (workspace 7) (active manual txn) inJTx=true)
12:20:29,516 INFO [STDOUT] [06/20/02 12:20:29.515 PDT]::::: Connection obtained
12:20:29,517 INFO [STDOUT] [06/20/02 12:20:29.516 PDT]::::: jca.ejb.cmtx.TestServiceBean.testSessionCall_RequiresNew SID: 203 TxID: 358174502682626 Tx: true
12:20:29,520 INFO [Facets] [06/20/02 12:20:29.519 PDTRMI TCP Connection(8)-10.80.10.114] #mc.cleanup# CC6( PM 203 (workspace 7) (active manual txn) inJTx=true)
12:20:29,521 INFO [Facets] [06/20/02 12:20:29.520 PDTRMI TCP Connection(8)-10.80.10.114] #mc.getXAResource# CC6( PM 203 (workspace 7) (active manual txn) inJTx=true)
12:20:29,522 INFO [Facets] [06/20/02 12:20:29.521 PDTRMI TCP Connection(8)-10.80.10.114] #xa.end[hash=2099080,session=PM 203 (workspace 7) (active manual txn)] xid=XidImpl [FormatId=257, GlobalId=dirt//26, BranchQual=1]
12:20:29,523 INFO [Facets] [06/20/02 12:20:29.522 PDTRMI TCP Connection(8)-10.80.10.114] #mc.cleanup# CC6( PM 203 (workspace 7) (active manual txn) inJTx=true)
12:20:29,552 INFO [Facets] [06/20/02 12:20:29.552 PDTRMI TCP Connection(8)-10.80.10.114] [Facets] using pooled connection CC6( PM 203 (workspace 7) (active manual txn) inJTx=true)
12:20:29,553 INFO [Facets] [06/20/02 12:20:29.553 PDTRMI TCP Connection(8)-10.80.10.114] #mc.getXAResource# CC6( PM 203 (workspace 7) (active manual txn) inJTx=true)
12:20:29,555 INFO [Facets] [06/20/02 12:20:29.554 PDTRMI TCP Connection(8)-10.80.10.114] #xa.start[hash=2099080,session=PM 203 (workspace 7) (active manual txn)] xid=XidImpl [FormatId=257, GlobalId=dirt//26, BranchQual=1] trs=resource
12:20:29,556 INFO [Facets] [06/20/02 12:20:29.556 PDTRMI TCP Connection(8)-10.80.10.114] #mc.associateConnection# CC6( PM 203 (workspace 7) (active manual txn) inJTx=true) associating session wrapper JCA session PM 203 (workspace 7) (active manual txn)
12:20:29,559 INFO [Facets] [06/20/02 12:20:29.558 PDTRMI TCP Connection(8)-10.80.10.114] #mc.cleanup# CC6( PM 203 (workspace 7) (active manual txn) inJTx=true)
12:20:29,560 INFO [Facets] [06/20/02 12:20:29.560 PDTRMI TCP Connection(8)-10.80.10.114] #mc.getXAResource# CC6( PM 203 (workspace 7) (active manual txn) inJTx=true)
12:20:29,562 ERROR [STDERR] java.rmi.ServerException: xaRes not enlisted; nested exception is:
java.lang.IllegalArgumentException: xaRes not enlisted
12:20:29,562 ERROR [STDERR] java.lang.IllegalArgumentException: xaRes not enlisted
12:20:29,563 ERROR [STDERR] at org.jboss.tm.TxCapsule.delistResource(TxCapsule.java:546)
12:20:29,564 ERROR [STDERR] at org.jboss.tm.TransactionImpl.delistResource(TransactionImpl.java:93)
12:20:29,565 ERROR [STDERR] at org.jboss.resource.connectionmanager.XATxConnectionManager$XAConnectionEventListener.delist(XATxConnectionManager.java:284)
12:20:29,566 ERROR [STDERR] at org.jboss.resource.connectionmanager.XATxConnectionManager.managedConnectionDisconnected(XATxConnectionManager.java:219)
12:20:29,566 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2.disconnect(BaseConnectionManager2.java:627)
12:20:29,567 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionManager.disconnect(CachedConnectionManager.java:358)
12:20:29,568 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionManager.pushMetaAwareObject(CachedConnectionManager.java:126)
12:20:29,569 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:183)
12:20:29,570 ERROR [STDERR] at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:266)
12:20:29,571 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:96)
12:20:29,571 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:242)
12:20:29,572 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:61)
12:20:29,572 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)
12:20:29,573 ERROR [STDERR] at org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:380)
12:20:29,574 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:705)
12:20:29,575 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
12:20:29,576 ERROR [STDERR] at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:98)
12:20:29,576 ERROR [STDERR] at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
12:20:29,577 ERROR [STDERR] at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:73)
12:20:29,578 ERROR [STDERR] at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76)
12:20:29,579 ERROR [STDERR] at org.jboss.proxy.ejb.StatefulSessionInterceptor.invoke(StatefulSessionInterceptor.java:117)
12:20:29,580 ERROR [STDERR] at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
12:20:29,581 ERROR [STDERR] at $Proxy36.test_RequiresNew(Unknown Source)
12:20:29,581 ERROR [STDERR] at jca.ejb.cmtx.TestServiceBean.testSessionCall_RequiresNew(TestServiceBean.java:244)
12:20:29,582 ERROR [STDERR] at java.lang.reflect.Method.invoke(Native Method)
12:20:29,583 ERROR [STDERR] at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:823)
12:20:29,584 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:129)
12:20:29,584 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
12:20:29,585 ERROR [STDERR] at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:266)
12:20:29,586 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:96)
12:20:29,586 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:242)
12:20:29,587 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:61)
12:20:29,588 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)
12:20:29,589 ERROR [STDERR] at org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:380)
12:20:29,590 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:705)
12:20:29,590 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
12:20:29,591 ERROR [STDERR] at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:362)
12:20:29,592 ERROR [STDERR] at java.lang.reflect.Method.invoke(Native Method)
12:20:29,593 ERROR [STDERR] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:236)
12:20:29,594 ERROR [STDERR] at sun.rmi.transport.Transport$1.run(Transport.java:147)
12:20:29,594 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method)
12:20:29,595 ERROR [STDERR] at sun.rmi.transport.Transport.serviceCall(Transport.java:143)
12:20:29,596 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
12:20:29,596 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
12:20:29,597 ERROR [STDERR] at java.lang.Thread.run(Thread.java:479)
12:20:29,599 INFO [Facets] [06/20/02 12:20:29.598 PDTRMI TCP Connection(8)-10.80.10.114] [Facets] Closing PM 203 (workspace 7) (active manual txn)
12:20:29,599 INFO [Facets] [06/20/02 12:20:29.599 PDTRMI TCP Connection(8)-10.80.10.114] #mc.notifyListeners# connection closed
12:20:29,601 INFO [Facets] [06/20/02 12:20:29.601 PDTRMI TCP Connection(8)-10.80.10.114] #xa.end[hash=2099080,session=PM 203 (workspace 7) (active manual txn)] xid=XidImpl [FormatId=257, GlobalId=dirt//26, BranchQual=1]
12:20:29,603 INFO [Facets] [06/20/02 12:20:29.602 PDTRMI TCP Connection(8)-10.80.10.114] #xa.commit[hash=2099080,session=PM 203 (workspace 7) (active manual txn)] xid=XidImpl [FormatId=257, GlobalId=dirt//26, BranchQual=1] trs=resource
12:20:29,605 INFO [Facets] [06/20/02 12:20:29.605 PDTRMI TCP Connection(8)-10.80.10.114] #xa.forget[hash=2099080,session=PM 203 (workspace 7) (inactive manual txn)] xid=XidImpl [FormatId=257, GlobalId=dirt//26, BranchQual=1] trs=resource
The list goes on, but they're all one of these two exceptions. I'm equipped to rebuild and test any changes people might suggest. These tests run okay in weblogic and websphere with the same adapter.