org.springframework.dao.DuplicateKeyException: 问题
转自:https://blog.51cto.com/chengxuyuan/1786938
org.springframework.dao.DuplicateKeyException: a different object with the same identifier value was already associated with the session: [com.sinosoft.claim.schema.model.PrpLlossInfo#REG13552269089070]; nested exception is org.hibernate.NonUniqueObjectException: a different object with
这个问题的话原因是在调用持久层类的进行保存域更新的时候,主键或唯一性约束冲突了. 记录下这个问题.
org.springframework.dao.DuplicateKeyException: 问题的更多相关文章
- org.springframework.dao.DuplicateKeyException
org.springframework.dao.DuplicateKeyException: PreparedStatementCallback; SQL [insert into account v ...
- java.lang.RuntimeException: org.springframework.dao.DuplicateKeyException:
java.lang.RuntimeException: org.springframework.dao.DuplicateKeyException: ### Error updating databa ...
- org.springframework.dao.DuplicateKeyException: a different object with the same identifier value was
在使用hibernate框架里面的:saveOrUpdate报错: 意思就是另一个对象的id(id同值)已经被session关联了. 原因分析: 在第1步中中通过titleList.get(0)获取一 ...
- 【异常】Caused by: java.lang.ClassNotFoundException: org.springframework.dao.DataIntegrityViolationException
Caused by: java.lang.ClassNotFoundException: org.springframework.dao.DataIntegrityViolationException ...
- org.springframework.dao.DataIntegrityViolationException:
数据库用的hibernate,开发工具用的myeclipse,使用开发工具连接数据库生成hibernate基于xml的po类,运行时报org.springframework.dao.DataInteg ...
- javaEE-----org.springframework.dao.InvalidDataAccessApiUsageException: Write operation
org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read ...
- org.springframework.dao.InvalidDataAccessApiUsageException: Parameter value [41] did not match expected type [java.lang.Integer (n/a)];
题记:以前记录过一些自己遇到的BUG,这个行为,让我一看报错的提示信息就能定位到问题的所在,后来记得比较多了,好多是重复性的再加上比较忙就没有详细的记录了,今天的工作量比较小,就顺便记录一下,以便以后 ...
- org.springframework.dao.InvalidDataAccessApiUsageException:The given object has a null identifi的解决方案
异常信息: org.springframework.dao.InvalidDataAccessApiUsageException: The given object has a null identi ...
- org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode
[spring]:org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowe ...
随机推荐
- Netty执行流程分析与重要组件介绍
一.环境搭建 创建工程,引入Netty依赖 二.基于Netty的请求响应Demo 1.TestHttpServerHandle 处理器.读取客户端发送过来的请求,并且向客户端返回hello worl ...
- Ubuntu18.04启动memtest86
对于Ubuntu18.04, 网上搜的结果都是错的, 根本不是启动时按shift, 而是按F8. 反复重启十几次后终于误触调出了启动菜单. 使用的是USB安装盘, 并且使用的是非UFEI模式.
- thinkphp5---join联合查询
使用thinkphp3.2进行联合查询,join联合查询: $list = M('document as d') ->join('tp_admin_column as c on d.cid = ...
- Servlet 添加 Cookie 返回 500 的问题
在学习 Servlet 中,学习 Cookie 的时候,往 response 中添加 Cookie ,结果出现 500 的错误 Cookie cookie1 = new Cookie(COOKIE_N ...
- Python之pandas读取mysql中文乱码问题
# -*- coding: utf-8 -*- # author:baoshan import pandas as pd import pymysql config = { "host&qu ...
- Pycharm连接远程服务器并进行代码上传+远程调试
前提:需要有一个远程服务器,知道他的ip.port.user.password 一.连接远程服务器 进入配置页面 Pycharm菜单栏,如下图所示,依次点击 Tools -> Deploymen ...
- win10 配置git 环境变量
'git' 不是内部或外部命令,也不是可运行的程序 或批处理文件. 解决办法: 去百度大概搜了一下,是因为没有配置Git环境变量的原因,但是没有具体的解决步骤,特此记录一下. 右键查看git安装目录: ...
- LeetCode_434. Number of Segments in a String
434. Number of Segments in a String Easy Count the number of segments in a string, where a segment i ...
- FPGA的配置方式
FPGA的配置方式 FPGA的配置方式有以下几种,JTAG,AS,PS,AP,FPP等几种. JTAG模式.JTAG模式下将.sof文件下载到FPGA内部的RAM内部进行运行,掉电程序丢失,主要用于前 ...
- android基础---->Toast的使用
简要说明 Toast是一种没有交点,显示时间有限,不能与用户进行交互,用于显示提示信息的显示机制,我们可以把它叫做提示框.Toast不依赖 于Activity,也就是说,没有Activity,依然可以 ...