求大神帮忙解决一难题

Melissahu 发布于 2017/01/05 15:16
阅读 230
收藏 0

我只是在后台修改了一些数据,当时没问题,第二天上班来网站就报错了

首页报错为

Error:java.lang.NullPointerException

后台登录完报错为

HTTP Status 500 - An exception occurred processing JSP page /admin/sys/loginpost.jsp at line 28


type Exception report

message An exception occurred processing JSP page /admin/sys/loginpost.jsp at line 28

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: An exception occurred processing JSP page /admin/sys/loginpost.jsp at line 28

25: 	String lang = Request.GetString("lang", "chinese");
26: 	
27: 	UserLogin userLogin = new UserLogin(dbo, session, "AdminLogin", request);
28: 	if(userLogin.Login(name, password, 1))
29: 	{
30: 		WebInit.Init_Lang = lang;//chinese english
31: 		response.sendRedirect("/admin/main.html");		


Stacktrace:
	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:568)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:470)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

root cause

java.lang.NullPointerException
	com.NJD.db.DBO.ExecuteQuery(wd:171)
	com.NJD.db.mysql.MySQL5_5.GetRecordsNum(bd:219)
	com.NJD.ums.basic.UserDb.Exist(cc:198)
	com.NJD.ums.UserLogin.Login(wb:193)
	org.apache.jsp.admin.sys.loginpost_jsp._jspService(loginpost_jsp.java:94)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

note The full stack trace of the root cause is available in the Apache Tomcat/7.0.53 logs.


Apache Tomcat/7.0.53


加载中
0
风翔飞
风翔飞
明显是数据库没有查到数据返回null,你又没有做null验证就直接使了
M
Melissahu
能帮忙看一下么? 我是菜鸟~~我qq~~ 1479158192
返回顶部
顶部