Re: [DISCUSS] Support for Hibernate 7 (JPA 3.2) in TomEE 10.1.x ?
Richard Zowalla <[email protected]>
| Newsgroups | gmane.comp.java.openejb.devel |
|---|---|
| Message-ID | <[email protected]> |
Any other thoughts on this? > Am 07.07.2025 um 16:29 schrieb Richard Zowalla <[email protected]>: > > Hi all, > > I've been experimenting with Hibernate 7.0.5 recently, since the 6.6.x (EE10) version is no longer actively maintained. > > As part of this, I noticed that JPA 3.2 introduces a number of new features and deprecations to the API (see: https://jakarta.ee/specifications/persistence/3.2/), though it does not remove any existing features. > > However, upgrading to Hibernate 7.x currently fails when using a JTA transaction type in persistence.xml, due to the following error: > > > > Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.jpa.internal.util.PersistenceUnitTransactionTypeHelper$1 > > at org.hibernate.jpa.internal.util.PersistenceUnitTransactionTypeHelper.toNewForm(PersistenceUnitTransactionTypeHelper.java:55) > > at org.hibernate.jpa.boot.internal.PersistenceUnitInfoDescriptor.getPersistenceUnitTransactionType(PersistenceUnitInfoDescriptor.java:67) > > at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.determineTransactionType(EntityManagerFactoryBuilderImpl.java:855) > > at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.normalizeTransactionCoordinator(EntityManagerFactoryBuilderImpl.java:803) > > at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.normalizeSettings(EntityManagerFactoryBuilderImpl.java:657) > > at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.mergeSettings(EntityManagerFactoryBuilderImpl.java:592) > > at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:224) > > at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:173) > > > To enable support for Hibernate 7 (which is quite widely adopted), I’d like to propose that we consider including the JPA 3.2 API in our EE API shade, and release a version like 10.1 (or similar). > > While this could potentially break signature tests in the API shade, it would unblock users who want to adopt Hibernate 7 today. > > I’d love to get your thoughts on whether this is a direction we want to pursue. > > Gruß > > Richard > > > > (Side note: we could start moving toward TomEE 11, but progress there is currently blocked due to CXF not being EE11-ready yet.) > >