There is a catch around the code to handle all exception, but the log shows we didn’t catch it. According to the first blog, it is not possible to catch such exception.
Note: The solution is under testing.
Add these config into the jpa file:
setup.dataSource.testOnBorrow = false
setup.dataSource.testOnReturn = false
setup.dataSource.testWhileIdle = true
setup.dataSource.validationQuery= Select 1
setup.dataSource.timeBetweenEvictionRunsMillis = 1800000