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>

 

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

 

 

你可能感兴趣的:(spring,mysql,jdbc)