Jump to content
Changes to the Jaspersoft community edition download ×

How delete a user on jasper server


inge_Jmarin

Recommended Posts

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

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

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

  • 4 months later...

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

  • 1 month later...
  • 5 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...