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.

openjpa-users | Daryl Stultz | 7 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    PC object losing state

    openjpa-users | 7 years ago | 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.

    Root Cause Analysis

    1. 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()
    2. OpenJPA Aggregate Jar
      StateManagerImpl.beforeFlush
      1. org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:483)
      2. org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:463)
      3. org.apache.openjpa.jdbc.kernel.JDBCStoreManager.assignObjectId(JDBCStoreManager.java:744)
      4. org.apache.openjpa.kernel.DelegatingStoreManager.assignObjectId(DelegatingStoreManager.java:134)
      5. org.apache.openjpa.kernel.StateManagerImpl.assignObjectId(StateManagerImpl.java:520)
      6. org.apache.openjpa.kernel.StateManagerImpl.preFlush(StateManagerImpl.java:2824)
      7. org.apache.openjpa.kernel.PNewState.beforeFlush(PNewState.java:39)
      8. org.apache.openjpa.kernel.StateManagerImpl.beforeFlush(StateManagerImpl.java:960)
      8 frames