A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

© 代文娟 中级黑马   /  2014-1-3 18:34  /  1179 人查看  /  1 人回复  /   1 人收藏 转载请遵从CC协议 禁止商业使用本文

HTTP Status 500 -

type Exception report

message

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 /index.jsp at line 4

1: <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
2: <jsp:useBean id="conn" scope="page" class="com.tools.ConnDB"/><%
3: String username=(String)session.getAttribute("username");
4: ResultSet rs_sale=conn.executeQuery("select top 3 ID,GoodsName,price,nowprice,picture,introduce from tb_goods where sale=1 order by INTime desc");
5: int sale_ID=0;
6: String s_goodsname="";
7: float s_price=0;


Stacktrace:
        org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:524)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:435)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause

java.lang.NullPointerException
        com.tools.ConnDB.executeQuery(ConnDB.java:57)
        org.apache.jsp.index_jsp._jspService(index_jsp.java:66)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.13 logs.
运行时出现了上面的错误时怎么回事呀,怎么解决呢?

1 个回复

倒序浏览
太坑了吧,没上下文怎么搞?
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 加入黑马