100分请求分析错误原因
为什么我按着F5不停的刷新就会出现这样的错误,我的数据库连接好像用完后就关闭了呀
GGJJDDMM帮我分析分析
错误如下
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 /web/mall/sort.jsp at line 9
6: <head>
7: <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
8: <jsp:useBean id="product" scope="page" class="cn.com.web.mall.bean.Product"></jsp:useBean>
9: <jsp:useBean id="data" scope="page" class="cn.com.util.DataBase"></jsp:useBean>
10: <title>Insert title here</title>
11: <link href="style/home.css" rel="stylesheet" type="text/css" />
12: </head>
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handle
JspException(JspServletWrapper.java:515)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:408)
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
javax.servlet.ServletException: org.apache.tomcat.dbcp.dbcp.
SQLNestedException: Cannot get a connection, pool exhausted
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:855)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:784)
org.apache.jsp.web.mall.sort_jsp._jspService(sort_jsp.java:365)
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:384)
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
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool exhausted
org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:103)
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
cn.com.util.DataBase.<init>(DataBase.java:22)
org.apache.jsp.web.mall.sort_jsp._jspService(sort_jsp.java:81)
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:384)
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.util.NoSuchElementException: Timeout waiting for idle object
org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(Gener