java.sql.SQLException: No suitable drive解决方法

 java.sql.SQLException: No suitable driver     at java.sql/java.sql.DriverManager.getDriver(DriverManager.java:298)     at com.mchange.v2.c3p0.DriverManagerDataSource.driver(DriverManagerDataSource.java:223)     at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:119)     at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:143)     at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:132)     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)

出现错误的原因:

一、

java.sql.SQLException: No suitable drive解决方法_第1张图片

 配置文件的配置错误:可能是账号或者是密码与数据库的账号密码不同

二:

java.sql.SQLException: No suitable drive解决方法_第2张图片

 连接数据库的配置文件必须在根目录(src)下,当src变为蓝色时便是根目录,若src不是根目录可以根据一下操作变为根目录:

右键src

java.sql.SQLException: No suitable drive解决方法_第3张图片

你可能感兴趣的:(bug解决,mysql,java,mysql)