- This topic has 5 replies, 3 voices, and was last updated 19 years ago by Brian Fernandes.
-
AuthorPosts
-
mksoftMemberHello,
I’m testing a hessian service with spring and hibernate under tomcat 5.5.9. Using MyEclipse Build id: 20050829-4.0.0-GA
Trying to access the service, I’m getting:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘statusSessionFactory’ defined in ServletContext resource [/WEB-INF/services-servlet.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: net/sf/hibernate/cfg/Configuration
I’ve set myeclipse to deploy the jars as well, and hibernate3.jar is in WEB-INF/lib.
Looking in hibernate3.jar suggests that the class should be:
org/hibernate/cfg/Configurationinstead of net/sf/hibernate/cfg/Configuration.
I have no idea how to fix it.
Thanks.
Riyad KallaMembermksoft,
The problem may be an issue between Hibernate3 (hibernate3.jar) and Hibernate2 (hibernate2.jar). Have you tried creating a new dummy Web Project, add Hibernate capabilities to it, selecting Hibernate 2, and then open up the HIbernate2.jar file and drill down and see if the package path matches what Spring is looking for.
mksoftMembersupport-rkalla, spring was added via MyEclipse’s Spring capabilities.
You’re suggesting that hibernate3 isn’t supported by the version of spring provided by MyEclipse ❓
If so, how can it be fixed ❓
Brian FernandesModeratormksoft,
Hibernate 3 is supported by the version of Spring in MyEclipse 4.0.
However, you are probably using the Hibernate2 class in Spring instead of the Hibernate3 variant.
For example:
for Hibernate 2 use
org.springframework.orm.hibernate.LocalSessionFactoryBeanbut for Hibernate 3 use
org.springframework.orm.hibernate3.LocalSessionFactoryBeanHope this helps,
Brian.
mksoftMemberThanks a lot Brian.
That was the issue indeed 🙂
Brian FernandesModeratorGlad you got it working 🙂
Brian.
-
AuthorPosts