Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » RollbackException for tree structure(RollbackException for tree structure)
icon5.gif  RollbackException for tree structure [message #1719207] Wed, 06 January 2016 08:45 Go to next message
peter 4i4ik is currently offline peter 4i4ikFriend
Messages: 1
Registered: January 2016
Junior Member
By using an Eclipse Link to a some kind of nested / tree structure ( objects have a lists with chils-objects of the same type) i gain an exception:$StatusBuildException: javax.persistence.RollbackException: java.lang.IllegalStateException: During synchronization a new object was found through a relationship that was not marked cascade PERSIST: 1.

I can not post the code here, because it is a big project, and not done completely by me (there are parts there what i don't know).
Re: RollbackException for tree structure [message #1719398 is a reply to message #1719207] Thu, 07 January 2016 15:49 Go to previous message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1380
Registered: July 2009
Senior Member
You haven't quite added any information as to what help you need, so its difficult to comment on with anything that might be helpful. The error occurs when set a reference on a managed entity (or one that becomes managed through cascade merge/persist rules) to a new entity instance, and this relationship isn't set to also cascade persist. Since the lack of cascade persist prevents it from inserting the new object, and it doesn't have any identity to use in setting the relationship you've setup (which would fail anyway if it really is a new object), it is required to throw an error for this situation. If you have multiple lists all of the same class types, it will be difficult to debug, but look for areas of code that might add an entity to a list that doesn't have cascade persist/all and isn't persisting/merging the entity first.

Good luck
Previous Topic:Doing an Oracle db query with a PL/SQL Function in where clause
Next Topic:Escaping ]]> in MOXy
Goto Forum:

Current Time: Mon Mar 01 06:50:42 GMT 2021

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

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

Back to the top