Hi all,
I’m trying to integrate hibernate and spring into a test project. This is my first foray into Spring and Hibernate.
When I start Tomcat (5.5) I get the following error:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myTransactionManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyAccessExceptionsException: PropertyAccessExceptionsException (1 errors); nested propertyAccessExceptions are: [org.springframework.beans.TypeMismatchException: Failed to convert property value of type [$Proxy0] to required type [net.sf.hibernate.SessionFactory] for property 'sessionFactory']
Here’s the transaction manager entry in my applicationContext.xml:
<bean id="myTransactionManager"
class="org.springframework.orm.hibernate.HibernateTransactionManager">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean>
I think I may have a problem mixing Hibernate 2 and 3 jars since I think the package name of net.sf.hibernate.SessionFactory may be from Hibernate v2 to v3 but I’m not sure.
I’d appreciate any help.
Thanks!