`

com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could

阅读更多

Spring结合c3p0的时候,出现如下异常:

 

com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.

 

结果发现问题出在这里:

 

<property name="jdbcUrl">
    <value>jdbc:mysql://localhost:3306/db_temp?useUnicode=true&amp;characterEncoding=utf-8
    </value>
</property>

 

后来改成:

 

<property name="jdbcUrl">
   <value>jdbc:mysql://localhost:3306/db_temp?useUnicode=true&amp;characterEncoding=utf-8</value>
</property>

 

不应该分行,否则出现异常.

 

 

分享到:
评论
1 楼 masuweng 2011-06-30  
也有可能是 db_temp 在数据库中不存在导致的

相关推荐

    SpringMVC文件上传

    11:01:33,545 DEBUG ThreadPoolAsynchronousRunner:730 - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@5b28c08e -- Running DeadlockDetector[Exiting. No pending tasks.] 11:01:43,558 ...

    FAT JAR 插件的下载安装

    如:Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source 使用fat jar 打包没问题: 1.解压后是一个../...

    c3p0-0.9.5-pre1,hamcrest-core-1.3的jar包

    META-INF/MANIFEST.MF ...com.mchange.v2.Debug.class com.mchange.v2.c3p0.AbstractConnectionCustomizer.class com.mchange.v2.c3p0.AbstractConnectionTester.class com.mchange.v2.c3p0.C3P0ProxyConnection.class ...

    c3p0包

    com.mchange.v2.c3p0.idle_test_period=3000 ``` 4. **C3P0的API**:C3P0提供了一套API,包括` ComboPooledDataSource `类,它是连接池的主要实现类,用于初始化和管理数据库连接。开发者可以通过它的方法获取和...

    c3p0-0.9.5.5.jar.zip

    《c3p0-0.9.5.5.jar.zip:深入...com.mchange.v2.c3p0.jdbcUrl=jdbc:mysql://localhost:3306/mydb com.mchange.v2.c3p0.username=myuser com.mchange.v2.c3p0.password=mypassword com.mchange.v2.c3p0.minPoolSize=5 ...

    DBCP&C3P0连接池(含配置文件)

    com.mchange.v2.c3p0.jdbc.DataSourceClass = com.mchange.v2.c3p0.ComboPooledDataSource driverClass=com.mysql.jdbc.Driver jdbcUrl=jdbc:mysql://localhost:3306/mydatabase initialPoolSize=5 minPoolSize=5 ...

    c3p0Jar包及源码

    com.springsource.com.mchange.v2.c3p0-0.9.1.2.jar com.springsource.com.mchange.v2.c3p0-sources-0.9.1.2.jar

    jar_files.zip

    &lt;bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"&gt; &lt;property name="driverClass" value="com.mysql.jdbc.Driver"/&gt; &lt;property name="jdbcUrl" value="jdbc:mysql://localhost:3306/...

    c3p0和mchange匹配的版本

    在Java开发中,数据库连接管理是一个关键环节,而C3P0和MChange(也称为Vibur DBCP)是两个常用的数据库连接池组件。它们各自有着不同的特性和使用场景,但有时候为了优化数据库访问性能,我们会将两者结合使用。在...

    mchange-commons-java-0.2.15.jar找不到的问题的解决

    c3p0连接mysql8.0.11需要外加mchange-commons-java-0.2.15.jar,maven的pom.xml 中配置了,但是项目中报找不到mchange-commons-java-0.2.15.jar这个文件,可以把此文件下载后,然后解压后把对应的jar包放到maven 库...

    话费充值系统。。。。。

    2020-11-27 11:26:11|localhost-startStop-1|INFO |com.mchange.v2.log.MLog,80,|-&gt; MLog clients using log4j logging. 2020-11-27 11:26:11|localhost-startStop-1|INFO |com.mchange.v2.c3p0.C3P0Registry,204,...

    quartz log4j

    log4j:WARN No appenders could be found for logger (com.mchange.v2.log.MLog). log4j:WARN Please initialize the log4j system properly.

    c3p0连接池常用jar(c3p0.jar和mchange-commons-java-.jar)

    import com.mchange.v2.c3p0.ComboPooledDataSource; public class C3P0Config { public static void main(String[] args) { ComboPooledDataSource cpds = new ComboPooledDataSource(); cpds.setDriverClass(...

    C3P0jar包.rar

    这个RAR压缩包包含了两个重要的JAR文件,分别是c3p0-0.9.5.2.jar和mchange-commons-java-0.2.11.jar。 1. **c3p0-0.9.5.2.jar**:这是C3P0的核心库文件,版本为0.9.5.2。C3P0是由Mchange公司开发的一个开源的数据库...

    mchange-commons-java-0.2.11-API文档-中文版.zip

    赠送jar包:mchange-commons-java-0.2.11.jar; 赠送原API文档:mchange-commons-java-0.2.11-javadoc.jar; 赠送源代码:mchange-commons-java-0.2.11-sources.jar; 赠送Maven依赖信息文件:mchange-commons-java-...

    C3P0的依赖Jar包

    2. **com.mchange.v2.c3p0.jar**:这个包是C3P0的全名,包含了一些额外的依赖,如Mchange的其他组件,这些组件可能在某些特定功能或异常处理中使用。 3. **mysql-connector-java.jar** (或对应数据库驱动):C3P0...

    mchange-commons-java-0.2.11-API文档-中英对照版.zip

    赠送jar包:mchange-commons-java-0.2.11.jar; 赠送原API文档:mchange-commons-java-0.2.11-javadoc.jar; 赠送源代码:mchange-commons-java-0.2.11-sources.jar; 赠送Maven依赖信息文件:mchange-commons-java-...

    SSHjar包 .rar

    com.springsource.com.mchange.v2.c3p0-0.9.1.2.jar com.springsource.org.aopalliance-1.0.0.jar com.springsource.org.apache.commons.logging-1.1.1.jar com.springsource.org.apache.log4j-1.2.15.jar ...

    mchange-commons-java-0.2.15-API文档-中文版.zip

    赠送jar包:mchange-commons-java-0.2.15.jar; 赠送原API文档:mchange-commons-java-0.2.15-javadoc.jar; 赠送源代码:mchange-commons-java-0.2.15-sources.jar; 赠送Maven依赖信息文件:mchange-commons-java-...

    C3P0连接池参数配置

    &lt;bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"&gt; &lt;property name="driverClass" value="com.mysql.jdbc.Driver"/&gt; &lt;property name="jdbcUrl" value="jdbc:mysql://localhost:3306/mydb...

Global site tag (gtag.js) - Google Analytics