org.apache.openjpa.persistence.InvalidStateException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • org.apache.openjpa.persistence.InvalidStateException: Encountered unmanaged object in persistent field "...model.Foo" during flush. However, this field does not allow cascade persist. Set the cascade attribute for this field to CascadeType.PERSIST or CascadeType.ALL (JPA annotations) or "persist" or "all" (JPA orm.xml), or enable cascade-persist globally, or manually persist the related field value prior to flushing. You cannot flush unmanaged objects or graphs that have persistent associations to unmanaged objects. FailedObject: ...model.Foo-8729 at org.apache.openjpa.kernel.SingleFieldManager.preFlushPC(SingleFieldManager.java:754) at org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:594) at org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:562) at org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:478) at org.apache.openjpa.kernel.StateManagerImpl.preFlush(StateManagerImpl.java:2829) at org.apache.openjpa.kernel.PNewState.beforeFlush(PNewState.java:39) at org.apache.openjpa.kernel.StateManagerImpl.beforeFlush(StateManagerImpl.java:960)

Users with the same issue

Unknown visitor
Unknown visitor1 times, last one,