500 Servlet Exception [show] java.lang.NullPointerException 求大神解决 本人菜鸟一个 求详细步骤!
java.lang.NullPointerExceptionatweaver.conn.RecordSet.getColumnIndex(RecordSet.java:8...
java.lang.NullPointerException
at weaver.conn.RecordSet.getColumnIndex(RecordSet.java:804)
at weaver.conn.RecordSet.getString(RecordSet.java:430)
at weaver.login.VerifyLogin.checkUserPass(VerifyLogin.java:1480)
at weaver.login.VerifyLogin.getUserCheck(VerifyLogin.java:682)
at _jsp._login._VerifyLogin__jsp._jspService(login/VerifyLogin.jsp:165)
at com.caucho.jsp.JavaPage.service(JavaPage.java:61)
at com.caucho.jsp.Page.pageservice(Page.java:578)
at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:195)
at weaver.filter.PFixFilter.doFilter(PFixFilter.java:91)
at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87)
at weaver.filter.IECompatibleFilter.doFilter(IECompatibleFilter.java:31)
at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87)
at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:187)
at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:265)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:273)
at com.caucho.server.port.TcpConnection.run(TcpConnection.java:682)
at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:730)
at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:649)
at java.lang.Thread.run(Thread.java:662) 展开
at weaver.conn.RecordSet.getColumnIndex(RecordSet.java:804)
at weaver.conn.RecordSet.getString(RecordSet.java:430)
at weaver.login.VerifyLogin.checkUserPass(VerifyLogin.java:1480)
at weaver.login.VerifyLogin.getUserCheck(VerifyLogin.java:682)
at _jsp._login._VerifyLogin__jsp._jspService(login/VerifyLogin.jsp:165)
at com.caucho.jsp.JavaPage.service(JavaPage.java:61)
at com.caucho.jsp.Page.pageservice(Page.java:578)
at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:195)
at weaver.filter.PFixFilter.doFilter(PFixFilter.java:91)
at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87)
at weaver.filter.IECompatibleFilter.doFilter(IECompatibleFilter.java:31)
at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87)
at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:187)
at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:265)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:273)
at com.caucho.server.port.TcpConnection.run(TcpConnection.java:682)
at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:730)
at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:649)
at java.lang.Thread.run(Thread.java:662) 展开
3个回答
展开全部
给你举个例子
rs = statement.executeQuery(sql);
String str = rs.getString(i);
这样是正确的
rs = null;
String str = rs.getString(i);
这样就错了,为null的对象调用方法就是空指针异常了
rs = statement.executeQuery(sql);
String str = rs.getString(i);
这样是正确的
rs = null;
String str = rs.getString(i);
这样就错了,为null的对象调用方法就是空指针异常了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
debug一下看看到底是哪一步出现空值了。!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询