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.

  • PC object losing state
    via by Daryl Stultz,
    • org.apache.openjpa.persistence.InvalidStateException: The generated value processing detected an existing value assigned to this field: ... model.Bar.id <http://model.Foo.id>. This existing value was either provided via an initializer or by calling the setter method. You either need to remove the @GeneratedValue annotation or modify the code to remove the initializer processing. at org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:483) at org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:463) at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.assignObjectId(JDBCStoreManager.java:744) at org.apache.openjpa.kernel.DelegatingStoreManager.assignObjectId(DelegatingStoreManager.java:134) at org.apache.openjpa.kernel.StateManagerImpl.assignObjectId(StateManagerImpl.java:520) at org.apache.openjpa.kernel.StateManagerImpl.preFlush(StateManagerImpl.java:2824) at org.apache.openjpa.kernel.PNewState.beforeFlush(PNewState.java:39) at org.apache.openjpa.kernel.StateManagerImpl.beforeFlush(StateManagerImpl.java:960)
    No Bugmate found.