org.apache.openjpa.persistence.ArgumentException: Field "com.model.entities.jpa.Price.PriceAmount" of "com.model.entities.jpa.Price@1433836" can not be set to "null" value.

tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Is it possible to set a default null value for columns in JPA, and if, how is it done using annotations?

    Stack Overflow | 6 months ago | Harshit Wadhera
    org.apache.openjpa.persistence.ArgumentException: Field "com.model.entities.jpa.Price.PriceAmount" of "com.model.entities.jpa.Price@1433836" can not be set to "null" value.

    Root Cause Analysis

    1. org.apache.openjpa.persistence.ArgumentException

      Field "com.model.entities.jpa.Price.PriceAmount" of "com.model.entities.jpa.Price@1433836" can not be set to "null" value.

      at org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy.insert()
    2. OpenJPA Aggregate Jar
      AbstractUpdateManager.flush
      1. org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy.insert(HandlerFieldStrategy.java:133)
      2. org.apache.openjpa.jdbc.meta.FieldMapping.insert(FieldMapping.java:623)
      3. org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.insert(AbstractUpdateManager.java:239)
      4. org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.populateRowManager(AbstractUpdateManager.java:166)
      5. org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:97)
      6. org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:78)
      6 frames