compatibility of spring 4.0.0 with hibernate 4.30 [duplicate]

if you are using hibernate4.x

To solve the exception caused by java.lang.NoClassDefFoundError: [Lorg/hibernate/engine/FilterDefinition;

In dipatcher-servlet,instead of

 <bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">

use

<bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">

Leave a Comment