0

I know normally if the error happened, i mean org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted, which means the conenction is overloaded. but in this case, I pretty sure there's no connection to my local mysql server(I used 'show processlist' command).

is there any other place can cause this error?

bellow is my code:

try {
    // Obtain a connection
    InitialContext ctx = new InitialContext();
    DataSource ds = (DataSource) ctx.lookup(jndiSrc);
    _log.info("==============" + jndiSrc + " is bound to " + ds + "=====================");
    return ds.getConnection(); 
}
bsiamionau
  • 8,099
  • 4
  • 46
  • 73
Lihong Qiu
  • 51
  • 1
  • 1
  • 6

0 Answers0