首页上一页 1 下一页尾页 6 条记录 1/1页
JSP项目开发案例全程实录 第六章办公自动化管理系统 报错HTTP Status 500问题请教老师
发表在JavaWeb图书答疑
2013-06-01
是否精华
是
否
版块置顶:
是
否
登录界面输入用户名和密码后出现如下错误,登录不能正常实现:
tomcat和sql2005已配置完成
sql2005已用sql server和windows身份验证模式登录
我的Hibernate.properties是:
hibernate.dialect=org.hibernate.dialect.SQLServerDialect
hibernate.connection.driver_class=com.microsoft.jdbc.sqlserver.SQLServerDriver
hibernate.connection.url=jdbc:sqlserver://localhost:1433;databaseName=db_work;
hibernate.connection.username=sa
hibernate.connection.password=123
hibernate.show_sql=true
hibernate.hbm2ddl.auto=none
HTTP Status 500 - java.lang.NullPointerException
type Exception report
message java.lang.NullPointerException
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: java.lang.NullPointerException
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
com.struts.filter.MyFilter.doFilter(MyFilter.java:15)
root cause
java.lang.NullPointerException
com.Hibernate.util.HibernateUtil.findUser(HibernateUtil.java:28)
com.struts.action.FindUserAction.finUser(FindUserAction.java:23)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
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.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
com.struts.filter.MyFilter.doFilter(MyFilter.java:15)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.37 logs.
Apache Tomcat/6.0.37
tomcat和sql2005已配置完成
sql2005已用sql server和windows身份验证模式登录
我的Hibernate.properties是:
hibernate.dialect=org.hibernate.dialect.SQLServerDialect
hibernate.connection.driver_class=com.microsoft.jdbc.sqlserver.SQLServerDriver
hibernate.connection.url=jdbc:sqlserver://localhost:1433;databaseName=db_work;
hibernate.connection.username=sa
hibernate.connection.password=123
hibernate.show_sql=true
hibernate.hbm2ddl.auto=none
HTTP Status 500 - java.lang.NullPointerException
type Exception report
message java.lang.NullPointerException
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: java.lang.NullPointerException
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
com.struts.filter.MyFilter.doFilter(MyFilter.java:15)
root cause
java.lang.NullPointerException
com.Hibernate.util.HibernateUtil.findUser(HibernateUtil.java:28)
com.struts.action.FindUserAction.finUser(FindUserAction.java:23)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
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.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
com.struts.filter.MyFilter.doFilter(MyFilter.java:15)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.37 logs.
Apache Tomcat/6.0.37