type Exception report
message java.lang.reflect.InvocationTargetException
description The server encountered an internal error that prevented it from fulfilling this request.
exception
java.lang.RuntimeException: java.lang.reflect.InvocationTargetExceptioncn.itcast.servlet.BaseServlet.service(BaseServlet.java:61)javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
root cause
java.lang.reflect.InvocationTargetExceptionsun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)java.lang.reflect.Method.invoke(Method.java:601)cn.itcast.servlet.BaseServlet.service(BaseServlet.java:45)javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
root cause
java.lang.RuntimeException: java.sql.SQLException: Connections could not be acquired from the underlying database!cn.lzy.bookshop.user.dao.UserDao.findByUsername(UserDao.java:31)cn.lzy.bookshop.user.service.UserService.regist(UserService.java:22)cn.lzy.bookshop.user.web.servlet.UserServlet.regist(UserServlet.java:89)sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)java.lang.reflect.Method.invoke(Method.java:601)cn.itcast.servlet.BaseServlet.service(BaseServlet.java:45)javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
root cause
java.sql.SQLException: Connections could not be acquired from the underlying database!com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:615)com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)cn.itcast.jdbc.JdbcUtils.getConnection(JdbcUtils.java:43)cn.itcast.jdbc.TxQueryRunner.query(TxQueryRunner.java:22)cn.lzy.bookshop.user.dao.UserDao.findByUsername(UserDao.java:29)cn.lzy.bookshop.user.service.UserService.regist(UserService.java:22)cn.lzy.bookshop.user.web.servlet.UserServlet.regist(UserServlet.java:89)sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)java.lang.reflect.Method.invoke(Method.java:601)cn.itcast.servlet.BaseServlet.service(BaseServlet.java:45)javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
root cause
com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1406)com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:594)com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:514)com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutAndMarkConnectionInUse(C3P0PooledConnectionPool.java:681)com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:608)com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)cn.itcast.jdbc.JdbcUtils.getConnection(JdbcUtils.java:43)cn.itcast.jdbc.TxQueryRunner.query(TxQueryRunner.java:22)cn.lzy.bookshop.user.dao.UserDao.findByUsername(UserDao.java:29)cn.lzy.bookshop.user.service.UserService.regist(UserService.java:22)cn.lzy.bookshop.user.web.servlet.UserServlet.regist(UserServlet.java:89)sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)java.lang.reflect.Method.invoke(Method.java:601)cn.itcast.servlet.BaseServlet.service(BaseServlet.java:45)javax.servlet.http.HttpServlet.service(HttpServlet.java:728)