I’m having hard time finding migration docs. I was using sping 3.0.5 and hibernate 3.4.
I migrated to the latest release candidates: spring 3.1 and hibernate 4.0
I was able to refactor my classes without problem but the application context for hibernate is giving me problems since I have not see any examples on how to configure it.
Specifically:
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="mappingResources">
<list>...</list>
</property>
<property name="hibernateProperties">
<props>
...
<prop key="hibernate.connection.provider_class">org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider</prop>
<prop key="hibernate.cache.provider_class">????</prop>
...
</props>
</property>
</bean>
Apparently properties dataSource , mappingResources and hibernateProperties no longer exist and I’m not so sure about what to put in hibernate.connection.provider_class and hibernate.cache.provider_class.
And I keep getting:
Caused by: java.lang.ClassNotFoundException: org.hibernate.engine.FilterDefinition
at application start.
To my knowledge, Spring has no support for Hibernate 4. If it did, I’d expect to see an
org.springframework.orm.hibernate4package in the 3.1.x package list, but it’s not there. I don’t believe I’ve seen any mention of it in any release notes or anything, either.In other words, Spring is working fine, but you’re using an incompatible version of Hibernate.