java - c3p0连接池 异常
迷茫
迷茫 2017-04-18 10:30:15
0
2
584
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
迷茫
迷茫

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

répondre à tous(2)
小葫芦

Cela devrait être le cas. 0.0 Essayez-le
c3p0.jdbcUrl=jdbc:mysql://**:3306/mpaper_cms2?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull

巴扎黑

Pourquoi ne pas renseigner directement l'adresse IP ou localhost ? De cette façon, il ne devrait y avoir aucune erreur

Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal