转自: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: 问题的更多相关文章

  1. org.springframework.dao.DuplicateKeyException

    org.springframework.dao.DuplicateKeyException: PreparedStatementCallback; SQL [insert into account v ...

  2. java.lang.RuntimeException: org.springframework.dao.DuplicateKeyException:

    java.lang.RuntimeException: org.springframework.dao.DuplicateKeyException: ### Error updating databa ...

  3. org.springframework.dao.DuplicateKeyException: a different object with the same identifier value was

    在使用hibernate框架里面的:saveOrUpdate报错: 意思就是另一个对象的id(id同值)已经被session关联了. 原因分析: 在第1步中中通过titleList.get(0)获取一 ...

  4. 【异常】Caused by: java.lang.ClassNotFoundException: org.springframework.dao.DataIntegrityViolationException

    Caused by: java.lang.ClassNotFoundException: org.springframework.dao.DataIntegrityViolationException ...

  5. org.springframework.dao.DataIntegrityViolationException:

    数据库用的hibernate,开发工具用的myeclipse,使用开发工具连接数据库生成hibernate基于xml的po类,运行时报org.springframework.dao.DataInteg ...

  6. javaEE-----org.springframework.dao.InvalidDataAccessApiUsageException: Write operation

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

  7. org.springframework.dao.InvalidDataAccessApiUsageException: Parameter value [41] did not match expected type [java.lang.Integer (n/a)];

    题记:以前记录过一些自己遇到的BUG,这个行为,让我一看报错的提示信息就能定位到问题的所在,后来记得比较多了,好多是重复性的再加上比较忙就没有详细的记录了,今天的工作量比较小,就顺便记录一下,以便以后 ...

  8. org.springframework.dao.InvalidDataAccessApiUsageException:The given object has a null identifi的解决方案

    异常信息: org.springframework.dao.InvalidDataAccessApiUsageException: The given object has a null identi ...

  9. org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode

    [spring]:org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowe ...

随机推荐

  1. gdal 根据条件选择数据

  2. 品优购商城项目(五)消息中间件 ActiveMQ

    消息中间件用于降低各个项目模块的耦合,适用于不需要等待返回消息才能进入下一个业务环节的模块,以及实时要求性不高的业务模块. 一.JMS JMS(Java Messaging Service)是Java ...

  3. docker安装并运行kibana

    拉镜像: [mall@VM_0_7_centos ~]$ : Pulling from library/kibana 256b176beaff: Already exists 88643bded09c ...

  4. Jmeter-Critical Section Controller(临界区控制器)(还没看,是一个控制请求按顺序执行的东东)

    The Critical Section Controller ensures that its children elements (samplers/controllers, etc.) will ...

  5. kubernetes核心原理之API Server原理分析

    kubernetes API Server的核心功能是提供了Kubernetes各类资源对象(Pod,RC,Service等)的增删改查及Watch等HTTP Rest接口,成为集群内各个功能模块之间 ...

  6. [LeetCode] 639. Decode Ways II 解码方法 II

    A message containing letters from A-Z is being encoded to numbers using the following mapping way: ' ...

  7. VS2019/VS2017怎么更改visual studio新建项目的默认路径

    1.点击“工具” 2.选择“选项” 3.点击左边的“项目和解决方案”展开选择“常规” 4.在右边- ”项目位置“来自定义默认路径 5.“确定”保存后下次新建项目就是此默认路径

  8. Java反射桥接方法解析

    在阅读mybaits源码的反射模块时,看到了如下的一段代码: /** * 添加 Method 数组到 uniqueMethods * @param uniqueMethods * @param met ...

  9. c++递归函数

    一.什么是递归算法 递归即递推+回归.递归算法是把问题转化为规模缩小了的同类子问题,然后递归调用函数(或过程)来表示问题的解. 二.递归算法的特点 1.必须有 递归函数 + 递归出口 2.递归算法解题 ...

  10. Python中的条件判断、循环以及循环的终止

    条件判断 条件语句是用来判断给定条件是否满足,并根据判断所得结果从而决定所要执行的操作,通常的逻辑思路如下图: 单次判断 形式 if <判断条件>: <执行> else: &l ...