Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!

原创 2016年08月28日 22:08:25

web项目执行查询的时候报错:
Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!

19:27:26,672 ERROR [STDERR] org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Cannot open connection; uncategorized SQLException for SQL [???]; SQL state [null]; error code [0]; Connections could not be acquired from the underlying database!; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!
19:27:26,672 ERROR [STDERR]     at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
19:27:26,672 ERROR [STDERR]     at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
19:27:26,672 ERROR [STDERR]     at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
19:27:26,672 ERROR [STDERR]     at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424)
19:27:26,673 ERROR [STDERR]     at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:410)
19:27:26,673 ERROR [STDERR]     at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
19:27:26,673 ERROR [STDERR]     at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
19:27:26,673 ERROR [STDERR]     at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:912)
19:27:26,673 ERROR [STDERR]     at com.springtest.common.dao.GenericHibernateDao.find(GenericHibernateDao.java:224)
19:27:26,673 ERROR [STDERR]     at com.springtest.system.service.LoginService.findTBaseUser(LoginService.java:25)
19:27:26,673 ERROR [STDERR]     at com.springtest.system.action.LoginAction.login(LoginAction.java:39)
19:27:26,673 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
19:27:26,673 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
19:27:26,673 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
19:27:26,673 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)
19:27:26,673 ERROR [STDERR]     at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
19:27:26,673 ERROR [STDERR]     at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
19:27:26,673 ERROR [STDERR]     at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
19:27:26,673 ERROR [STDERR]     at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
19:27:26,673 ERROR [STDERR]     at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686)
19:27:26,673 ERROR [STDERR]     at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
19:27:26,673 ERROR [STDERR]     at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
19:27:26,673 ERROR [STDERR]     at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
19:27:26,673 ERROR [STDERR]     at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
19:27:26,673 ERROR [STDERR]     at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838)
19:27:26,673 ERROR [STDERR]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
19:27:26,673 ERROR [STDERR]     at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
19:27:26,673 ERROR [STDERR]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
19:27:26,673 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
19:27:26,673 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
19:27:26,673 ERROR [STDERR]     at com.springtest.common.filter.LoginFilter.doFilter(LoginFilter.java:48)
19:27:26,673 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
19:27:26,673 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
19:27:26,673 ERROR [STDERR]     at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
19:27:26,674 ERROR [STDERR]     at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
19:27:26,674 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
19:27:26,674 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
19:27:26,674 ERROR [STDERR]     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
19:27:26,674 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
19:27:26,674 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
19:27:26,674 ERROR [STDERR]     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
19:27:26,674 ERROR [STDERR]     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
19:27:26,674 ERROR [STDERR]     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
19:27:26,674 ERROR [STDERR]     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
19:27:26,674 ERROR [STDERR]     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
19:27:26,674 ERROR [STDERR]     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
19:27:26,674 ERROR [STDERR]     at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
19:27:26,674 ERROR [STDERR]     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
19:27:26,674 ERROR [STDERR]     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
19:27:26,674 ERROR [STDERR]     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
19:27:26,674 ERROR [STDERR]     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
19:27:26,674 ERROR [STDERR]     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
19:27:26,674 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:619)
19:27:26,674 ERROR [STDERR] Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!
19:27:26,674 ERROR [STDERR]     at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
19:27:26,674 ERROR [STDERR]     at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:529)
19:27:26,674 ERROR [STDERR]     at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
19:27:26,674 ERROR [STDERR]     at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:83)
19:27:26,675 ERROR [STDERR]     at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
19:27:26,675 ERROR [STDERR]     at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
19:27:26,675 ERROR [STDERR]     at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
19:27:26,675 ERROR [STDERR]     at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1700)
19:27:26,675 ERROR [STDERR]     at org.hibernate.loader.Loader.doQuery(Loader.java:801)
19:27:26,675 ERROR [STDERR]     at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
19:27:26,675 ERROR [STDERR]     at org.hibernate.loader.Loader.doList(Loader.java:2542)
19:27:26,675 ERROR [STDERR]     at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
19:27:26,675 ERROR [STDERR]     at org.hibernate.loader.Loader.list(Loader.java:2271)
19:27:26,675 ERROR [STDERR]     at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:459)
19:27:26,675 ERROR [STDERR]     at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:365)
19:27:26,675 ERROR [STDERR]     at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
19:27:26,675 ERROR [STDERR]     at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)
19:27:26,675 ERROR [STDERR]     at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
19:27:26,675 ERROR [STDERR]     at org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate(HibernateTemplate.java:921)
19:27:26,675 ERROR [STDERR]     at org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate(HibernateTemplate.java:912)
19:27:26,675 ERROR [STDERR]     at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
19:27:26,675 ERROR [STDERR]     ... 47 more
19:27:26,675 ERROR [STDERR] Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
19:27:26,675 ERROR [STDERR]     at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1319)
19:27:26,675 ERROR [STDERR]     at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557)
19:27:26,675 ERROR [STDERR]     at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477)
19:27:26,675 ERROR [STDERR]     at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525)
19:27:26,675 ERROR [STDERR]     ... 66 more
19:28:29,599 ERROR [STDERR] org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Cannot open connection; uncategorized SQLException for SQL [???]; SQL state [null]; error code [0]; Connections could not be acquired from the underlying database!; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!
19:28:29,600 ERROR [STDERR]     at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
19:28:29,600 ERROR [STDERR]     at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
19:28:29,600 ERROR [STDERR]     at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
19:28:29,600 ERROR [STDERR]     at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424)
19:28:29,600 ERROR [STDERR]     at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:410)
19:28:29,600 ERROR [STDERR]     at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
19:28:29,600 ERROR [STDERR]     at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
19:28:29,600 ERROR [STDERR]     at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:912)
19:28:29,601 ERROR [STDERR]     at com.springtest.common.dao.GenericHibernateDao.find(GenericHibernateDao.java:224)
19:28:29,601 ERROR [STDERR]     at com.springtest.system.service.LoginService.findTBaseUser(LoginService.java:25)
19:28:29,601 ERROR [STDERR]     at com.springtest.system.action.LoginAction.login(LoginAction.java:39)
19:28:29,601 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
19:28:29,601 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
19:28:29,601 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
19:28:29,601 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)
19:28:29,601 ERROR [STDERR]     at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
19:28:29,601 ERROR [STDERR]     at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
19:28:29,601 ERROR [STDERR]     at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
19:28:29,601 ERROR [STDERR]     at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
19:28:29,601 ERROR [STDERR]     at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686)
19:28:29,601 ERROR [STDERR]     at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
19:28:29,601 ERROR [STDERR]     at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
19:28:29,601 ERROR [STDERR]     at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
19:28:29,601 ERROR [STDERR]     at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
19:28:29,601 ERROR [STDERR]     at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838)
19:28:29,601 ERROR [STDERR]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
19:28:29,601 ERROR [STDERR]     at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
19:28:29,601 ERROR [STDERR]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
19:28:29,601 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
19:28:29,601 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
19:28:29,601 ERROR [STDERR]     at com.springtest.common.filter.LoginFilter.doFilter(LoginFilter.java:48)
19:28:29,601 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
19:28:29,601 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
19:28:29,601 ERROR [STDERR]     at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
19:28:29,601 ERROR [STDERR]     at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
19:28:29,602 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
19:28:29,602 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
19:28:29,602 ERROR [STDERR]     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
19:28:29,602 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
19:28:29,602 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
19:28:29,602 ERROR [STDERR]     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
19:28:29,602 ERROR [STDERR]     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
19:28:29,602 ERROR [STDERR]     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
19:28:29,602 ERROR [STDERR]     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
19:28:29,602 ERROR [STDERR]     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
19:28:29,602 ERROR [STDERR]     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
19:28:29,602 ERROR [STDERR]     at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
19:28:29,602 ERROR [STDERR]     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
19:28:29,602 ERROR [STDERR]     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
19:28:29,602 ERROR [STDERR]     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
19:28:29,602 ERROR [STDERR]     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
19:28:29,602 ERROR [STDERR]     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
19:28:29,602 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:619)
19:28:29,602 ERROR [STDERR] Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!
19:28:29,602 ERROR [STDERR]     at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
19:28:29,602 ERROR [STDERR]     at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:529)
19:28:29,602 ERROR [STDERR]     at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
19:28:29,602 ERROR [STDERR]     at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:83)
19:28:29,603 ERROR [STDERR]     at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
19:28:29,603 ERROR [STDERR]     at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
19:28:29,603 ERROR [STDERR]     at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
19:28:29,603 ERROR [STDERR]     at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1700)
19:28:29,603 ERROR [STDERR]     at org.hibernate.loader.Loader.doQuery(Loader.java:801)
19:28:29,603 ERROR [STDERR]     at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
19:28:29,603 ERROR [STDERR]     at org.hibernate.loader.Loader.doList(Loader.java:2542)
19:28:29,603 ERROR [STDERR]     at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
19:28:29,603 ERROR [STDERR]     at org.hibernate.loader.Loader.list(Loader.java:2271)
19:28:29,603 ERROR [STDERR]     at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:459)
19:28:29,603 ERROR [STDERR]     at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:365)
19:28:29,603 ERROR [STDERR]     at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
19:28:29,603 ERROR [STDERR]     at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)
19:28:29,603 ERROR [STDERR]     at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
19:28:29,603 ERROR [STDERR]     at org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate(HibernateTemplate.java:921)
19:28:29,603 ERROR [STDERR]     at org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate(HibernateTemplate.java:912)
19:28:29,603 ERROR [STDERR]     at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
19:28:29,603 ERROR [STDERR]     ... 47 more
19:28:29,604 ERROR [STDERR] Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
19:28:29,604 ERROR [STDERR]     at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1319)
19:28:29,604 ERROR [STDERR]     at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557)
19:28:29,604 ERROR [STDERR]     at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477)
19:28:29,604 ERROR [STDERR]     at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525)
19:28:29,604 ERROR [STDERR]     ... 66 more
19:28:46,580 ERROR [STDERR] org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Cannot open connection; uncategorized SQLException for SQL [???]; SQL state [null]; error code [0]; Connections could not be acquired from the underlying database!; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!
19:28:46,580 ERROR [STDERR]     at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
19:28:46,580 ERROR [STDERR]     at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
19:28:46,580 ERROR [STDERR]     at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
19:28:46,580 ERROR [STDERR]     at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424)
19:28:46,581 ERROR [STDERR]     at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:410)
19:28:46,581 ERROR [STDERR]     at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
19:28:46,581 ERROR [STDERR]     at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
19:28:46,581 ERROR [STDERR]     at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:912)
19:28:46,581 ERROR [STDERR]     at com.springtest.common.dao.GenericHibernateDao.find(GenericHibernateDao.java:224)
19:28:46,581 ERROR [STDERR]     at com.springtest.system.service.LoginService.findTBaseUser(LoginService.java:25)
19:28:46,581 ERROR [STDERR]     at com.springtest.system.action.LoginAction.login(LoginAction.java:39)
19:28:46,581 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
19:28:46,581 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
19:28:46,581 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
19:28:46,581 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)
19:28:46,581 ERROR [STDERR]     at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
19:28:46,581 ERROR [STDERR]     at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
19:28:46,581 ERROR [STDERR]     at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
19:28:46,581 ERROR [STDERR]     at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
19:28:46,581 ERROR [STDERR]     at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686)
19:28:46,581 ERROR [STDERR]     at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
19:28:46,581 ERROR [STDERR]     at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
19:28:46,581 ERROR [STDERR]     at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
19:28:46,581 ERROR [STDERR]     at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
19:28:46,581 ERROR [STDERR]     at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838)
19:28:46,581 ERROR [STDERR]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
19:28:46,581 ERROR [STDERR]     at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
19:28:46,581 ERROR [STDERR]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
19:28:46,581 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
19:28:46,581 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
19:28:46,581 ERROR [STDERR]     at com.springtest.common.filter.LoginFilter.doFilter(LoginFilter.java:48)
19:28:46,581 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
19:28:46,581 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
19:28:46,581 ERROR [STDERR]     at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
19:28:46,581 ERROR [STDERR]     at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
19:28:46,582 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
19:28:46,582 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
19:28:46,582 ERROR [STDERR]     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
19:28:46,582 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
19:28:46,582 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
19:28:46,582 ERROR [STDERR]     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
19:28:46,582 ERROR [STDERR]     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
19:28:46,582 ERROR [STDERR]     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
19:28:46,583 ERROR [STDERR]     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
19:28:46,583 ERROR [STDERR]     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
19:28:46,583 ERROR [STDERR]     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
19:28:46,583 ERROR [STDERR]     at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
19:28:46,583 ERROR [STDERR]     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
19:28:46,583 ERROR [STDERR]     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
19:28:46,583 ERROR [STDERR]     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
19:28:46,583 ERROR [STDERR]     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
19:28:46,583 ERROR [STDERR]     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
19:28:46,583 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:619)
19:28:46,583 ERROR [STDERR] Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!
19:28:46,583 ERROR [STDERR]     at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
19:28:46,583 ERROR [STDERR]     at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:529)
19:28:46,586 ERROR [STDERR]     at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
19:28:46,586 ERROR [STDERR]     at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:83)
19:28:46,586 ERROR [STDERR]     at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
19:28:46,586 ERROR [STDERR]     at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
19:28:46,586 ERROR [STDERR]     at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
19:28:46,586 ERROR [STDERR]     at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1700)
19:28:46,586 ERROR [STDERR]     at org.hibernate.loader.Loader.doQuery(Loader.java:801)
19:28:46,586 ERROR [STDERR]     at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
19:28:46,586 ERROR [STDERR]     at org.hibernate.loader.Loader.doList(Loader.java:2542)
19:28:46,586 ERROR [STDERR]     at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
19:28:46,586 ERROR [STDERR]     at org.hibernate.loader.Loader.list(Loader.java:2271)
19:28:46,586 ERROR [STDERR]     at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:459)
19:28:46,586 ERROR [STDERR]     at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:365)
19:28:46,586 ERROR [STDERR]     at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
19:28:46,586 ERROR [STDERR]     at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)
19:28:46,586 ERROR [STDERR]     at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
19:28:46,588 ERROR [STDERR]     at org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate(HibernateTemplate.java:921)
19:28:46,588 ERROR [STDERR]     at org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate(HibernateTemplate.java:912)
19:28:46,588 ERROR [STDERR]     at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
19:28:46,588 ERROR [STDERR]     ... 47 more
19:28:46,588 ERROR [STDERR] Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
19:28:46,588 ERROR [STDERR]     at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1319)
19:28:46,588 ERROR [STDERR]     at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557)
19:28:46,588 ERROR [STDERR]     at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477)
19:28:46,588 ERROR [STDERR]     at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525)
19:28:46,588 ERROR [STDERR]     ... 66 more

oracle服务已经启动,但是执行查询语句的时候却报错,我用plsql工具连接数据库失败,提示没有监听。我想起来今天上午把一些不经常你用到的服务关闭了,启动后plsql连接正常。

百度搜索到遇到这样的报错信息有以下几种情况需要检查:
1.启动配置有误:db.driverClass = oracle.jdbc.driver.OracleDriver
2.数据库连接地址有误:db.url= jdbc:oracle:thin:@127.0.0.1:1521:orcl
3.账户或密码错误:db.user = spring
db.password = springpwd
4.数据库未启动无权限访问。数据库服务或监听服务未启动。
5.项目未引入对应的驱动jar包.
6.mysql root没有远程访问的权限,需要增加权限。

版权声明:本文采用CC BY-NC-ND 4.0共享协议,允许复制转载,但必须在文首显眼位置保留原文作者、原文链接、版本信息、版权声明等信息。不允许演绎和用于商业用途。

相关文章推荐

Linux磁盘空间满导致的Connections could not be acquired from the underlying database!问题

问题名称:Hibernate poperation:Cannot open connection;uncategorized SQLException for SQL[???];SQL state [...

Connections could not be acquired from the underlying database

og4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. org.quartz.Sched...

spring整合mybaits时Connections could not be acquired from the underlying database!异常解决

Connections could not be acquired from the underlying database

严重: StandardWrapper.Throwableorg.springframework.transaction.CannotCreateTransactionException: Could...

Connections could not be acquired from the underlying database! 特殊情况

Connections could not be acquired from the underlying database! 特殊情况 Access denied for user 'www'@'...

Caused by: java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Date

1、错误描述### Cause: java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Date ;...

Caused by: java.sql.SQLException: ResultSet is from UPDATE. No Data.

1、错误描述 org.hibernate.exception.GenericJDBCException: error executing work at org.hibernate.exceptio...

Caused by: java.sql.SQLException: No value specified for parameter 2

1、错误描述at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAcc...

Caused by: java.sql.SQLException: The MySQL server is running with the --read-only option so it cann

1、错误描述### Cause: java.sql.SQLException: The MySQL server is running with the --read-only option so i...

Caused by: java.sql.SQLException: Operand should contain 1 column(s)

1、错误描述 [ERROR:]2015-05-05 15:48:55,847 [异常拦截] org.hibernate.exception.DataException: error executin...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!
举报原因:
原因补充:

(最多只允许输入30个字)