Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Spring 6 not working with Hibernate 5?

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?

like image 414
Sven Avatar asked Dec 15 '25 07:12

Sven


1 Answers

According to https://github.com/spring-projects/spring-framework/issues/31039 answer, one should use hibernate-core-jakarta version.

like image 181
Sven Avatar answered Dec 16 '25 22:12

Sven



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!