c3p0 配置连接MySQL异常: java.sql.SQLException: Connections could not be acquired from the underlying datab
2016-03-02 21:49
639 查看
c3p0 配置连接MySQL异常:
java.sql.SQLException: Connections could not be acquired from the underlying database!##
遇到这个问题,可能有2个原因(解决方案):
1.就是jar引入不对,版本可能不对,最主要可能缺少包,以下2个jar包一定要加入;
(1)c3p0-0.9.5.2.jar (2)mchange-commons-java-0.2.3.4.jar
2.配置文件配置得不对,要注意,name属性的值第一个字母一定要小写,不然真的出不来
<c3p0-config> <!-- This app is massive! --> <named-config name="mvcapp"> <property name="user">root</property> <property name="password">123456</property> <property name="driverClass">com.mysql.jdbc.Driver</property> <property name="jdbcUrl">jdbc:mysql://localhost:3306/db_studentinfo</property> <property name="acquireIncrement">5</property> <property name="initialPoolSize">10</property> <property name="minPoolSize">10</property> <property name="maxPoolSize">50</property> <!-- intergalactoApp adopts a different approach to configuring statement caching --> <property name="maxStatements">20</property> <property name="maxStatementsPerConnection">5</property> </named-config> </c3p0-config>
相关文章推荐
- POJ 3368 Frequent Values(RMQ)
- UITableview性能优化方案 iOS
- UVA 11995(p186)----I Can Guess the Data Structure!
- Handler消息传递机制(二)Handler,Loop,Message,MessageQueue的工作原理
- 线程
- hdu 3732 Ahui Writes Word 【多重背包】、好题
- ui-router路由控制器(一)
- css之marquee,让你的文字跳起来
- JSP 的 page 编译指令的属性session 的默认值 true
- [绍棠] iOS 在一个UILabel显示不同的字体和颜色
- poj2478 Farey Sequence 欧拉函数性质的简单应用
- question_010-JAVA之Set之HashSet的子类LinkedHashSet
- some frequently-used formula
- Builder模式
- Easyui---模态对话框实现ESC键一键锁屏(输入密码解锁)
- hdu Rescue (bfs)
- UI-进程与线程(多线程、主次线程)
- SSL certificate problem: unable to get local issuer certificate
- 【POJ2778】 DNA Sequence AC自动机+矩阵快速幂
- 设置UIButton的文字显示位置、字体的大小、字体的颜色