HikariPool-1 - Failed to validate connection [email protected] (This connection has been closed.)


In Spring Boot 2.x, Hikari is default connection pool so if you have JPA then you don't need to add Hikari dependency in pom but if you want to use dbcp2 then you need to exclude Hikari and add dbcp2 dependency.

So in your case you mixed settings for both.

if just would like to stay with Hikari then remove dbcp2 dependencies and change your data source properties to use spring.datasource.hikari.

Add below properties to validate connection:


To further check if there is any leak, please add below properties and check how goes your pool connection and if there is any leak.