org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result
客户现场反馈考勤计算失败:
日志报错显示:
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相关推荐
- 记hibernate的一次报错 Cannot create TypedQuery for query with more than one return using requested result
hql在做集联查询的时候通常会遇到根据两个Bean的字段生成一个新的Bean, 但是在使用中却发现这种方式存在一定的问题,导致出现了如下的BUG: org.springframework.dao.In ...
- org.springframework.dao.InvalidDataAccessApiUsageException: ERR wrong number of arguments for ‘srem‘
1.报错信息 org.springframework.dao.InvalidDataAccessApiUsageException: ERR wrong number of arguments for ...
- redis死链 org.springframework.dao.QueryTimeoutException: Redis command timed out; nested exception
问题 org.springframework.dao.QueryTimeoutException: Redis command timed out; nested exception is io.le ...
- h2内存数据库oracle模式,分页报错rg.springframework.dao.InvalidDataAccessResourceUsageException: could not prepar
一.原因分析: 1:当我们使用hibernate的NativeQuery进行分页时,底层会采用limit或rownum,而采用哪种分页方式是有由不同数据库的方言决定的,下面将讲解h2的oracle模式 ...
- org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in r...
2019独角兽企业重金招聘Python工程师标准>>> Struts Problem Report Struts has detected an unhandled exceptio ...
- 找不到org.springframework.dao.support.DaoSupport的类文件
无法访问org.springframework.dao.support.DaoSupport 找不到org.springframework.dao.support.DaoSupport的类文件 或 ...
- org.springframework.dao.InvalidDataAccessApiUsageException: Write operations
在配置 springmvc+hibernate+MySQL 的时候,出现如下问题: 异常信息: org.springframework.dao.InvalidDataAccessApiUsageExc ...
- 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中 ...
- org.springframework.dao.InvalidDataAccessApiUsageException
org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read ...
最新文章
- Python在计算内存时值得注意的几个问题
- java自动化开发_Java自动化开发指南
- ID3 Algorithm for Decision Trees
- Axure教程:如何使用动态面板?动态面板功能详解
- 如何学习区块链技术?
- 使用linux 的wget下载国外的域名的地址,下载不了,
- Windows下基于IIS服务的SSL服务器的配置
- Django入门文档
- scala当中的文件操作、网络请求和隐式转换
- vivado error 使用笔记
- win8/win10微信QQ邮箱可登陆,浏览器显示无网络连接
- mysql dba工具_Github推荐:MySQL DBA不可错过的五大开源管理工具!
- C中字符串的几种定义方法及说明
- Linux环境搭建spark3 yarn模式
- 区别:过去完成时、现在完成时、一般过去时
- Gartner陈勇:中国企业更积极探索双模IT
- 看了360与金山网盾的争执,我有几点疑惑....
- 推荐系统召回总结(持续更新)
- Ubuntu16.04中安装wineQQ 解决无法显示文字和字体发虚
- 【Elasticsearch】从零开始搭建ES8集群并且集成到Springboot,更好的服务电商类等需要全文索引的项目(二)
热门文章
- 实时查看磁盘inode和block变化
- Redis PPT abstract
- 提示cannot instantiate abstract class due to following members?
- CentOs6.6安装Python3
- Unity 5.x 游戏开发指南 HD版 final.pdf
- win10获取注册表权限
- ZH奶酪:自然语言处理工具LTP语言云调用方法
- 每日英语:Is austerity good for your health?
- 乔布斯不在了,世界一大步,苹果一小步。
- C++ 内嵌汇编 实现 加法操作