• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Murali Sridhar
Ranch Hand
Posts: 44
Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

We tried to simulate the hibernate error in DEV and QA environments, but no luck. If I didn't re-produce the problem in DEV and QA, there is no point of 'fix' in production.

Here is the error message: ERROR webServiceMessageCall - "nested exception is org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session:"

I found some fixes by googling, but these are not helpful in re-producing the Hibernate error in DEV/QA environment.

Here is the simple hbm file:

** The AccKey is a simple bean.
Java code causing error:

Much appreciate your help in re-generating this problem in DEV.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like your list of objects contains two entries that equate to the same thing. Can you post your key implementation code?
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!