为了账号安全,请及时绑定邮箱和手机立即绑定

第一个测试,启动时,数据库可以正常连接,让输出查到的值可以输出,但是老是报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


正在回答

2 回答

检查一下依赖的包中是否下载成功了驱动包

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

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

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信