Vladislav Chkhartishvili Posted December 24, 2021 Share Posted December 24, 2021 While executing a report i get following errors:ERROR AbstractFlushingEventListener - Could not synchronize database state with sessionorg.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch updateCaused by: java.sql.BatchUpdateException: Batch entry 0 insert into JIUserRole (userId, roleId) values (454131, 4) was aborted: ERROR: duplicate key value violates unique constraint "jiuserrole_pkey" Detail: Key (userid, roleid)=(454131, 4) already exists. Call getNextException to see other errors in the batch.Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "jiuserrole_pkey" Detail: Key (userid, roleid)=(454131, 4) already exists###ERROR SystemErrorController - Internal server errororg.springframework.dao.DataIntegrityViolationException: Could not execute JDBC batch update; SQL [insert into JIUserRole (userId, roleId) values (?, ?)]; constraint [jiuserrole_pkey]; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch updateCaused by: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch updateCaused by: java.sql.BatchUpdateException: Batch entry 0 insert into JIUserRole (userId, roleId) values (454131, 4) was aborted: ERROR: duplicate key value violates unique constraint "jiuserrole_pkey" Detail: Key (userid, roleid)=(454131, 4) already exists. Call getNextException to see other errors in the batch.Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "jiuserrole_pkey" Detail: Key (userid, roleid)=(454131, 4) already exists.###ERROR JDBCExceptionReporter - ERROR: duplicate key value violates unique constraint "jiuserrole_pkey" Detail: Key (userid, roleid)=(454131, 4) already exists.###ERROR JDBCExceptionReporter - Batch entry 0 insert into JIUserRole (userId, roleId) values (454131, 4) was aborted: ERROR: duplicate key value violates unique constraint "jiuserrole_pkey" Detail: Key (userid, roleid)=(454131, 4) already exists. Call getNextException to see other errors in the batch.[/code]Why does jasper try to insert existing user in JIUserRole? Link to comment Share on other sites More sharing options...
Vladislav Chkhartishvili Posted January 19, 2022 Author Share Posted January 19, 2022 https://community.jaspersoft.com/wiki/caused-javasqlbatchupdateexception-batch-entry-0-insert-jiuserrole-userid-roleid-values-number Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now