Skip to main content
manjit.1486
June 20, 2024
Solved

An error occurred while trying to write to the data store . No values have been written. Details: org.hibernate.

  • June 20, 2024
  • 27 replies
  • 0 views

Hello Folks,

I am getting this error while write to Data store entity.
:"An error occurred while trying to write to the data store. No values have been written. Details: org.hibernate.PropertyValueException: not-null property references a null or transient value :"

Can anyone help me on this? Actually I want one column in a table is non nullable that is also behave as a foreign key.

Thanks

    Best answer by venkatrea696188

    Don't use Write to Multiple Datastore entities when there is a Parent-Child relation. I don't think it has the leverage to auto map Foreign keys like Write records.

    Here is the approach you need  follow

    1. Write to Parent table first , Use stored values and map the FK and then write to child

    Working with flat Cdt's

    27 replies

    konduruc733182
    June 20, 2024

    You have columns in database which are defined as Non-Nullable. Which means it cannot be empty and looks like you have no value being saved, hence the error. Please share the DB structure and the PV data if possible.

    manjit.1486
    June 20, 2024

    Please see db structure:

    Valuationid is not null field as it should not be empty or null.

    mikes0011
    Brainy
    June 20, 2024

    As a prior reply already noted, your tomcat-stdout.log file should contain an explanation as to what the actual missing column is.

    Did you check your failed process instance data to ensure that the CDT value is properly populated?  Could you post a screenshot of it here?

    karumurua531442
    June 20, 2024

    hi [mention:734d485eba7242aeab9bb03aafa409b0:e9ed411860ed4f2ba0265705b8793d05]  I think you have some not null columns in your database, columns in your database might be missing default value, May be you would be passing some null value from Appian to database

    davidj137213
    June 20, 2024

    You are trying to insert a null value in a column that does not accept null or empty  values..

    cithar575376
    June 20, 2024

    Hi,

    You can look at this Log tomcat-stdOut.log for more info like which one of the columns in this table is configured as Not Null. 

    June 20, 2024

    Do check how the value for your primary key of the cdt value is being saved. It might be the root cause or as the others mentioned, do check for the remaining fields you have marked not-null