栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

Could not get JDBC Connection; nested exception is java.sql.SQLException: com.mysql.cj.jdbc.Driver

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Could not get JDBC Connection; nested exception is java.sql.SQLException: com.mysql.cj.jdbc.Driver

Type Exception Report

Message Could not get JDBC Connection; nested exception is java.sql.SQLException: com.mysql.cj.jdbc.Driver

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: com.mysql.cj.jdbc.Driver
	org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)
	org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:390)
	org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:470)
	org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:480)
	com.example.dao.impl.UserDaoImpl.findAll(UserDaoImpl.java:20)
	com.example.service.impl.UserServiceImpl.findAll(UserServiceImpl.java:16)
	com.example.web.servlet.UserListServlet.doPost(UserListServlet.java:22)
	com.example.web.servlet.UserListServlet.doGet(UserListServlet.java:31)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

检查mysql-connector-java包 版本是否与数据库版本对应

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/490786.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号