I am running a web application with hibernate and got stuck at this exception.
... 34 more
18:50:02,573 WARN [AbstractExceptionHandler] Unhandled exception
javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class com.package.util.HibernateUtil
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:295)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:170).......
Your code is trying to load the definition of
com.package.sit.util.HibernateUtilclass but can’t find the definition of that class.This kind of error is usually related to class loading issues that prevents a JAR being loaded. Check if you have all required libraries in the
CLASSPATH.