客户现场反馈考勤计算失败:
日志报错显示:
org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result: 2; nested exception is javax.persistence.NonUniqueResultException: query did not return a unique result: 2

这个异常是说明数据库中的数据本应该是唯一的 但是是重复了 是数据的问题不是代码问题哈!!!

根据报错的的日志,还有报错时做的操作去排查数据。如果有客户数据也可以根据日志报错提示的代码地方打断点走一遍代码,找到具体的报错数据。
如果名确是那张表,直接sql查询重复数据:
根据表中的一个字段查询:
select * from pers_person where name in (select name from pers_person group by name having count(name) > 1) ;

org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result相关推荐

  1. 记hibernate的一次报错 Cannot create TypedQuery for query with more than one return using requested result

    hql在做集联查询的时候通常会遇到根据两个Bean的字段生成一个新的Bean, 但是在使用中却发现这种方式存在一定的问题,导致出现了如下的BUG: org.springframework.dao.In ...

  2. org.springframework.dao.InvalidDataAccessApiUsageException: ERR wrong number of arguments for ‘srem‘

    1.报错信息 org.springframework.dao.InvalidDataAccessApiUsageException: ERR wrong number of arguments for ...

  3. redis死链 org.springframework.dao.QueryTimeoutException: Redis command timed out; nested exception

    问题 org.springframework.dao.QueryTimeoutException: Redis command timed out; nested exception is io.le ...

  4. h2内存数据库oracle模式,分页报错rg.springframework.dao.InvalidDataAccessResourceUsageException: could not prepar

    一.原因分析: 1:当我们使用hibernate的NativeQuery进行分页时,底层会采用limit或rownum,而采用哪种分页方式是有由不同数据库的方言决定的,下面将讲解h2的oracle模式 ...

  5. org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in r...

    2019独角兽企业重金招聘Python工程师标准>>> Struts Problem Report Struts has detected an unhandled exceptio ...

  6. 找不到org.springframework.dao.support.DaoSupport的类文件

    无法访问org.springframework.dao.support.DaoSupport   找不到org.springframework.dao.support.DaoSupport的类文件 或 ...

  7. org.springframework.dao.InvalidDataAccessApiUsageException: Write operations

    在配置 springmvc+hibernate+MySQL 的时候,出现如下问题: 异常信息: org.springframework.dao.InvalidDataAccessApiUsageExc ...

  8. java.lang.NoClassDefFoundError: org/springframework/dao/support/PersistenceE解决方法

    笔者是使用spring4.0时,报的错误: 原因是没有引入spring-tx-4.0.0.RELEASE.jar包,將spring-tx-4.0.0.RELEASE.jar添加到build path中 ...

  9. org.springframework.dao.InvalidDataAccessApiUsageException

    org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read ...

最新文章

  1. Python在计算内存时值得注意的几个问题
  2. java自动化开发_Java自动化开发指南
  3. ID3 Algorithm for Decision Trees
  4. Axure教程:如何使用动态面板?动态面板功能详解
  5. 如何学习区块链技术?
  6. 使用linux 的wget下载国外的域名的地址,下载不了,
  7. Windows下基于IIS服务的SSL服务器的配置
  8. Django入门文档
  9. scala当中的文件操作、网络请求和隐式转换
  10. vivado error 使用笔记
  11. win8/win10微信QQ邮箱可登陆,浏览器显示无网络连接
  12. mysql dba工具_Github推荐:MySQL DBA不可错过的五大开源管理工具!
  13. C中字符串的几种定义方法及说明
  14. Linux环境搭建spark3 yarn模式
  15. 区别:过去完成时、现在完成时、一般过去时
  16. Gartner陈勇:中国企业更积极探索双模IT
  17. 看了360与金山网盾的争执,我有几点疑惑....
  18. 推荐系统召回总结(持续更新)
  19. Ubuntu16.04中安装wineQQ 解决无法显示文字和字体发虚
  20. 【Elasticsearch】从零开始搭建ES8集群并且集成到Springboot,更好的服务电商类等需要全文索引的项目(二)

热门文章

  1. 实时查看磁盘inode和block变化
  2. Redis PPT abstract
  3. 提示cannot instantiate abstract class due to following members?
  4. CentOs6.6安装Python3
  5. Unity 5.x 游戏开发指南 HD版 final.pdf
  6. win10获取注册表权限
  7. ZH奶酪:自然语言处理工具LTP语言云调用方法
  8. 每日英语:Is austerity good for your health?
  9. 乔布斯不在了,世界一大步,苹果一小步。
  10. C++ 内嵌汇编 实现 加法操作