java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/

这里写图片描述

问题描述:
在debug模式下出现的,没执行到close,修改错去后,又从头执行,获取连接报错

问题原因:

XXX registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.


XXX appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.//未关闭连接  引起 内存泄漏

XXX is still processing a request that has yet to finish. This is very likely to create a memory leak. You can control the time allowed for requests to finish by using the unloadDelay attribute of the standard Context implementation.

问题处理:
重启服务器

参考:

出现这样的情况,一般有四种原因: 

一:连接URL格式出现了问题(Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/XX","root","XXXX") 

二:驱动字符串出错(com.mysql.jdbc.Driver) 

三:Classpath中没有加入合适的mysql_jdbc驱动(驱动要和你的数据库版本一致) 

四:驱动jar包放的位置不对
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值