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

因为查询结果是多条数据,接收查询结果的却是个对象。

query did not return a unique result: 2错误的发生的更多相关文章

  1. 解决java.sql.SQLException: ORA-01789: query block has incorrect number of result columns

    java.sql.SQLException: ORA-01789: query block has incorrect number of result columns at oracle.jdbc. ...

  2. ORA-01789: query block has incorrect number of result columns

    问题描述 ORA-01789: query block has incorrect number of result columns 原因如下 查询使用了union或者union all的时候查询上下 ...

  3. JS函数 返回值的函数 return sum;或者result = add2(3,4);

    返回值的函数 思考:上一节函数中,通过"document.write"把结果输出来,如果想对函数的结果进行处理怎么办呢? 我们只要把"document.write(sum ...

  4. git clone的时候报error: RPC failed; result=18错误

    因业务需求,需要把内网gitlab仓库的地址对外网访问,在gitlab前端配置了一个nginx代理服务器,来实现需求,可以在git clone的时候报error: RPC failed错误 [root ...

  5. s2h-HTTP Status 404 - No result defined for action and result input错误解决

    今天做个小项目,用的是ssh,结果在运行的时候出现HTTP Status 404 - No result defined for action and result input的错误. 首先认真检查所 ...

  6. .net连接DB2的异常SQL0666 - SQL query exceeds specified time limit or storage limit.错误处理

    SQL0666 - SQL query exceeds specified time limit or storage limit. 原因:查询超时 解决办法: set the DbCommand.C ...

  7. HTTP Status 404 - No result defined for action com.ouyang.action.GreetingAction and result success 错误解决办法

    1.原来设置的包声明: <package name="myPackage" extends="struts-default"> <!-- 定义 ...

  8. Connector/c++ 查询Mysql,出现 can't fetch because not on result set 错误

    使用 Connector/C++ 查询 Mysql 时,出现错误,提示如下: can't fetch because not on result set, 出现原因可以看这里:http://stack ...

  9. new types may not be defined in a return type(c++语言编译错误,处理)

    在写程序的时候,定义类时要在大括号后面加上: class Point{ public: Point(int a,int b); Point(const Point &p); int getx( ...

随机推荐

  1. 时钟信号的占空比调整——Verilog

    时钟信号的占空比调整——Verilog `timescale 1ns / 1ps /////////////////////////////////////////////////////////// ...

  2. python io-os

    #IO - os import os; #文件改名 #os.rename('io.txt','newio.txt'); #删除文件 #os.remove('io2.txt'); #创建文件夹(目录) ...

  3. Optaplanner规划引擎的工作原理及简单示例(1)

    在之前的文章中,老猿已介绍过APS及规划的相关内容,也对Optaplanner相关的概念和一些使用示例进行过介绍,接下来的文章中,我会自己做一个规划小程序 - 一个关于把任务分配到不同的机台上进行作来 ...

  4. storm中的一些概念

    1.topology 一个topolgy是spouts和bolts组成的图,通过stream groupings将图中的spout和bolts连接起来:如图所示: 一个topology会一直运行知道你 ...

  5. Spring编程式事务管理和声明式事务管理

    本来想写一篇随笔记一下呢,结果发现一篇文章写的很好了,已经没有再重复写的必要了. https://www.ibm.com/developerworks/cn/education/opensource/ ...

  6. vim YouCompleteMe 遇到的问题及解决

    问题1: 补充,升级gcc,g++ 到4.7以上的版本才能安装成功 github 官网 github https://github.com/Valloric/YouCompleteMe#ubuntu- ...

  7. SfMLearner 记录

    2019年3月2日09:29:54 正在看SfMLearner的pytorch源码,意识到无监督的深度估计最重要的是利用实体的一致性 来建立loss. 对于一个不移动的物体,相机从一个pose到另一个 ...

  8. iptables禁止某个mac地址上网

    iptables -I FORWARD  -m mac --mac-source  60:14:B3:7D:6B:39 -j DROP 上面这条命令测试过是可行,禁止这个mac地址上网,马上禁止马上生 ...

  9. golang初识 - install go on ubuntu

    WSL: Ubuntu 18.04 1. install go (1) unzip sudo mkdir -p /usr/local/go sudo tar zxvf go1.12.4.linux-a ...

  10. Postman A请求的返回值作为B请求的入参( 拢共分三步)