Trying to setup Spring 6 with Hibernate 5 is not working.

Using org.springframework.orm.hibernate5.LocalSessionFactoryBean which will try to setup org.springframework.orm.hibernate5.SpringSessionContext

In its Constructor: this.transactionManager = jtaPlatform.retrieveTransactionManager();

=> java.lang.NoSuchMethodError: 'jakarta.transaction.TransactionManager org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform.retrieveTransactionManager()'

The Spring hibernate5 packages should not use jakarta but javax packages, right?

Comment From: jhoeller

Hibernate 5.6 is only supported with its Jakarta adapter, both for the orm.hibernate5 package and with HibernateJpaVendorAdapter. You need to use the hibernate-core-jakarta artifact in your build setup.