连接mysql提示com.mchange.v2.resourcepool.BasicResourcePool
1、com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@6ff9129c
com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@6ff9129c -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed ). Last acquisition attempt exception:
java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:)
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:)
at com.mchange.v2.resourcepool.BasicResourcePool.access$(BasicResourcePool.java:)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:)
at com.mchange.v2.)
Caused by: com.mysql.cj.core.exceptions.InvalidConnectionAttributeException: The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
at sun.reflect.GeneratedConstructorAccessor8.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:)
at java.lang.reflect.Constructor.newInstance(Constructor.java:)
at com.mysql.cj.core.exceptions.ExceptionFactory.createException(ExceptionFactory.java:)
at com.mysql.cj.core.exceptions.ExceptionFactory.createException(ExceptionFactory.java:)
at com.mysql.cj.jdbc.util.TimeUtil.getCanonicalTimezone(TimeUtil.java:)
at com.mysql.cj.mysqla.MysqlaSession.configureTimezone(MysqlaSession.java:)
at com.mysql.cj.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:)
at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:)
... more
九月 , :: 下午 com.mchange.v2.resourcepool.BasicResourcePool forceKillAcquires
警告: Having failed to acquire a resource, com.mchange.v2.resourcepool.BasicResourcePool@192d43ce is interrupting all Threads waiting on a resource to check out. Will try again in response to new client requests.
九月 , :: 下午 com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask run
警告: com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@2413b53c -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed ). Last acquisition attempt exception:
java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:)
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:)
at com.mchange.v2.resourcepool.BasicResourcePool.access$(BasicResourcePool.java:)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:)
at com.mchange.v2.)
Caused by: com.mysql.cj.core.exceptions.InvalidConnectionAttributeException: The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
at sun.reflect.GeneratedConstructorAccessor8.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:)
at java.lang.reflect.Constructor.newInstance(Constructor.java:)
java.sql.SQLException: Connections could not be acquired from the underlying database!
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:)
at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:)
at springDataTest.SpringDataTest.testDataSource(SpringDataTest.java:)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:)
at java.lang.reflect.Method.invoke(Method.java:)
at org.testng.)
at org.testng.)
at org.testng.)
at org.testng.)
at org.testng.)
at org.testng.)
at org.testng.TestRunner.privateRun(TestRunner.java:)
at org.testng.TestRunner.run(TestRunner.java:)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:)
at org.testng.SuiteRunner.run(SuiteRunner.java:)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:)
at org.testng.TestNG.runSuitesLocally(TestNG.java:)
at org.testng.TestNG.run(TestNG.java:)
at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:)
at java.lang.reflect.Method.invoke(Method.java:)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:)
Caused by: 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:)
at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:)
at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutAndMarkConnectionInUse(C3P0PooledConnectionPool.java:)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:)
... more
at com.mysql.cj.core.exceptions.ExceptionFactory.createException(ExceptionFactory.java:)
at com.mysql.cj.core.exceptions.ExceptionFactory.createException(ExceptionFactory.java:)
at com.mysql.cj.jdbc.util.TimeUtil.getCanonicalTimezone(TimeUtil.java:)
at com.mysql.cj.mysqla.MysqlaSession.configureTimezone(MysqlaSession.java:)
at com.mysql.cj.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:)
at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:)
... more
解决方案:
connecturl添加&serverTimezone=UTC
完整的db.properties 如下
jdbc.user=root jdbc.password=root #jdbc.driverClass=com.mysql.cj.jdbc.Driver jdbc.driverClass=com.mysql.jdbc.Driver jdbc.jdbcUrl=jdbc:mysql://localhost:3306/gss?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=UTC
2、org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.sql.DataSource] is defined
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.sql.DataSource] is defined
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:)
at springDataTest.SpringDataTest.testDataSource(SpringDataTest.java:)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:)
at java.lang.reflect.Method.invoke(Method.java:)
at org.testng.)
at org.testng.)
at org.testng.)
at org.testng.)
at org.testng.)
at org.testng.)
at org.testng.TestRunner.privateRun(TestRunner.java:)
at org.testng.TestRunner.run(TestRunner.java:)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:)
at org.testng.SuiteRunner.run(SuiteRunner.java:)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:)
at org.testng.TestNG.runSuitesLocally(TestNG.java:)
at org.testng.TestNG.run(TestNG.java:)
at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:)
at java.lang.reflect.Method.invoke(Method.java:)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:)
解决方案:
将<bean id="datasource" class="com.mchange.v2.c3p0.jboss.C3P0PooledDataSource">换成<bean id="datasource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
连接mysql提示com.mchange.v2.resourcepool.BasicResourcePool的更多相关文章
- Caused by: com.mchange.v2.resourcepool.TimeoutException: A client timed out while waiting to acquire a resource from com.mchange.v2.resourcepool.BasicResourcePool@1483de4 -- timeout at awaitAvailable(
Caused by: com.mchange.v2.resourcepool.TimeoutException: A client timed out while waiting to acquire ...
- 项目跑起来之后,一会儿后台就会报错Illegal access: this web application instance has been stopped already. Could not load [com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask]. The following stack trace
一月 24, 2016 6:42:54 下午 org.apache.catalina.loader.WebappClassLoaderBase checkStateForResourceLoading ...
- c3p0 空指针异常 com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@11d9f05 -- Acquisition Attempt Failed!!! C ...
- 关于使用C3P0程序报错Having failed to acquire a resource, com.mchange.v2.resourcepool的问题
由于是新手的问题,C3P0的使用时严格跟着视频来的,但是问题却来的很突然 在导入了三个包以及创建了路径以后 进行测试 class JdbcutilsTest { @Test void TestGetC ...
- 连接Mysql提示Can’t connect to local MySQL server through socket的解决方法
mysql,mysqldump,Mysqladmin,php连接mysql服务常会提示下面错误: ERROR 2002 (HY000): Can't connect to local MySQL se ...
- powerdesigner 连接mysql提示“connection test failed”
powerdesigner 连接mysql提示“connection test failed”,该如何解决: 1.把64位的jdk换成32位的jdk(VM只支持32的jre) 2.系统变量: CL ...
- win10连接mysql提示:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
win10中cmd连接mysql提示:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YE ...
- mac 连接mysql提示 Warning: mysqli::real_connect(): (HY000/2002): No such file or directory
mac 连接mysql的时候提示 Warning: mysqli::real_connect(): (HY000/2002): No such file or directory [说明1]MAC下M ...
- dbexpress连接mysql提示Operation not allowed on a unidirectional dataset
最近刚接触delphi,在了解到dbExpress连接mysql的时候,出现了一些问题,特记录下 我遇到的问题有两个 1. TDBGrid --DataSet=TDataSource1 TDataSo ...
随机推荐
- Apache Spark技术实战之5 -- SparkR的安装及使用
欢迎转载,转载请注明出处,徽沪一郎. 概要 根据论坛上的信息,在Sparkrelease计划中,在Spark 1.3中有将SparkR纳入到发行版的可能.本文就提前展示一下如何安装及使用SparkR. ...
- Unable to establish connection to tokens
安装openstack后遇到的第一个问题. 执行命令nova list得到如下结果: [root@localhost ~(keystone_admin)]# nova list No handlers ...
- LoadRunner11.00安装问题及解决方法
1.安装提示:“安装程序已确定正在等待重新启动....” 解决方法:打开安装包,找到:\Additional Components\IDE Add-Ins\MS Visual Studio .NET\ ...
- Android 更新sdk
http://blog.csdn.net/xiao_ping_ping/article/details/45621663 不FQ意味着不能直接到android官网下载android SDK,但是国内有 ...
- Sublime Text3 常用快捷键
1. 更改变量名的几种方法 a.选中变量,ctrl+d 一个个选择 b.选中变量,alt+F3 2.查找打开过的文件:Ctrl+P,然后输入最近的文件名就可以即时预览到文件内容. 3.ctrl+r ...
- iOS 两个App之间调起通信
前言 假设需求是这样的:由一个app1跳转到app2之后,app2完成某项任务之后,怎么把app2的完成信息传到app1(自己的程序是app1),传的是什么类型的数据,怎么进行解析? 逻辑 本文章使用 ...
- 修改pip源
http://www.cnblogs.com/hushaojun/p/4606986.html mkdir -p ~/.pip/ vi ~/.pip/pip.conf [global] trusted ...
- Java maven安装GDAL
1. 使用编译好的安装jdal http://www.gisinternals.com/release.phpgdal-111-1800-x64-core.msi下载地址:http://downloa ...
- Java 使用jaxp修改节点
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <perso ...
- Talend 从Excel导入Saleforce数据(一) 直接从salesforce lookup 性能的噩梦
速度的瓶颈是在查询Sales force是否有该电话号码的联系人资料. TMap属性的 lookup Model, 如果用Load Once, 则会把SaleForce的contact全部load下来 ...