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 ...
随机推荐
- patch的用法【转】
什么是patch patch即补丁之意,记录文件中的不同,能够与文件进行整合,从而改变文件中的内容 如何制作patch 在Linux系统中提供了diff程序,可以使用diff程序,比较文件之间的不同从 ...
- 搭建EOS全节点并接入主网
#EOS编译安装 #!/bin/bash #install.eos.sh #EOS 安装 #从github克隆主网代码 cd /opt git clone https://github.com/EOS ...
- SQLite添加新的字段
通过alter添加新的字段SQL语句 "ALTER TABLE 'DiHKChatMessage' ADD 'phoneNum' varchar"; 但是如果这个字段已经存在的话, ...
- osg::Group源码
osg::Group源码 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield * * This library i ...
- MD5(2)
/************************************************ MD5 算法的Java Bean @author:Topcat Tuppin Last Modifi ...
- nodejs 读取目前下所有文件
var fs = require('fs'); var join = require('path').join; function getJsonFiles(jsonPath) { let jsonF ...
- base64方式显示控件
data:,文本数据 data:text/plain,文本数据 data:text/html,HTML代码 data:text/html;base64,base64编码的HTML代码 data:tex ...
- 导入一个eclipse的java项目到IDEA报Cannot find JDK '1.7' for module 'TEST'
解决办法: 右键你的项目--------------->OPen module settings 将dependencies里面的module sdk改成你安装的java版本就可以了(比如我电脑 ...
- [LeetCode] 62. Unique Paths 唯一路径
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The ...
- 570. Managers with at Least 5 Direct Reports 至少有5个直接汇报员工的经理
The Employee table holds all employees including their managers. Every employee has an Id, and there ...