egnrynyrn5un 2019-07-01 07:22 采纳率: 100%
浏览 383
已采纳

我做ssm然后做到验证登录的时候出了这个问题

怎么办,我跟着视频老师做的看了两遍了还是没找到错误= =。大佬救救孩子吧
严重: Servlet.service() for servlet [DispatcherServlet] in context with path [/SJLykt] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:

Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'db_vote_system'

The error may exist in file [C:\XXXX\sp.metadata.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\SJLykt\WEB-INF\classes\config\mybatis\mapper\UserMapper.xml]

The error may involve ykt.dao.UserDao.findByUserName

The error occurred while executing a query

Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'db_vote_system'] with root cause

  • 写回答

2条回答

  • 毕小宝 博客专家认证 2019-07-01 08:58
    关注

    db_vote_system 数据库不存在。要学会看异常信息,根据异常信息定位问题很高效的啊。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥20 delta降尺度方法,未来数据怎么降尺度
  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
  • ¥15 高德地图点聚合中Marker的位置无法实时更新
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错