Process failed: org.hibernate.exception.ConstraintViolationException: could not execute statement
When doing a dry run it completes without an error… And creates the desired metadata objects (categories, data elements, data sets, option sets and etc)… (I’m importing what I did from a test setup to a production environment)
But I haven’t figured out what this error could be… any help?
Is the test setup and the production environment the same version? How about trying to do the same thing in play.dhis2.org does it work or does it produce the same error?
I don’t know if it’s causing the issue. I’d also try to export from the production server to the test server and see if it works or generates the same error. It could be either because of a bug in 2.35.2 and in that case you could post it to jira.dhis2.org, or an issue in the production server’s configuration.
Could you please share the server logs from when the error occurs? As @Gassim said, it would be good if you could create a jira issue with all the relevant information, including the server logs.
Would you be able to provide the server logs from when the issue occurred? This is very important as the error you are seeing is generic, and could be caused by different issues.
If you’re able to reproduce this issue on any of the play.dhis2.org instances then it’s probable yes otherwise sometimes the only way to find out the cause behind an issue is getting back to the logs. Thanks!
However, I took a guess that your other post could be similar to an issue another community member faced so I posted it there. Good luck!
@ckambobe That’s true… I get this error predominantly when importing A LOT of data like when doing metadata export and selecting all.
it’s difficult to identify the error with that and at that particular point I didn’t go through the error logs to see what could be the issue from the backend.
Yes, when breaking the data down into bits, I rarely run into the error.