Tips for resolving Hibernate/JPA EntityNotFoundException

Posted by Damo on Stack Overflow See other posts from Stack Overflow or by Damo
Published on 2010-03-18T02:34:39Z Indexed on 2010/03/18 2:41 UTC
Read the original article Hit count: 516

Filed under:
|
|
|

I'm running into a problem with Hibernate where when trying to delete a group of Entities I encounter the following error:

javax.persistence.EntityNotFoundException: deleted entity passed to persist: [com.locuslive.odyssey.entity.FreightInvoiceLine#<null>]

These are not normally so difficult to track down as they are usually caused by an entity being deleted but not being removed from a Collection that it is a member of.

In this case I have removed the entity from every list that I can think of (it's a complex datamodel). I've put JBoss logging into Trace and I can see the collections that are being cascaded. However I can't seem to find the Collection containing the entity that I'm deleting.

Does anyone have any tips for resolving this particular Exception?

Thanks.

© Stack Overflow or respective owner

Related posts about hibernate

Related posts about jsf