java - c3p0连接池 异常
迷茫
迷茫 2017-04-18 10:30:15
0
2
582
java.sql.SQLException: Connections could not be acquired from the underlying database!
    at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:529)
    at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
    at dao.DbConnect.getConByC3P0(DbConnect.java:18)
    at dao.DbConnect.main(DbConnect.java:46)
Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
    at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1319)
    at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557)
    at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525)
    ... 3 more
c3p0.driverClass=com.mysql.jdbc.Driver  
c3p0.jdbcUrl=jdbc:mysql://****:3306/mpaper_cms2?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
c3p0.user=portal
c3p0.password=portal

c3p0.initialPoolSize=5
c3p0.minPoolSize=5
c3p0.maxPoolSize=10
迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(2)
小葫芦

It should be this. No change 0.0 Try it
c3p0.jdbcUrl=jdbc:mysql://**:3306/mpaper_cms2?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull

巴扎黑

Why not fill in the ip address or localhost directly? This way there should be no error reported

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template