I'm not sure whether this is a Repository Tools or a DSpace issue. We have DSpace connected to Symplectic Elements via Repository Tools.
A new version of an existing item has been received, has been rejected and is now in the Unfinished Submissions section of the workspace. Attempting to delete it produces the stack trace show below. Deleting updates from the workspace is a common operation and has not been known to fail before. Examining the database shows that the original copy is mapped to a collection, which is a fairly uncommon situation in our DSpace instance. In the collection2item table, there is an entry for the update making it a member of the collection that the original is mapped into. The code for deleting items from the workspace does not attempt to remove items from collections, presumably because they should not be members of collections at this point. Is it possible that Repository Tools does not handle updates correctly when the original is mapped into collections? Is it safe to remove the entry for the update from the collection2item table and then delete the update? Thanks Steven Here's the stack trace ERROR: update or delete on table "item" violates foreign key constraint "coll2item_item_fk" on table "collection2item" Detail: Key (item_id)=(39576) is still referenced from table "collection2item". org.postgresql.util.PSQLException: ERROR: update or delete on table "item" violates foreign key constraint "coll2item_item_fk" on table "collection2item" Detail: Key (item_id)=(39576) is still referenced from table "collection2item". at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:334) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.dspace.storage.rdbms.DatabaseManager.updateQuery(DatabaseManager.java:417) at org.dspace.storage.rdbms.DatabaseManager.deleteByValue(DatabaseManager.java:568) at org.dspace.storage.rdbms.DatabaseManager.delete(DatabaseManager.java:532) at org.dspace.storage.rdbms.DatabaseManager.delete(DatabaseManager.java:756) at org.dspace.content.Item.delete(Item.java:2051) at org.dspace.content.WorkspaceItem.deleteAll(WorkspaceItem.java:594) at org.dspace.app.webui.servlet.MyDSpaceServlet.processRemoveItem(MyDSpaceServlet.java:316) at org.dspace.app.webui.servlet.MyDSpaceServlet.doDSPost(MyDSpaceServlet.java:99) at org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.java:115) at org.dspace.app.webui.servlet.DSpaceServlet.doPost(DSpaceServlet.java:73) at javax.servlet.http.HttpServlet.service(HttpServlet.java:646) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.dspace.app.webui.filter.RegisteredOnlyFilter.doFilter(RegisteredOnlyFilter.java:66) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.dspace.utils.servlet.DSpaceWebappServletFilter.doFilter(DSpaceWebappServletFilter.java:78) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:190) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2442) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2431) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:722) Steven Hayles Systems Analyst IT Services, University of Leicester, Prospect House, 94 Regent Rd, Leicester, LE1 7DA, UK t: +44 (0)116 229 7950 e: [email protected] w: www.le.ac.uk<http://www.le.ac.uk/> [cid:[email protected]] Follow us on Twitter<https://twitter.com/uniofleicester> or visit our Facebook<http://www.facebook.com/uniofleicester> page -- You received this message because you are subscribed to the Google Groups "DSpace Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/dspace-community. For more options, visit https://groups.google.com/d/optout.
