arlaudpierre Posted October 31, 2014 Share Posted October 31, 2014 Everytime I try deleting a file in the studio, I get the following stack trace: java.lang.Exception: The Server has returned an error with code 1 and with the message could not delete: [com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.persistent.ContentRepoFileResource#6282]; SQL [delete from JIResource where id=? and version=?]; constraint [fk47fb3cd7f254b53e]; nested exception is org.hibernate.exception.ConstraintViolationException: could not delete: [com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.persistent.ContentRepoFileResource#6282] at com.jaspersoft.ireport.jasperserver.ws.WSClient.delete(WSClient.java:224) at com.jaspersoft.ireport.jasperserver.ws.WSClient.delete(WSClient.java:199) at com.jaspersoft.studio.server.protocol.soap.SoapConnection.delete(SoapConnection.java:99) at com.jaspersoft.studio.server.protocol.ProxyConnection.delete(ProxyConnection.java:86) at com.jaspersoft.studio.server.WSClientHelper.deleteResource(WSClientHelper.java:327) at com.jaspersoft.studio.server.action.resource.DeleteResourceAction$1.run(DeleteResourceAction.java:81) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) How can I get rid of this constraint and actually delete this file? It seems to cause problems when I try overriding the whole report as well. Link to comment Share on other sites More sharing options...
hozawa Posted October 31, 2014 Share Posted October 31, 2014 What kind of file are you trying to delete? JasperReports Server does not allow users to delete files that are used by other resources (e.g. can not delete domain used by adhoc view).Check all dependencies between resources to make sure they are not being used. Unfortunately, such tools is not included with JasperReports Server :-) Link to comment Share on other sites More sharing options...
arlaudpierre Posted October 31, 2014 Author Share Posted October 31, 2014 So how can I check dependencies being used? Here's what I've done: I have two jasper servers. I created a report on my workspace and published it to my development server. I then published it to my production server. I modified the local report (added a subreport) and published it to dev server again. Now I can't publish it to production because I get the exception (it would override the report there and this seems not allowed). Thanks for you help :-) Link to comment Share on other sites More sharing options...
bob_8 Posted October 31, 2014 Share Posted October 31, 2014 This is just a guess but might be worth a few minutes... Try deleting the subreport first, then delete the main report. I don't know which version of Jasper you are using but, in my experience, Jasper has serious parent issues (!) when it comes to subreports.Good luck,Bob Link to comment Share on other sites More sharing options...
arlaudpierre Posted October 31, 2014 Author Share Posted October 31, 2014 Hello Bob, thank you for your answer but I'm afraid it's not exactly a problem of dependencies. As I said in @hozawa's comment, I added a subreport to a report and tried to publish this report again, and it failed because of the overriding. The remote report unit has only one jrxml file (and it should have 2 of them afterwards) and yet deleting it still fails :-/ Link to comment Share on other sites More sharing options...
hozawa Posted November 2, 2014 Share Posted November 2, 2014 Have you tried deleting the report from the web browser by logging in to your production JasperReports Server? Unfortunately, JasperReports Server does not contain tools to show dependencies between resource. I've actually created dependencies reports for our OEM commercial version based on JasperReports Server. 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