我只是在后台修改了一些数据,当时没问题,第二天上班来网站就报错了
首页报错为
Error:java.lang.NullPointerException
后台登录完报错为
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.
明显是数据库没有查到数据返回null,你又没有做null验证就直接使了能帮忙看一下么?我是菜鸟我qq1479158192
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。