-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: NonUniqueObjectException on update (no detached objects)
PostPosted: Tue Nov 03, 2009 5:01 pm 
Newbie

Joined: Wed Mar 08, 2006 5:48 pm
Posts: 4
Out of nowhere, my app is getting intermittent NonUniqueObjectExceptions on the update of an existing object.

I've looked around and the reasons that are usually given for this issue have to do with either detached objects or bad identity generation. I'm not using any detached objects and my identity generation is using an oracle sequence generator. I checked the generator, just to be sure someone didn't reset it but it's fine. I'm pretty sure this isn't the issue anyway because this is an update to an existing object.

At this point, I'm thinking that somehow the session no longer thinks the object in question is part of the session and sees my request as a create. One thing that may or may not matter is that the existing object in question is being linked (many-to-one) to an new object and that is the change in question.

Does any one have any ideas on what might cause the session to see the update as a create? Note that this doesn't always happen. When the user retries the change following the error, it works as expected.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.