Posted on

How to fix: Bean Validation constraint(s) violated while executing Automatic Bean Validation on callback event:’prePersist’

If you are using JPA and get the exception:

Bean Validation constraint(s) violated while executing Automatic Bean Validation on callback event:’prePersist’

But you are not clear what exactly goes wrong. You can fix it by adding the code to show you more detail about the validation exception:

https://gist.github.com/i88ca/17084ab65853c685d597.js

Leave a Reply

Your email address will not be published. Required fields are marked *