原先跑TEST CASE的时候没有出错

但是跑到整个程序里面,除了这个问题,

网上也找了下资料,说是用merge之类的可以解决,因为你这个update的obj和session里面的不用,所以导致此问题。

突然石化~~~想到session~~~想到TESTcase的时候没有用事物aop所以每个方法都是一个事物,所以当然没问题,而大程序里面用了事物,更新的是取出来的obj但是又多此一举的beanutils的copy了一下,导致不是一个obj了,但是session里面又有这个obj的id,故此问题发生~~~偶滴神啊。。最后TEST
CASE里面全加上加事务。

rg.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session:的更多相关文章

  1. Exception 06 : org.hibernate.NonUniqueObjectException: A different object with the same identifier value was already associated with the session :

    异常名称: org.hibernate.NonUniqueObjectException: A different object with the same identifier value was ...

  2. org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session:

    保存实体异常 https://blog.csdn.net/zzzz3621/article/details/9776539 org.hibernate.NonUniqueObjectException ...

  3. org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session异常解决办法

    org.hibernate.NonUniqueObjectException: a different object with the same identifier value was alread ...

  4. org.hibernate.NonUniqueObjectException: a different object with the same identifier value was alread---------程序报错

    今天遇到了这个问题: org.hibernate.NonUniqueObjectException: a different object with the same identifier value ...

  5. Hibernate Error: a different object with the same identifier value was already associated with the session

    在执行Hibernate的Update操作时,报错:a different object with the same identifier value was already associated w ...

  6. hibernate 异常a different object with the same identifier value was already associated with the session

    在使用hibernate的时候发现了一个问题,记录一下解决方案. 前提开启了事务和事务间并无commit,进行两次save,第二次的时候爆出下面的异常a different object with t ...

  7. org.hibernate.NonUniqueObjectException:a different object with the same identifier value was alread

    转自: http://blog.csdn.net/zzzz3621/article/details/9776539 看异常提示意思已经很明显了,是说主键不唯一,在事务的最后执行SQL时,session ...

  8. hibernate中一种导致a different object with the same identifier value was already associated with the session错误方式及解决方法

    先将自己出现错误的全部代码都贴出来: hibernate.cfg.xml <?xml version="1.0" encoding="UTF-8"?> ...

  9. Hibernate更新数据报错:a different object with the same identifier value was already associated with the session: [com.elec.domain.ElecCommonMsg#297e35035c28c368015c28c3e6780001]

    使用hibernate更新数据时,报错 Struts has detected an unhandled exception: Messages: a different object with th ...

随机推荐

  1. 如何为UEditor设置默认值

    // 初始化UEditor var ue = UE.getEditor('editor'); ue.ready(function() { //设置默认值 ue.setContent('默认值....' ...

  2. WebSocket转载

    目录   概述  WebSocket 客户端  WebSocket 服务端  WebSocket 代理  FAQ  完整示例  资料 概述 WebSocket 是什么? WebSocket 是一种网络 ...

  3. Ceph分布式存储部署过程

    前言: 环境介绍:此次部署系统为Cenots 7 MON.OSD 10.110.180.112 Admin MON.OSD 10.110.180.113 Node1 MON.OSD 10.110.18 ...

  4. sqoop 导入增量数据到hive

    版本 hive:apache-hive-2.1.0 sqoop:sqoop-1.4.6 hadoop:hadoop-2.7.3 导入方式 1.append方式 2.lastmodified方式,必须要 ...

  5. [ipsec][strongswan] strongswan源码分析-- (三) xfrm与strongswan内核接口分析

    目录 strongwan sa分析(三) xfrm与strongswan内核接口分析 1. strongswan的实现 2. 交互机制 4. xfrm的消息通信的实现 strongwan sa分析(三 ...

  6. 本地安装部署ActiveCollab

    ActiveCollab是一个非常易于使用.基于Web.开源的协作开发与项目管理工具. 我们公司一直在用这款工具,进行任务分配和时间填写,十分简便 ActiveCollab可以利用它轻松地搭建一个包括 ...

  7. MySQL将某个数据库下的所有表的存储引擎修改为InnoDB类型语句

    如何将mysql数据库中的MyISAM类型表更改为InnoDB类型的表 改单个表 ALTER TABLE TABLENAME ENGINE=InnoDB; ALTER TABLE TABLENAME ...

  8. npm start a http server( 在windows的任意目录上开启一个http server 用来测试html 页面和js代码,不用放到nginx的webroot目录下!!)

    原文:https://stackabuse.com/how-to-start-a-node-server-examples-with-the-most-popular-frameworks/#:~:t ...

  9. unsupervised learning: clustering介绍

    unsupervised learning 上面是监督学习与无监督学习的比较,监督学习的training set是一组带label(y)的训练集,而无监督学习不带有label(y). 上图中的监督学习 ...

  10. Dynamics 365 目录

    Dynamics 365 目录 1.Dynamics 365 on-premises 安装 2.Dynamics 365 安装过程中的问题 2.1Dynamics 365 安装问题——无法访MSCRM ...