亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

Failed to obtain JDBC Connection

nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database 碰到這個問題的同學,可以試試:

<dependency>
????<groupId>mysql</groupId>
????<artifactId>mysql-connector-java</artifactId>
????<version>5.1.44</version>
</dependency>

加上版本號就可以了

正在回答

4 回答

我的是版本太新了 ,默認是

2.1.2.RELEASE?改為2.0.2.RELEASE?就好了
<parent>
????<groupId>org.springframework.boot</groupId>
????<artifactId>spring-boot-starter-parent</artifactId>
????<version>2.0.2.RELEASE</version>
????<relativePath?/>?<!--?lookup?parent?from?repository?-->
</parent>


0 回復 有任何疑惑可以回復我~

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:?

### Error querying database.? Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!

### The error may exist in file [E:\ideaworkspace\demo\target\classes\mapper\AreaDao.xml]

### The error may involve com.imooc.demo.dao.AreaDao.queryArea

### The error occurred while executing a query

### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!


0 回復 有任何疑惑可以回復我~
#1

為了永無止境的賺錢

解決了嗎
2019-01-04 回復 有任何疑惑可以回復我~
#2

慕雪0535062 回復 為了永無止境的賺錢

解決了,大致意思就是要在pom文件中引入的包的版本要跟配置文件中的代碼對應,每個版本的代碼好像都有些不同
2019-01-07 回復 有任何疑惑可以回復我~
#3

慕雪0535062 回復 為了永無止境的賺錢

<artifactId>mysql-connector-java</artifactId>這個包我就沒改版本,讓他使用自動的 <artifactId>c3p0</artifactId>這個包的版本我用的是<version>0.9.5.2</version>
2019-01-07 回復 有任何疑惑可以回復我~

改了也沒有用啊,這個問題卡了好久,網上還說改jdbc.driver=com.mysql.jdbc.Driver,然后還是這個問題

0 回復 有任何疑惑可以回復我~

已解決。

0 回復 有任何疑惑可以回復我~
#1

qq_北部灣的落日_03529651

怎么解決
2019-01-07 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

Failed to obtain JDBC Connection

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號