Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » EclipseLink merge fails to insert
EclipseLink merge fails to insert [message #1008323] Mon, 11 February 2013 22:32 Go to next message
Venkat Venkat is currently offline Venkat VenkatFriend
Messages: 1
Registered: February 2013
Junior Member

In my project we use EclipseLink with JPA. We are persisting/updating a table using entityManager.merge(object). This works well for 98% of the times. 1.6% time it fails to do a new insert and 0.4% of times it fails to do an update. The issue is also not consistent. In the 2% cases, for some object if we re-process after 10 mins it works good and for some other objects if we restart the server it works good. There are no exceptions in the log.

Can anyone provide a clue on this. We are using the EclipseLink version 2.3.0. Are there any know bugs

Thanks in advance for your help on this.
Re: EclipseLink merge fails to insert [message #1008488 is a reply to message #1008323] Tue, 12 February 2013 17:34 Go to previous message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1296
Registered: July 2009
Senior Member
Merge on object trees can cause problems if object identity is not maintained, so it all depends on how you are using it and how you are cascading merge over the object graph. For instance, if you read in Tree A with references to B and C, but B also references C. If you Read in C from a different context (say C') make changes, associate it to A and then merge A, you may get into problems depending on the B->C relationship if both C and C' exist in the object graph being merged.

I don't know of any open issues where inserts or updates would be skipped otherwise, but you can try a later build (2.4.1 is released, a 2.5 nightly, or even 2.3.3) to see if it helps, otherwise you may need to isolate a use case where it occurs more frequently and try adding debugging to see how the entity is managed.

Best Regards,
Previous Topic:container managed transactions + shared cache eviction
Next Topic:Not able to build a criteria with "like expression"
Goto Forum:

Current Time: Wed May 23 05:37:41 GMT 2018

Powered by FUDForum. Page generated in 0.01646 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top