开发者社区> 问答> 正文

求大神帮忙解决一难题?报错

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

首页报错为

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


展开
收起
爱吃鱼的程序员 2020-06-08 19:21:36 688 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    明显是数据库没有查到数据返回null,你又没有做null验证就直接使了能帮忙看一下么?我是菜鸟我qq1479158192

    2020-06-08 19:21:56
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
服务创新解开传统企业上云困惑 立即下载
传统金融IT非功能实践的演变思路 立即下载
当运维管理遇上认知计算 立即下载