'Tomcat Connection has been marked suspect, possibly abandoned PooledConnection

I'm trying to execute a findAll query using Spring JpaRepository. Using findAll() method results in throwing the above error. I made sure to change the configuration in Tomcat's content.xml file and set properties below

removeAbandoned="true"
jdbcInterceptors="ResetAbandonedTimer"
removeAbandonedTimeout="1000"

However, I still get the above error marking as suspect. I am using Tomcat 8.5.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source