CodeForLife
CodeForLife

Reputation: 89

Getting DBNullConstraintException while creating exposure

while creating exposure I am getting the below error. The logs just show DBNullConstraintException, so I could not find which entity or column is causing the issue. I am not sure how can i do analysis on this issue?

Log details:

ERROR Displaying to the user an exception message that is not a UserDisplayableException in context ID 'NewExposure' com.guidewire.pl.system.exception.DBNullConstraintException: at com.guidewire.pl.system.database.entitywriter.DatabaseEntityWriterImpl.checkForNullConstraintViolation(DatabaseEntityWriterImpl.java:227) ~[pl-10.101.0.jar:?] at

Upvotes: 1

Views: 1343

Answers (1)

Arun Kumar Mani
Arun Kumar Mani

Reputation: 387

Go to Studio, open Exposure.eti and Exposure.etx

Check all fields (like column, typekey, ForeignKey) in Exposure entity that has nullok = FALSE

By this you will come to know the list of fields that are mandatory to have some valid data (which can not be null) while inserting any new record in to cc_exposure DB table.

Then, You need to check your code base where you actually adding data to all the mandatory fields (nullok false fields) that you checked above.

If any field has NULL, you will get this null constrain exception.

Note: May be the actual issue be with other related entities to Exposure as well. Please check other entities also in similar way.

Upvotes: 3

Related Questions