java连接mysql但是没有输出_第一个测试,启动时,数据库可以正常连接,让输出查到的值可以输出,但是老是报com/mysql/jdbc/Driver类找不到的警告...

源自:3-6 dao层开发

第一个测试,启动时,数据库可以正常连接,让输出查到的值可以输出,但是老是报com/mysql/jdbc/Driver类找不到的警告

2018-10-11 15:11:06.377  WARN 10736 --- [HelperThread-#2] c.m.v2.c3p0.DriverManagerDataSource      : Could not load driverClass com.mysql.jdbc.Driver;

java.lang.ClassNotFoundException: com/mysql/jdbc/Driver;

at java.lang.Class.forName0(Native Method) ~[na:1.8.0_66]

at java.lang.Class.forName(Class.java:264) ~[na:1.8.0_66]

at com.mchange.v2.c3p0.DriverManagerDataSource.ensureDriverLoaded(DriverManagerDataSource.java:143) [c3p0-0.9.5.2.jar:0.9.5.2]

at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:173) [c3p0-0.9.5.2.jar:0.9.5.2]

at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220) [c3p0-0.9.5.2.jar:0.9.5.2]

at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206) [c3p0-0.9.5.2.jar:0.9.5.2]

at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203) [c3p0-0.9.5.2.jar:0.9.5.2]

at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138) [c3p0-0.9.5.2.jar:0.9.5.2]

at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125) [c3p0-0.9.5.2.jar:0.9.5.2]

at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44) [c3p0-0.9.5.2.jar:0.9.5.2]

at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870) [c3p0-0.9.5.2.jar:0.9.5.2]

at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696) [mchange-commons-java-0.2.11.jar:0.2.11]

2018-10-11 15:11:06.379  WARN 10736 --- [HelperThread-#1] c.m.v2.c3p0.DriverManagerDataSource      : Could not load driverClass com.mysql.jdbc.Driver;

java.lang.ClassNotFoundException: com/mysql/jdbc/Driver;

at java.lang.Class.forName0(Native Method) ~[na:1.8.0_66]

at java.lang.Class.forName(Class.java:264) ~[na:1.8.0_66]

at com.mchange.v2.c3p0.DriverManagerDataSource.ensureDriverLoaded(DriverManagerDataSource.java:143) [c3p0-0.9.5.2.jar:0.9.5.2]

at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:173) [c3p0-0.9.5.2.jar:0.9.5.2]

at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220) [c3p0-0.9.5.2.jar:0.9.5.2]

at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206) [c3p0-0.9.5.2.jar:0.9.5.2]

at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203) [c3p0-0.9.5.2.jar:0.9.5.2]

at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138) [c3p0-0.9.5.2.jar:0.9.5.2]

at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125) [c3p0-0.9.5.2.jar:0.9.5.2]

at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44) [c3p0-0.9.5.2.jar:0.9.5.2]

at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870) [c3p0-0.9.5.2.jar:0.9.5.2]

at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696) [mchange-commons-java-0.2.11.jar:0.2.11]

东苑

北苑

2018-10-11 15:11:06.972  INFO 10736 --- [       Thread-2] o.s.w.c.s.GenericWebApplicationContext   : Closing org.springframework.web.context.support.GenericWebApplicationContext@4d465b11: startup date [Thu Oct 11 15:11:01 CST 2018]; root of context hierarchy

提问者:慕妹707385

2018-10-11 15:19

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值