异常org.hibernate.NonUniqueObjectException及其解决

org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [com.crms.model.CstLinkman#LM01] 	at org.hibernate.engine.StatefulPersistenceContext.checkUniqueness(StatefulPersistenceContext.java:556) 	at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performUpdate(DefaultSaveOrUpdateEventListener.java:258) 	at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsDetached(DefaultSaveOrUpdateEventListener.java:216) 	at org.hibernate.event.def.DefaultUpdateEventListener.performSaveOrUpdate(DefaultUpdateEventListener.java:33) 	at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70) 	at org.hibernate.impl.SessionImpl.fireUpdate(SessionImpl.java:559) 	at org.hibernate.impl.SessionImpl.update(SessionImpl.java:547) 	at org.hibernate.impl.SessionImpl.update(SessionImpl.java:539) 	at com.crms.dao.impl.CstLinkmanDaoImpl.update(CstLinkmanDaoImpl.java:43) 	at com.crms.service.impl.CustCustServiceImpl.updateLinkman(CustCustServiceImpl.java:298) 	at com.crms.action.CustCustUpdateLinkmanAction.execute(CustCustUpdateLinkmanAction.java:41) 	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) 	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) 	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) 	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584) 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) 	at java.lang.Thread.run(Thread.java:619)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值