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
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  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 | 5 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