ClassNotFound errors - Hibernate 3.1 and Spring 1.2

I recently had a project that incorporated Hibernate and Spring. MyEclipse 5.0 was the IDE, and the app server was JBoss 4.0.4. We encountered a few problems trying to get the correct combination of Hibernate, Spring, and JBoss that would play well together.

We were getting ClassNotFound errors when using Spring 1.2 and Hibernate 3.1 in MyEclipse. The solution turned out to be very simple: the build path must have Hibernate listed before Spring or you will get ClassNotFound errors. You must also use hibernate3.jar from Spring MyEclipse library. We were using MyEclipse to build and deploy the application, so it was very easy to change the order of the build path from within MyEclipse.

Happy coding!

Tags: , ,

Leave a Reply

You must be logged in to post a comment.