求助:使用C3P0出错!
< 返回列表时间: 2012-04-19来源:开源中国
HDC调试需求开发(15万预算),能者速来!>>>
配置文件的所有内容: c3p0.jdbcUrl=jdbc:oracle:thin:@XXX.XXX.XXX.XXX:1521:ora10g c3p0.driverClass=oracle.jdbc.driver.OracleDriver c3p0.user=XXX c3p0.password=XXX c3p0.minPoolSize=3 c3p0.maxPoolSize=20 com.mchange.v2.log.MLog=com.mchange.v2.log.log4j.Log4jMLog com.mchange.v2.log.NameTransformer=com.mchange.v2.log.PackageNames com.mchange.v2.log.FallbackMLog.DEFAULT_CUTOFF_LEVEL=ALL

获取连接代码: ComboPooledDataSource cpds = new ComboPooledDataSource(); conn = cpds.getConnection(); 出错信息:log4j:WARN No appenders could be found for logger (com.mchange.v2.log.MLog). log4j:WARN Please initialize the log4j system properly. 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 c3p0.testc3p0.main(testc3p0.java:21) 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) ... 2 more 真心求助!谢谢大家!


热门排行