Could not enlist resource in distributed tx
asookazian Nov 2, 2010 2:43 PMWe have the following code in production that we can't replicate the behavior for in non-prod envmts. We are using Oracle 10g in all envmts with JBoss 4.2.2.GA. barDao and bazDao are using two different datasources: one is local-tx-datasource and the other is xa-datasource (I know that both should be XA in a distributed tx but that's what it is now in prod). We are getting the "could not enlist resource in tx" error when the 2nd line is executed (this is the local-tx-datasource). We are unable to reproduce using the same EAR in non-prod envmt. Why? There is no ejb-jar.xml transactional semantics override happening. In a different method of another SLSB which is a distrubted tx as well, the behavior is not happening. This is extremely confusing.
@Stateless
public class FooProcessorServiceBean {
public void fooMethod() {
barDao.fetch();
bazDao.fetch();
}
}
All db operations via JPA/Hibernate are read-only (this is a reporting app). We can use @NOT_SUPPORTED tx attribute type for the above method but we can't reproduce to see if this fixes the problem in another envmt other than prod.
What config files should I check (I've looked at oracle-ds.xml and jboss-service.xml)? Is it possible this is data-related? thx.
2010-11-01 12:41:47,568 WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: null
2010-11-01 12:41:47,568 ERROR [org.hibernate.util.JDBCExceptionReporter] 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=TransactionImple < ac, BasicAction: a02451c:9925:4cc0c841:7c7fc status: ActionStatus.ABORT_ONLY >); - 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=TransactionImple < ac, BasicAction: a02451c:9925:4cc0c841:7c7fc status: ActionStatus.ABORT_ONLY >))
2010-11-01 12:41:47,569 INFO [org.hibernate.event.def.DefaultLoadEventListener] Error performing load command
org.hibernate.exception.GenericJDBCException: Cannot open connection
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)