Hi Richard,
if we are absolutely sure that JPA 3.2 is backwards compatible there shouldn't be a problem in my opinion. We didn't take much attention to the EE 10 TCK anyways, so failing the signature tests becase we can do more than EE 10 expects doesn't sound like something too bad.
Thinking out lout maybe we should publish the jakartaee-api 10.1 jar in two flavours - the standard jar stays on JPA 3.1 and we introduce a sort of "lax" classifier that doesn't strictly adhere to the EE 10 versions and allows us to do things like JPA 3.2? Essentially making the use of a non-portable TomEE 10 API entirely opt in. TomEE would of course need to package the "lax" jar always to allow JPA 3.2. WDYT?
Thanks Markus On 07.07.25 16:29, Richard Zowalla wrote:
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.)