- This topic has 1 reply, 2 voices, and was last updated 18 years, 2 months ago by Brian Fernandes.
-
AuthorPosts
-
Jim IcenhowerMemberHi 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!
Brian FernandesModeratorHi,
Well, what version of Spring and Hibernate did you add to your project and how did you set it up?
If you used our library sets, you can go to Project > Properties > Java Build Path > Add Library and then choose MyEclipse libraries. You can then add libaries to your project.
Simply right click an existing library > Build Path to remove it from your build path.If you actually copied the JARs into your project, it might be better off starting from scratch. Add Hibernate 3.1 followed by Spring.
Best,
Brian. -
AuthorPosts