Nick's Tech Blog: Caused by: org.hibernate.HibernateException: Could not obtain WebSphere TransactionManager

Pages

Thursday, June 9, 2011

Caused by: org.hibernate.HibernateException: Could not obtain WebSphere TransactionManager

Problem

Received the following stacktrace from Websphere7.

Caused by: org.hibernate.HibernateException: Could not obtain WebSphere TransactionManager
(Stack trace removed...)
Caused by: java.lang.ClassCastException: com.ibm.ws.tx.jta.TranManagerSet incompatible with javax.transaction.TransactionManager


Solution

Make sure you have the following transaction manager lookup class in your persistence.xml.

<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.WebSphereExtendedJTATransactionLookup" />

See: http://lockdog.wordpress.com/2009/09/07/6/ (May require Google translate)

1 comment:

  1. Thanks a lot. It saved my many days
    Regards
    Ashok

    ReplyDelete