Link to home
Start Free TrialLog in
Avatar of gkinu
gkinu

asked on

JSF/Hibernate: NoClassDefFoundError: org/hibernate/Session

An eclipse JSF/Hibernate application. I have classes whose data am able to insert/update to a DB if i call the necessary update/insert functions from a test class located in the src folder. But when i call the same update/insert functions from a JSF/JSP interface, i get the error:


SEVERE: java.lang.NoClassDefFoundError: org/hibernate/Session
javax.faces.el.EvaluationException: java.lang.NoClassDefFoundError: org/hibernate/Session
      at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
      at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)

What should i do so that the same can work when called from a JSF/JSP interface? The necessary hibernate jar files are in a user library in the src folder.

Thanks
Avatar of a_b
a_b

They need to be in the webroot lib folder of the deployed war file.
ASKER CERTIFIED SOLUTION
Avatar of Gurvinder Pal Singh
Gurvinder Pal Singh
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gkinu

ASKER

Yes. Am using Eclipse.