APPLICATION FAILED TO START


Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

org.springframework.orm.hibernate5.LocalSessionFactoryBuilder.scanPackages(LocalSessionFactoryBuilder.java:350)

The following method did not exist:

'void org.springframework.orm.hibernate5.LocalSessionFactoryBuilder.addAttributeConverter(java.lang.Class)'

The calling method's class, org.springframework.orm.hibernate5.LocalSessionFactoryBuilder, was loaded from the following location:

jar:file:/C:/Users/sreekanth.bathini.JOCATA/.m2/repository/org/springframework/spring-orm/6.0.11/spring-orm-6.0.11.jar!/org/springframework/orm/hibernate5/LocalSessionFactoryBuilder.class

The called method's class, org.springframework.orm.hibernate5.LocalSessionFactoryBuilder, is available from the following locations:

jar:file:/C:/Users/sreekanth.bathini.JOCATA/.m2/repository/org/springframework/spring-orm/6.0.11/spring-orm-6.0.11.jar!/org/springframework/orm/hibernate5/LocalSessionFactoryBuilder.class

The called method's class hierarchy was loaded from the following locations:

org.springframework.orm.hibernate5.LocalSessionFactoryBuilder: file:/C:/Users/sreekanth.bathini.JOCATA/.m2/repository/org/springframework/spring-orm/6.0.11/spring-orm-6.0.11.jar
org.hibernate.cfg.Configuration: file:/C:/Users/sreekanth.bathini.JOCATA/.m2/repository/org/hibernate/orm/hibernate-core/6.2.7.Final/hibernate-core-6.2.7.Final.jar

Action:

Correct the classpath of your application so that it contains a single, compatible version of org.springframework.orm.hibernate5.LocalSessionFactoryBuilder

Process finished with exit code 1

Please use the blow code to replicate the issue. https://github.com/BornToCode1123/HibernateIssue

Comment From: bclozel

The hibernate5 package is only meant to be used with hibernate 5.x, with a minimum requirement of Hibernate 5.6 with Spring Framework 6. I see you're considering the Hibernate ORM 6.1 upgrade, which is what the team recommends.

See also this comment explaining why this package shouldn't be used with Hibernate 6.

Comment From: BornToCode1123

below core version i am using and spring framework 6.0.11 and SB 3.1.2 org.hibernate.orm hibernate-core 6.2.7.Final

Comment From: bclozel

Yes, that's the problem. Your code is still using infrastructure in the hibernate5 package, it shouldn't.

Comment From: BornToCode1123

Yes, that's the problem. Your code is still using infrastructure in the hibernate5 package, it shouldn't.

it's spring orm hibernate5 not hibernate core