java.sql.SQLException: No suitable driver 问题解决

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

控制台一直报错:

java.sql.SQLException: No suitable driver

at java.sql.DriverManager.getDriver(DriverManager.java:264)
at com.mchange.v2.c3p0.DriverManagerDataSource.driver(DriverManagerDataSource.java:224)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:135)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)

at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)


检查配置文件和加载的jar包都没有问题,查阅解决办法后

在%JAVA_HOME%\jre\lib\ext下添加mysql-connector-java-5.1.12-bin.jar 问题解决!

转载于:https://my.oschina.net/u/553734/blog/115957

你可能感兴趣的:(java,数据库,大数据)