Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1058626

Summary: Failing enlisting transaction when JTS transaction with JDBC object store is used
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Ondrej Chaloupka <ochaloup>
Component: Transaction ManagerAssignee: tom.jenkinson
Status: CLOSED CURRENTRELEASE QA Contact: Ondrej Chaloupka <ochaloup>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: kkhan
Target Milestone: DR6   
Target Release: EAP 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-28 15:25:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1078148    
Bug Blocks:    
Attachments:
Description Flags
war file with servlet and ejb none

Description Ondrej Chaloupka 2014-01-28 08:02:18 UTC
There is a problem in using transactions when:
 - jts is used
 - jdbc object store is set
 - jdbc store is set to drop state tables

When you try to work with XA resource you would get exception.
(Checked with JMS HornetQ resource in fact).

The same issue got for WildFly server as well.


16:35:46,949 WARN  [com.arjuna.ats.jts] (http-localhost.localdomain/127.0.0.1:8080-1) ARJUNA022079: RCManager could not find file in object store during setup.
16:35:46,950 WARN  [com.arjuna.ats.jts] (http-localhost.localdomain/127.0.0.1:8080-1) ARJUNA022078: RCManager could not find file in object store.                                                                                                 
16:35:46,950 WARN  [com.arjuna.ats.jts] (http-localhost.localdomain/127.0.0.1:8080-1) ARJUNA022026: Creation of RecoveryCoordinator for 0:ffff7f000001:-7640d95:52e67cc6:10 threw exception: org.omg.CORBA.BAD_OPERATION: RecoveryCoordinator ARJUNA022027: not created!                                                                                                                                                                                                                              
16:35:46,959 ERROR [org.hornetq.ra] (http-localhost.localdomain/127.0.0.1:8080-1) HQ154002: Could not create session: javax.resource.ResourceException: IJ000457: Unchecked throwable in managedConnectionReconnected() cl=org.jboss.jca.core.connectionmanager.listener.TxConnectionListener@5b9ca221[state=NORMAL managed connection=org.hornetq.ra.HornetQRAManagedConnection@534f18c2 connection handles=0 lastUse=1390836946958 trackByTx=false pool=org.jboss.jca.core.connectionmanager.pool.strategy.PoolByCri@6de29348 pool internal context=SemaphoreArrayListManagedConnectionPool@5b0673d3[pool=HornetQConnectionDefinition] xaResource=XAResourceWrapperImpl@36339454[xaResource=org.hornetq.ra.HornetQRAXAResource@40122908 pad=false overrideRmValue=null productName=HornetQ productVersion=2.0 jndiName=java:/JmsXA] txSync=null]                                                                    
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
 at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
Caused by: javax.resource.ResourceException: IJ000461: Could not enlist in transaction on entering meta-aware object
 at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.managedConnectionReconnected(TxConnectionManagerImpl.java:474)
 at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.reconnectManagedConnection(AbstractConnectionManager.java:599)
 ... 66 more
Caused by: javax.transaction.SystemException: IJ000356: Failed to enlist: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < jts, 0:ffff7f000001:-7640d95:52e67cc6:10 >
 at org.jboss.jca.core.connectionmanager.listener.TxConnectionListener$TransactionSynchronization.checkEnlisted(TxConnectionListener.java:612)
 at org.jboss.jca.core.connectionmanager.listener.TxConnectionListener.enlist(TxConnectionListener.java:323)
 at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.managedConnectionReconnected(TxConnectionManagerImpl.java:467)
 ... 67 more
16:35:46,963 SEVERE [org.jboss.ochaloup.TestEJBBean] (http-localhost.localdomain/127.0.0.1:8080-1) Error in sending a message: javax.jms.JMSException: Could not create a session: IJ000457: Unchecked throwable in managedConnectionReconnected() cl=org.jboss.jca.core.connectionmanager.listener.TxConnectionListener@5b9ca221[state=NORMAL managed connection=org.hornetq.ra.HornetQRAManagedConnection@534f18c2 connection handles=0 lastUse=1390836946958 trackByTx=false pool=org.jboss.jca.core.connectionmanager.pool.strategy.PoolByCri@6de29348 pool internal context=SemaphoreArrayListManagedConnectionPool@5b0673d3[pool=HornetQConnectionDefinition] xaResource=XAResourceWrapperImpl@36339454[xaResource=org.hornetq.ra.HornetQRAXAResource@40122908 pad=false overrideRmValue=null productName=HornetQ productVersion=2.0 jndiName=java:/JmsXA] txSync=null]

Comment 3 Ondrej Chaloupka 2014-01-28 08:10:36 UTC
Created attachment 856420 [details]
war file with servlet and ejb

Comment 4 tom.jenkinson 2014-03-13 16:34:21 UTC
Good catch, as this only affects dropTable scenario I am not too worried as that is really a test feature but we should certainly fix it.

I think the solution could be to utilize a map in com.arjuna.ats.internal.arjuna.objectstore.jdbc.JDBCStore that is keyed on the datasourceName in jdbcStoreEnvironmentBean.getJdbcAccess().

Is this a high priority for you? Could you not use dropTable in standalone.xml and just trunc the JBossTSTxTable yourself pre test?

Tom

Comment 5 Ondrej Chaloupka 2014-03-13 22:23:11 UTC
Hi Tom,

no, from my point of view it's not top priority and it does not block testing. 

Generally I think it is better to have it fixed but it could be postponed somelike. It depends on you how you consider it.

Ondra

Comment 6 tom.jenkinson 2014-03-17 14:35:01 UTC
https://github.com/jbosstm/narayana/pull/617

Comment 7 Kabir Khan 2014-03-20 09:48:05 UTC
Resolved by upgrade in 1078148

Comment 9 Ondrej Chaloupka 2014-03-27 16:03:06 UTC
Verified for EAP 6.3.0.DR6.