关于jsp的空指针异常
网站昨天浏览的还好好的,今天就报错。可是我在其他服务器里面放这个网站都没问题。不知道错在哪里,请各位大侠帮帮我。HTTPStatus500----------------...
网站昨天浏览的还好好的,今天就报错。可是我在其他服务器里面放这个网站都没问题。不知道错在哪里,请各位大侠帮帮我。
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: Exception in JSP: /showPageImg.jsp:9
6: articleID = 1;
7: session.setAttribute("flag","ok");
8: session.setAttribute("pageNo",pageNo);
9: data.GetDefaultImg();
10: bookIssue = data.GetBookIssue();
11: bookDate = data.GetBookDate();
12: bookName = data.GetBookName();
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
root cause
java.lang.NullPointerException
connection.Coon.executeQuery(Coon.java:95)
getData.GetData.GetDefaultImg(getdata.java:177)
org.apache.jsp.index_jsp._jspService(index_jsp.java:295)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.27 logs.
--------------------------------------------------------------------------------
Apache Tomcat/5.5.27
今天开发的人跟我说是数据库连接池的问题,我不是很明白,∵如果网站可以运行的话,数据库连接池就应该没有设置错误啊。 展开
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: Exception in JSP: /showPageImg.jsp:9
6: articleID = 1;
7: session.setAttribute("flag","ok");
8: session.setAttribute("pageNo",pageNo);
9: data.GetDefaultImg();
10: bookIssue = data.GetBookIssue();
11: bookDate = data.GetBookDate();
12: bookName = data.GetBookName();
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
root cause
java.lang.NullPointerException
connection.Coon.executeQuery(Coon.java:95)
getData.GetData.GetDefaultImg(getdata.java:177)
org.apache.jsp.index_jsp._jspService(index_jsp.java:295)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.27 logs.
--------------------------------------------------------------------------------
Apache Tomcat/5.5.27
今天开发的人跟我说是数据库连接池的问题,我不是很明白,∵如果网站可以运行的话,数据库连接池就应该没有设置错误啊。 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询