Reputation: 177
I have included all necessary jar filex in my folder but it raises run time error saying java.lang.NoClassDefFoundError: org/hibernate/Session
. Here is screenshot of my project hierarchy
One thing if run this by making a main function and run it as java application then it works fine and give correct output but on tomcat as a web application it raise error.
Anyone here please guide me
Upvotes: 0
Views: 251
Reputation: 786
Do like this go to Properties
of the Project
,then select the Deployment Assembly
,then Click on Add
and select Java Build Path Entries
and Add your Hibernate
and then Click on Finish
.Then check your problem is resolved or not.
Upvotes: 2
Reputation: 1265
According to findjar.com, the org.hibernate.Session class can be found in these jar files:
http://www.findjar.com/class/org/hibernate/Session.html;jsessionid=53FA854532D73E1B1CC5E6EF2073A461
Include the hibernate 3 jar in your web-inf folder, as well as your other jars as mentioned by @angel_navarro
Upvotes: 0