-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Description
Affects: spring-orm 6.0.7 and earlier
In application running spring 6.0.7 and hibernate 6.2.0.final, when spring is creating hibernate session factory in Spring application context exception occurs:
java.lang.NoSuchMethodError: 'void org.springframework.orm.hibernate5.LocalSessionFactoryBuilder.setImplicitNamingStrategy(org.hibernate.boot.model.naming.ImplicitNamingStrategy)'
at org.springframework.orm.hibernate5.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:547)
at com.epox.service.system.EpoxLocalSessionFactoryBean.afterPropertiesSet(EpoxLocalSessionFactoryBean.java:30)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1816)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1766)
This is caused by the fact that in Hibernate 6.2 has changed return type for the method Configuration.setImplicitNamingStrategy
(instead of void Configuration
is returned).