Deploying Hibernate on WAS 8.5.5 tries to use Liberty JTA Platform
Description
Activity
Show:
Details
Details
Assignee
Unassigned
UnassignedReporter
manolan
manolanWorked in
Components
Affects versions
Priority
Created February 3, 2023 at 1:39 PM
Updated February 3, 2023 at 1:39 PM
When upgrading some old applications to Hibernate 5, we have encountered a problem where Hibernate tries to use the Liberty JTA Platform:
o.s.o.h.SpringSessionContext - Could not introspect Hibernate JtaPlatform for SpringJtaSessionContext org.hibernate.engine.transaction.jta.platform.spi.JtaPlatformException: Could not obtain WebSphere Liberty transaction manager instance at org.hibernate.engine.transaction.jta.platform.internal.WebSphereLibertyJtaPlatform.locateTransactionManager(WebSphereLibertyJtaPlatform.java:42)
I can override this by setting hibernate.transaction.jta.platform directly.
Looking at StandardJtaPlatformResolver source code, I can see that it looks first for the existence of a class
com.ibm.tx.jta.TransactionManagerFactory
and, if it finds it, chooses to use Liberty. At a guess, I would say this check is flawed and this class is found in Websphere 8.5.5.x not just in the Liberty profile.