首页上一页 1 下一页尾页 1 条记录 1/1页
JSP办公自动化管理系统(二版)
发表在JavaWeb图书答疑
2015-03-19
是否精华
是
否
版块置顶:
是
否
[font color=#FF0000]点击登录后:[/font]
HTTP Status 500 -
type Exception report
message
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:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
com.struts.filter.MyFilter.doFilter(MyFilter.java:15)
root cause
java.lang.NullPointerException
com.hiernate.util.HibernateUtil.findUser(HibernateUtil.java:27)
com.struts.action.FindUserAction.finUser(FindUserAction.java:23)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
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:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
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.18 logs.
数据库连接也按照这样的方法改了:
[font color=#00FF00]两处入手:
1. 检查配置文件hibernate.properties中的配置是否与你本地数据库的地址、账号、密码一样。
数据库地址 hibernate.connection.url=jdbc:sqlserver://localhost:1433;databaseName=db_work;
账号 hibernate.connection.username=sa
密码 hibernate.connection.password= //注意这里默认是空的
2. 由于tomcat安全性升级的原因,将top.jsp中第二行<jsp:directive.page import="com.struts.form.UserForm;"/>这里最后的分号去掉。[/font]
[font color=#0000FF]另外1433端口也在配置工具->Sql Server Configuration Manager->MSSQLSERVER的协议。看看TCP/IP协议是否启动,如果启动,右键菜单点"属性" ,在分页菜单中选"IP地址",把"IP1"和"IP2"中"TCP端口"为1433, 已启用"改为"是" 。配置工具->Sql Server Configuration Manager->SQL Native Client 配置->客户端协议->TCP/IP。选择TCP/IP右键菜单中"属性",确认"默认端口"是1433,"已启用"为"是"。
1433端口也已经启用[/font]
我用的是SQL Server2005 、Tomcat 6
怎么处理?
HTTP Status 500 -
type Exception report
message
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:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
com.struts.filter.MyFilter.doFilter(MyFilter.java:15)
root cause
java.lang.NullPointerException
com.hiernate.util.HibernateUtil.findUser(HibernateUtil.java:27)
com.struts.action.FindUserAction.finUser(FindUserAction.java:23)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
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:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
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.18 logs.
数据库连接也按照这样的方法改了:
[font color=#00FF00]两处入手:
1. 检查配置文件hibernate.properties中的配置是否与你本地数据库的地址、账号、密码一样。
数据库地址 hibernate.connection.url=jdbc:sqlserver://localhost:1433;databaseName=db_work;
账号 hibernate.connection.username=sa
密码 hibernate.connection.password= //注意这里默认是空的
2. 由于tomcat安全性升级的原因,将top.jsp中第二行<jsp:directive.page import="com.struts.form.UserForm;"/>这里最后的分号去掉。[/font]
[font color=#0000FF]另外1433端口也在配置工具->Sql Server Configuration Manager->MSSQLSERVER的协议。看看TCP/IP协议是否启动,如果启动,右键菜单点"属性" ,在分页菜单中选"IP地址",把"IP1"和"IP2"中"TCP端口"为1433, 已启用"改为"是" 。配置工具->Sql Server Configuration Manager->SQL Native Client 配置->客户端协议->TCP/IP。选择TCP/IP右键菜单中"属性",确认"默认端口"是1433,"已启用"为"是"。
1433端口也已经启用[/font]
我用的是SQL Server2005 、Tomcat 6
怎么处理?