inge_Jmarin Posted March 5, 2020 Share Posted March 5, 2020 Please help me.I ´m trying delete a user but return the next error.<?xml version="1.0" encoding="UTF-8" standalone="yes"?><errorDescriptor> <errorCode>resource.in.use</errorCode> <message>could not execute batch: Cannot delete or update a parent row: a foreign key constraint fails (`jasperserver`.`jiaccessevent`, CONSTRAINT `FK7caj87u72rymu6805gtek03y8` FOREIGN KEY (`user_id`) REFERENCES `jiuser` (`id`)) </message></errorDescriptor>[/code]Thanks Link to comment Share on other sites More sharing options...
Tom C Posted March 6, 2020 Share Posted March 6, 2020 This error indicates that the user has access events that were logged in access event table. A user also has role assignment that is recorded in user role table. A user might also have entries in report job related tables if the user has scheduled report runs. All of those entries need to get deleted first before you can remove this user from user table. The question is, what method were you using to delete this user that caused the error? You should not have this problem if it is deleted from JRS manage user web flow in UI or through a REST delete user request which have hibernate managed unit of work for user hierarchies. Link to comment Share on other sites More sharing options...
inge_Jmarin Posted March 6, 2020 Author Share Posted March 6, 2020 The JRS it does not allow. Message: There was an error on the server. Try again or contact site administrator. When i have try for Rest i use the method Delete. Link to comment Share on other sites More sharing options...
Tom C Posted March 6, 2020 Share Posted March 6, 2020 Which version of JRS are you using? Is it a community edition or commercial edition? If you used JRS Manage > User web UI to delete a user and got this messge, it does not sound right. Link to comment Share on other sites More sharing options...
joshuatoepferyahoo.com Posted July 31, 2020 Share Posted July 31, 2020 I get the same error in JasperServer 7.5.0 CE. Using the Web UI to delete a user I get the following error. 2020-07-31T10:49:35,829 ERROR BatchingBatch,http-nio-8080-exec-3:120 - HHH000315: Exception executing batch [java.sql.BatchUpdateException: Batch entry 0 delete from JIUser where id=5818 was aborted: ERROR: update or delete on table "jiuser" violates foreign key constraint "fk7caj87u72rymu6805gtek03y8" on table "jiaccessevent" Detail: Key (id)=(5818) is still referenced from table "jiaccessevent". Call getNextException to see other errors in the batch.], SQL: delete from JIUser where id=?2020-07-31T10:49:35,830 ERROR SqlExceptionHelper,http-nio-8080-exec-3:131 - Batch entry 0 delete from JIUser where id=5818 was aborted: ERROR: update or delete on table "jiuser" violates foreign key constraint "fk7caj87u72rymu6805gtek03y8" on table "jiaccessevent" Detail: Key (id)=(5818) is still referenced from table "jiaccessevent". Call getNextException to see other errors in the batch.2020-07-31T10:49:35,830 ERROR SqlExceptionHelper,http-nio-8080-exec-3:131 - ERROR: update or delete on table "jiuser" violates foreign key constraint "fk7caj87u72rymu6805gtek03y8" on table "jiaccessevent" Detail: Key (id)=(5818) is still referenced from table "jiaccessevent". Link to comment Share on other sites More sharing options...
lachinaa Posted September 17, 2020 Share Posted September 17, 2020 Also on our Environment, v 7.5 Link to comment Share on other sites More sharing options...
el.jack28 Posted March 4, 2021 Share Posted March 4, 2021 I had the same issue on JS v7.8.Anyone please support this! Really appreciate that! Thanks. 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