you can try it out, but if there is any non-default method added to an 
interface, then it will break. So not 100% sure it can be done so easily.
Otherwise let's go for it, OpenJPA supports the 3.2 API since a while afair.
LieGrue,strub
    On Tuesday, 15 July 2025 at 22:17:46 CEST, Richard Zowalla 
<r...@apache.org> wrote:  
 
 Hi all,

I ran some manual tests using the JPA 3.2 shade [1]. I built TomEE locally with 
the updated SNAPSHOT EE API (including JPA 3.2) from [2]., added no-op 
implementations for the newly introduced methods in 
org.apache.openejb.persistence where needed, and tested everything with my 
applications.

Everything worked fine with both Hibernate 7.0.6 (JPA 3.2) and Hibernate 6.6.16 
(JPA 3.1), so I’m optimistic that it will also work out of the box with OpenJPA 
and EclipseLink.

To further test it, we’d need to deploy a snapshot version of the API shade and 
run a full TomEE build with the changes to validate further.

Gruß

Richard

[1] https://github.com/apache/tomee-jakartaee-api/tree/jpa3.2
[2] https://github.com/apache/tomee/tree/jpa3.2


> Am 07.07.2025 um 16:29 schrieb Richard Zowalla <r...@apache.org>:
> 
> 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.)
> 
> 

  

Reply via email to