I copied a report unit to another folder renaming it and using copies of the resources such as sub report etc. But upon trying to save the report in Jasper studio, I am getting the below error. What am I missing? Stack Trace org.apache.http.client.HttpResponseException: resource.in.use could not delete: [com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.persistent.RepoFileResource#2073]: ERROR: update or delete on table "jifileresource" violates foreign key constraint "fk98818b778c8df21b" on table "jireportunit" Detail: Key (id)=(2073) is still referenced from table "jireportunit". at com.jaspersoft.studio.server.protocol.restv2.RESTv2ExceptionHandler.handleErrorDescriptor(RESTv2ExceptionHandler.java:122) at com.jaspersoft.studio.server.protocol.restv2.RESTv2ExceptionHandler.handleException(RESTv2ExceptionHandler.java:78) at com.jaspersoft.studio.server.protocol.restv2.ARestV2ConnectionJersey.toObj(ARestV2ConnectionJersey.java:57) at com.jaspersoft.studio.server.protocol.restv2.RestV2ConnectionJersey.addOrModifyResource(RestV2ConnectionJersey.java:557) at com.jaspersoft.studio.server.protocol.ProxyConnection.addOrModifyResource(ProxyConnection.java:336) at com.jaspersoft.studio.server.WSClientHelper.saveResource(WSClientHelper.java:323) at com.jaspersoft.studio.server.WSClientHelper.save(WSClientHelper.java:368) at com.jaspersoft.studio.server.publish.Publish.saveResource(Publish.java:286) at com.jaspersoft.studio.server.publish.Publish.publishResources(Publish.java:199) at com.jaspersoft.studio.server.publish.Publish.publish(Publish.java:69) at com.jaspersoft.studio.server.publish.wizard.Publish2ServerWizard$3.run(Publish2ServerWizard.java:311) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)