File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Application Frameworks and the fly likes javax.resource.ResourceException: enlist: caught Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "javax.resource.ResourceException: enlist: caught Exception" Watch "javax.resource.ResourceException: enlist: caught Exception" New topic

javax.resource.ResourceException: enlist: caught Exception

Neal Sharman

Joined: Oct 24, 2007
Posts: 16
I am running into the following error:

javax.resource.ResourceException: enlist: caught Exception
... 67 more
Caused by: Illegal attempt to enlist multiple 1PC XAResources

I am trying to access a DAO using Spring and Hibernate from an EJB SLSB (CMT). The database is on an iseries server and is DB2. The app server is WAS 6.1 The hibernate properties I am using:

<property name="hibernateProperties">
<prop key="hibernate.dialect">org.hibernate.dialect.DB2400Dialect</prop>
<prop key="hibernate.connection.release_more">auto</prop>
<prop key="hibernate.connection.isolation">0</prop>
<prop key="hibernate.connection.autocommit">true</prop>
<prop key="hibernate.c3p0.minPoolSize">5</prop>
<prop key="hibernate.c3p0.maxPoolSize">20</prop>
<prop key="hibernate.c3p0.timeout">600</prop>
<prop key="hibernate.c3p0.max_statement">50</prop>
<prop key="show_sql">true</prop>
<prop key="hibernate.format_sql">true</prop>
<prop key="hibernate.use_sql_comments">true</prop>

<prop key="current_session_context_class">org.hibernate.context.ThreadLocalSessionContext</prop>

<prop key="hibernate.current_session_context_class">jta</prop>
<prop key="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</prop>
<prop key="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.WebSphereExtendedJTATransactionLookup</prop>


Strangely this seems to happen for only one query ( Ihave included the code below):

Query qry = session.getNamedQuery(VinSearchItem.class.getName() + vinSearchQry)
.setString("companyCode", companyCode)
.setString("productType", productType)
.setString("dealerNo", dealerNo)
.setString("vinPart", "%" + vinPart);

List vins = qry.list();

All other queries work fine. Any feed back will be greatly appreciated. I am sure I am messing up on some configuration parameter.

I agree. Here's the link:
subject: javax.resource.ResourceException: enlist: caught Exception