Let Hibernate configure the transaction manager on WebSphere
See original GitHub issueWhen using Spring Boot 1.5.2 in Websphere 8.5.5.10, Sping Data Jpa autoconfiguration (i.e. class HibernateJpaAutoConfiguration) detects the WebSphere container and attempts to configure “JtaPlatformManager” using one of the following classes : org.hibernate.engine.transaction.jta.platform.internal.WebSphereExtendedJtaPlatform and org.hibernate.service.jta.platform.internal.WebSphereExtendedJtaPlatform.
The latter is no longer existing in Hibernate 5 (seems to be cleaned out), so there is not point in referring to it in Spring Boot autoconfiguration. The former seems to be an incomplete implementation (many methods raise UnsupportedOperationException).
So when a transaction is rolled back, e.g. because of a bean validation constraint violation, an UnsupportedOperationException is raised instead of ConstraintViolationException.
A workaround is to replace the WebSphereExtendedJtaPlatform with org.hibernate.service.jta.platform.internal.WebSphereJtaPlatform, by the means of custom JPA properties (spring.jpa.properties.*) but I am not sure if it has side effects
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (7 by maintainers)

Top Related StackOverflow Question
Hi, WebSphere/Liberty developer here. We contributed a new
WebSphereLibertyJtaPlatformplatform to Hibernate which is picked up as of version 5.2.13 and 5.3.Beta2. This new platform class allows Hibernate to fully integrate with the WebSphere transaction manager and does not throw any UOEs.Unless Spring is explicitly setting the
hibernate.transaction.jta.platformproperty, Hibernate is now capable of auto-detecting availability of the WebSphere transaction manager and usingWebSphereLibertyJtaPlatformout of the box.Further details here: https://hibernate.atlassian.net/browse/HHH-11571
After further investigation, I am changing my mind (see the analysis in #14194) and I’ll fix things only for the Websphere case for now.