I am encountering an issue when running the Role Index Refresh task in SailPoint IdentityIQ. The task fails with the following exception:
org.hibernate.exception.ConstraintViolationException: could not execute statement
in logs i can these below errors
2025-04-07T11:27:28,734 WARN QuartzScheduler_Worker-3 engine.jdbc.spi.SqlExceptionHelper:137 - SQL Error: 547, SQLState: 23000 2025-04-07T11:27:28,734 ERROR QuartzScheduler_Worker-3 engine.jdbc.spi.SqlExceptionHelper:142 - The DELETE statement conflicted with the REFERENCE constraint “”. The conflict occurred in database “identityiq”, table “identityiq.spt_bundle”, column ‘role_index’. 2025-04-07T11:27:28,734 INFO QuartzScheduler_Worker-3 jdbc.batch.internal.AbstractBatchImpl:208 - HHH000010: On release of batch it still contained JDBC statements 2025-04-07T11:27:28,744 ERROR QuartzScheduler_Worker-3 sailpoint.api.TaskManager:934 - Exception: [org.hibernate.exception.ConstraintViolationException: could not execute statement]
As per your suggestion, I ran the IDX task and there were no errors. after running the role index refresh, I encountered the same error that I received previously(org.hibernate.exception.ConstraintViolationException: could not execute statement).
you should be able to resolve this by deleting all RoleIndexes either via Debug Pages, iiq console or directly on the database.
Subsequently re-run the task to re-calculate the RoleIndexes.
May I ask which version of IIQ you are using atm? Just out of curiosity because we had this issue in earlier times quite frequently but not anymore since we have the brilliant feature “Role Change Propagation”.