Hi all,
When using hibernate 3, the following code works:
After upgrading my test failes with this exception:Code:<bean id="ivsHibernateWriter" class="org.springframework.batch.item.database.HibernateItemWriter"> <property name="hibernateTemplate" ref="hibernateTemplate"/> <property name="sessionFactory" ref="sessionFactory" /> </bean> <bean class="org.springframework.orm.hibernate3.HibernateTemplate" id="hibernateTemplate" > <property name="sessionFactory" ref="sessionFactory" /> </bean>
I thought of changing the hibernateTemplate bean to be inline with hibernate 4, like so:Code:org.springframework.orm.hibernate4.SessionHolder cannot be cast to org.springframework.orm.hibernate3.SessionHolder
However, this class does not exist.Code:<bean class="org.springframework.orm.hibernate4.HibernateTemplate" id="hibernateTemplate" > <property name="sessionFactory" ref="sessionFactory" /> </bean>
How should we work with Hibernate4 and spring Batch?


Reply With Quote
