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

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

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包 版本是否与数据库版本对应

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/5482908.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-12-12
下一篇2022-12-12

发表评论

登录后才能评论

评论列表(0条)

    保存