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.
运行时出现了上面的错误时怎么回事呀,怎么解决呢? |
|