测试时候遇到数据库连接问题

来源:4-4 基于myBatis实现DAO编程(上)

沉寂守望者

2019-10-12 20:22

警告: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@6ad57b45 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (2). Last acquisition attempt exception: 

java.sql.SQLException: Access denied for user '宋士虓'@'localhost' (using password: YES)


Caused by: org.apache.ibatis.exceptions.PersistenceException: 

### Error updating database.  Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.

### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.

Caused by: java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.

Caused by: com.mchange.v2.resourcepool.TimeoutException: A client timed out while waiting to acquire a resource from 


以上是报错,大致意思我理解是数据库连接超时之类的,网上也找过问题,但基本都不是。希望同遇到过该问题的同学可以帮我解答一二

写回答 关注

1回答

  • 正能量发射器
    2020-03-09 18:24:08

    我也是这个问题

Java高并发秒杀API之业务分析与DAO层

Java实现高并发秒杀API的第一门课,还等什么,赶快来加入吧

87424 学习 · 496 问题

查看课程

相似问题