type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet execution threw an exception
root cause
java.lang.ExceptionInInitializerError
com.sonic.HibernateUtil.<clinit>(HibernateUtil.java:14)
com.sonic.struts.action.LoginAction.execute(LoginAction.java:54)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.
跟踪到
com.sonic.HibernateUtil.<clinit>(HibernateUtil.java:14)
com.sonic.struts.action.LoginAction.execute(LoginAction.java:54)
分别是
HibernateUtil中:
throw new ExceptionInInitializerError(ex);
LoginAction中:
Session session = HibernateUtil.Session();
------解决方法--------------------------------------------------------
是不是配置文件的设置有问题或者放置的路径不对,因为我看你应该使用的是默认路径。
------解决方法--------------------------------------------------------
创建hibernate的sessionFactory没有成功,大都是你的hibernate.cfg.xml有问题
------解决方法--------------------------------------------------------
这个hibernate.cfg.xml应该是放错了位置