Search code examples
javamysqltomcat7connection-poolingapache-commons-dbcp

Error preloading the connection pool


I am using below env:

  • jdk1.6.0_21
  • apache-tomcat-7.0.16
  • commons-dbcp.jar (version: 1.2.2)
  • commons-pool.jar (version: 1.3)
  • MySql Server 5.1

Facing below exception all the time when trying to connect with DB:

Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Error preloading the connection pool

Please help.


Solution

  • As suggested by @Luiggi Mendoza in above comments:

    Change all DB property (describe below) value to 10 :

    • DbInitialSize
    • DbMaxActive
    • DbMaxIdle
    • DbMaxWait