fromBasicDatabase,can'tGetconnection, unable to connect to the database.
Severity: standardwrapper.throwable
Org.springframework.transaction.CannotCreateTransactionException:Could not open JDBC Connection for transaction; Nested exception is java.sql.SQLException:Connections could not being acquired from the underlying database!
At Org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin (Datasourcetransactionmanager.java : 241)
At Org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction ( abstractplatformtransactionmanager.java:372)
At Org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary ( transactionaspectsupport.java:417)
At Org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction ( transactionaspectsupport.java:255)
At Org.springframework.transaction.interceptor.TransactionInterceptor.invoke (transactioninterceptor.java:94)
At Org.springframework.aop.framework.ReflectiveMethodInvocation.proceed (reflectivemethodinvocation.java:172)
At Org.springframework.aop.framework.cglibaopproxy$dynamicadvisedinterceptor.intercept (CglibAopProxy.java:633)
At com.xinghe.base.service.platformmanager$ $EnhancerBySpringCGLIB $$9ad1dc7.getplarmark (<generated>)
At Com.xinghe.base.web.init.BaseDataServlet.init (basedataservlet.java:73)
At Org.apache.catalina.core.StandardWrapper.initServlet (standardwrapper.java:1284)
At Org.apache.catalina.core.StandardWrapper.loadServlet (standardwrapper.java:1197)
At Org.apache.catalina.core.StandardWrapper.load (standardwrapper.java:1087)
At Org.apache.catalina.core.StandardContext.loadOnStartup (standardcontext.java:5210)
At Org.apache.catalina.core.StandardContext.startInternal (standardcontext.java:5493)
At Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:150)
At Org.apache.catalina.core.containerbase$startchild.call (containerbase.java:1559)
At Org.apache.catalina.core.containerbase$startchild.call (containerbase.java:1549)
At Java.util.concurrent.FutureTask.run (Unknown Source)
At Java.util.concurrent.ThreadPoolExecutor.runWorker (Unknown Source)
At Java.util.concurrent.threadpoolexecutor$worker.run (Unknown Source)
At Java.lang.Thread.run (Unknown Source)
caused By:java.sql.SQLException:Connections could not being acquired from the underlying database!
At Com.mchange.v2.sql.SqlUtils.toSQLException (sqlutils.java:106)
At Com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection (c3p0pooledconnectionpool.java:529 )
At Com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection (abstractpoolbackeddatasource.java:128)
At Org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.getConnection ( abstractroutingdatasource.java:162)
At Org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin (Datasourcetransactionmanager.java : 203)
... More
caused By:com.mchange.v2.resourcepool.cannotacquireresourceexception:a Resourcepool could not acquire A resource from I TS Primary Factory or source.
At Com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable (basicresourcepool.java:1319)
At Com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource (basicresourcepool.java:557)
At Com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource (basicresourcepool.java:477)
At Com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection (c3p0pooledconnectionpool.java:525 )
... More
December 27, 2014 4:00:54 pm Org.apache.catalina.core.StandardContext loadonstartup
Severity: Servlet/xunghe-web threw load () exception
Com.mchange.v2.resourcepool.cannotacquireresourceexception:a Resourcepool could not acquire A resource from its primary Factory or source.
At Com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable (basicresourcepool.java:1319)
At Com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource (basicresourcepool.java:557)
At Com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource (basicresourcepool.java:477)
At Com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection (c3p0pooledconnectionpool.java:525 )
At Com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection (abstractpoolbackeddatasource.java:128)
At Org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.getConnection ( abstractroutingdatasource.java:162)
At Org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin (Datasourcetransactionmanager.java : 203)
At Org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction ( abstractplatformtransactionmanager.java:372)
At Org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary ( transactionaspectsupport.java:417)
At Org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction ( transactionaspectsupport.java:255)
At Org.springframework.transaction.interceptor.TransactionInterceptor.invoke (transactioninterceptor.java:94)
At Org.springframework.aop.framework.ReflectiveMethodInvocation.proceed (reflectivemethodinvocation.java:172)
At Org.springframework.aop.framework.cglibaopproxy$dynamicadvisedinterceptor.intercept (CglibAopProxy.java:633)
At com.xinghe.base.service.platformmanager$ $EnhancerBySpringCGLIB $$9ad1dc7.getplarmark (<generated>)
At Com.xinghe.base.web.init.BaseDataServlet.init (basedataservlet.java:73)
At Org.apache.catalina.core.StandardWrapper.initServlet (standardwrapper.java:1284)
At Org.apache.catalina.core.StandardWrapper.loadServlet (standardwrapper.java:1197)
At Org.apache.catalina.core.StandardWrapper.load (standardwrapper.java:1087)
At Org.apache.catalina.core.StandardContext.loadOnStartup (standardcontext.java:5210)
At Org.apache.catalina.core.StandardContext.startInternal (standardcontext.java:5493)
At Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:150)
At Org.apache.catalina.core.containerbase$startchild.call (containerbase.java:1559)
At Org.apache.catalina.core.containerbase$startchild.call (containerbase.java:1549)
At Java.util.concurrent.FutureTask.run (Unknown Source)
At Java.util.concurrent.ThreadPoolExecutor.runWorker (Unknown Source)
At Java.util.concurrent.threadpoolexecutor$worker.run (Unknown Source)
At Java.lang.Thread.run (Unknown Source)
The above problems may be caused by the following reasons:
1, driver configuration error : Driver=com.mysql.jdbc.driver
2. Database connection Address error:Url=jdbc:mysql://localhost:3306/test?3useunicode=true&characterencoding=utf8
3, password or Account error:username=root,password=root
4. Database is not started or is not authorized to access
5, the project did not introduce the corresponding drive jar package Mysql-connector-java-5.1.6-bin.jar
6, MySQL root does not have remote access permissions, need to increase permissions, the steps to increase permissions are as follows :
Go to MySQL database:
Grant all privileges on * * to ' root ' @ '% ' identified by ' root ' with GRANT option;
Flush privileges;
Connections could not being acquired from the underlying database