“采坑”错误集锦

1、service层

错误描述:2019-04-14 22:09:52.027 ERROR 8416 --- [nio-8082-exec-5] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.wechat.springbootleaving.dao.AreaDao.queryArea] with root cause

解决:

service层必须和serviceImpl层放在同一个包下

2、数据库连接池

问题描述:

{"success":false,"errMsg":"Handler dispatch failed; nested exception is java.lang.AbstractMethodError: Method com/mchange/v2/c3p0/impl/NewProxyResultSet.isClosed()Z is abstract"}

解决:

3、扫描不到controller

问题描述:打开localhost:一直报404,连hello,也输不出来

解决:启动类中:MapperScan("dao层路径")

4、数据库时区

问题描述:The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone

解决:

5、数据库调不出来

描述:简单hello可以输出,调用数据库出错

{“success”:false,“errMsg”:“嵌套异常是org.apache.ibatis.exceptions.PersistenceException:\ r \ n ###错误查询数据库。原因:org.springframework.jdbc.CannotGetJdbcConnectionException:无法获取JDBC连接;嵌套异常是java.sql.SQLException:无法从底层数据库获取连接!\ r \ n ###文件中可能存在错误[D:\微信小程序参考\微信小程序前后端源码\ zhang-demo-test \ target \ classes \ mapper \ AreaDao.xml] \ r \ n ###错误可能涉及com.imooc.demo1.zhangdemotest.dao.AreaDao.queryArea \ r \ n ###执行查询时发生错误\ r \ n ###原因:org.springframework.jdbc.CannotGetJdbcConnectionException:无法获取JDBC连接;嵌套异常是java.sql.SQLException:无法从中获取连接底层数据库!“}

解决:

6、数据库密码错误

描述:Access denied for user 'root'@'localhost' (using password: YES)

解决:改正mybatis或者jdbc配置中mysql数据库密码,检查数据库是否断开连接

7、web界面显示错误

问题描述:adminsex和asex;adminName和aname;adminDepartment和adepartment重复输出

解决:

Admin实体里面多了asex,aname,adepartment的get和set方法

8、数据显示错误

描述:输出数据为空

解决:

实体的属性名与数据库中属性名不一致

最新文章

  1. 滚来滚去,滚来滚去...Scroller完全解析
  2. web app性能大讨论
  3. js解决IE不支持数组的indexOf()方法
  4. SpringMVC利用拦截器防止SQL注入
  5. android 学习随笔二十九(自定义监听 )
  6. 1、Hadoop架构
  7. MHA参数 转
  8. [Ruby on Rails系列]6、一个简单的暗语生成器与解释器(上)
  9. [Docker] Docker Machine intro
  10. Angularjs中的嵌套路由ui-router
  11. javascript设计模式——组合模式
  12. 用委托(Delegate)的BeginInvoke和EndInvoke方法操作线程
  13. ORA-12737: Instant Client Light: unsupported server character set CHS16GBK
  14. angularjs html 转义
  15. iOS-----------关于UDID
  16. python操作字符串类型json的注意点
  17. git图形化界面gitk里中文乱码解决
  18. Presto 性能优化点
  19. GIL 全局解释器
  20. ES6 基础

热门文章

  1. Python3笔记027 - 6.2 参数传递
  2. Python Ethical Hacking - TROJANS Analysis(2)
  3. /dev/mapper/VolGroup00-LogVol00 满了,根目录存储垃圾文件导致磁盘满了
  4. Logging with ElasticSearch, Kibana, ASP.NET Core and Docker
  5. three.js 数学方法之Plane
  6. TeamViewer如何绑定谷歌二次验证码/谷歌身份验证?
  7. js原型链结构理解
  8. Docker 入门教程(3)——Dockerfile
  9. DJANGO-天天生鲜项目从0到1-012-订单-用户订单页面
  10. 初识Elastic search—附《Elasticsearch权威指南—官方guide的译文》