啟動tomca時報錯Could not create connection to database server.
啟動tomca時報錯:
2018-06-09 22:43:34.269[C3P0PooledConnectionPoolManager[identityToken->z8kflt9v1rjft0g4qq7k9|6ddee947]-HelperThread-#1]WARN com.mchange.v2.resourcepool.BasicResourcePool-Having failed to acquire a resource, [email protected] is interrupting all Threads waiting on a resource to check out. Will try again in response to new client requests.
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
at sun.reflect.GeneratedConstructorAccessor24.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
at com.mysql.jdbc.Util.getInstance(Util.java:387)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:898)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:887)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:862)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2331)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2084)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:795)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44)
at sun.reflect.GeneratedConstructorAccessor21.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:400)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:327)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:175)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)
at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
Caused by: java.lang.NullPointerException: null
at com.mysql.jdbc.ConnectionImpl.getServerCharset(ConnectionImpl.java:3004)
at com.mysql.jdbc.MysqlIO.sendConnectionAttributes(MysqlIO.java:1908)
at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1837)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1207)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2254)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2285)
... 18 common frames omitted
2018-06-09 22:43:34.271[C3P0PooledConnectionPoolManager[identityToken->z8kflt9v1rjft0g4qq7k9|6ddee947]-HelperThread-#2]WARN com.mchange.v2.resourcepool.BasicResourcePool-Having failed to acquire a resource,
2018-06-09 22:43:34.273[C3P0PooledConnectionPoolManager[identityToken->z8kflt9v1rjft0g4qq7k9|6ddee947]-HelperThread-#2]WARN com.mchange.v2.resourcepool.BasicResourcePool-com
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
at sun.reflect.GeneratedConstructorAccessor24.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
at com.mysql.jdbc.Util.getInstance(Util.java:387)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:898)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:887)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:862)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2331)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2084)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:795)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44)
at sun.reflect.GeneratedConstructorAccessor21.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:400)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:327)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:175)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)
at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
Caused by: java.lang.NullPointerException: null
at com.mysql.jdbc.ConnectionImpl.getServerCharset(ConnectionImpl.java:3004)
at com.mysql.jdbc.MysqlIO.sendConnectionAttributes(MysqlIO.java:1908)
at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1837)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1207)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2254)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2285)
... 18 common frames omitted
可能錯誤的原因有千千萬,本人出錯的原因是:資料庫用的是Mysql8版本,但工程裡面mysql驅動包卻是5.1.37版本。只需修改驅動包為8.0.11版本即可。
<!-- mysql --> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.37</version> </dependency>
改為
<dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.11</version> </dependency>
相關推薦
Mysql8--啟動tomca時報錯Could not create connection to database server.
可能錯誤的原因有千千萬,本人出錯的原因是:資料庫用的是Mysql8版本,但工程裡面mysql驅動包卻是5.1.37版本。只需修改驅動包為8.0.11版本即可。 <!-- mysql --> <dependency> <groupId>mysql<
啟動tomca時報錯Could not create connection to database server.
啟動tomca時報錯:2018-06-09 22:43:34.269[C3P0PooledConnectionPoolManager[identityToken->z8kflt9v1rjft0g4qq7k9|6ddee947]-HelperThread-#1]WARN
MySQL 8.0.11版本連線報錯: Could not create connection to database server.
準備使用mybatis-plus + Hikari + SpringBoot 搭建一個專案,結果一直報錯Could not create connection to database server 報錯資訊如下: 2018-11-05 00:35:23.749
jmeter連接mysql數據庫報錯Cannot create PoolableConnectionFactory (Could not create connection to database server.)
cannot jar 嘗試 後來 連接 database 方法 java-5 驅動 今天在學習jmeter的jdbc取樣器,發現在配置完JDBC Connection Configuration和JDBC Request後,點擊運行。在查看結果樹中顯示響應數據: Canno
java項目連接jdbc報錯:com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server
image mysq reat jar包 tor ima 新版 ransient java項目 java項目連接jdbc報錯:com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Coul
mysql8 java Could not create connection to database server. Attempted reconnect 3 times問題
最近照著網上的一個博主的例子 學習ssm,結果一個mysql8 搞得我都崩潰了,各種連不上 總結一下出錯原因: 1.maven中的jdbc連線jar包 版本也要換成高版本 <!-- Begin: 資料庫依賴包 --> <de
mysql-8.0.12 Could not create connection to database server
Could not create connection to database server - java mysql connector 一、mysql授權 java報錯: null, message from server: "Host '
本地mysql連接出錯Could not create connection to database server.
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. at sun.reflect.NativeConstructo
ssm jdbc連線mysql資料庫報錯Cannot create PoolableConnectionFactory (Could not create connection to database
今天發現在配置完JDBC Connection Configuration和JDBC Request後,點選執行。在檢視結果樹中顯示響應資料: Cannot create PoolableConnectionFactory (Could not create connect
啟動eclipse報錯 Could not create the Java Virtual Machine 解決辦法
今天下載了eclipse neon,但是啟動的時候報瞭如下的錯誤: 網上查詢了下,說這是系統為eclipse分配的記憶體不足,需要修改eclipse.ini檔案。 eclipse.ini是eclipse 記憶體分配之類的配置檔案,對java虛擬機器的記憶體管理
Apache啟動時報錯Could not reliably determine the server's fully qualified domain name
apache無法啟動,提示: 正在啟動 httpd:httpd: apr_sockaddr_info_get() failed for CentOS httpd: Could not reliab
macos安裝python scrapy時報錯Could not find suitable distribution for Requirement.parse及解決
MacOS Version10.11.6 安裝python scrapy時報錯如下: distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('incr
yarn報錯 : Could not create the Java Virtual Machine.
yarn使用時候報錯資訊: Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. 1. 檢測yarn版本 yarn version
安裝weblogic完之後,快速啟動時彈出Could not create the Java Virtual Machine錯誤
版本:我的weblogic安裝包是wls1036_generic.jar,也就是weblogic 11g R1。 出現錯誤:安裝完後,當選擇快速啟動時,彈出Could not create the Java Virtual Machine錯誤。 Error
springboot啟動突然報錯Could not resolve placeholder 'spring.datasource.driver-class-name'
之前好好的專案,今天啟動突然報錯Could not resolve placeholder 'spring.datasource.driver-class-name' 按照網友的方法,添加了 @PropertySource(value = "classpath:application.pro
YUM安裝RPM安裝包時報錯Could not open/read file:///mnt/repodata/repomd.xml
【Linux虛擬機器、Vbox】 出現此問題是因為yum源裡配置了baseurl=file:///mnt ,但是在這個目錄下沒有找到需要的資源。經過查詢原因發現是因為使用的虛擬機器,但是沒有掛載映象,所以使用下面語句來掛載映象: mount /dev/cdrom
新建maven工程時報錯 Could not resolve archetype
3.執行mvn install:install-file -DgroupId=org.apache.maven.archetypes -DartifactId=maven-archetype-quickstart -Dversion=1.1 -Dpackaging=jar -Dfile=maven-arch
maven+ssm啟動Tomcat報錯 Could not publish to the server. java.lang.IndexOutOfBoundsException 解決辦法
1找到你maven安裝目錄D:\studys\apache-maven-3.5.3-bin\apache-maven-3.5.3\conf找到settings.xml開啟2,新增這段程式碼<mirror> <id>alimaven</id&
ionic真機調試Android報錯 - could not read ok from ADB Server * failed to start daemon * error: cannot connect to daemon
找到 管理器 and nic sid ask err span adb 在使用真機調試Android程序時,報錯如下: could not read ok from ADB Server * failed to start daemon error: cannot con
Eureka啟動一直報錯:Network level connection to peer localhost; retrying after delay
Eureka單節點啟動後後臺一直報錯com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: 拒絕連線 (Connection refused),如下圖: 解決: client配置中新增se