Hi Tim and Marcelo, For what it's worth, I have experienced similar errors from time-to-time when trying to delete either items or collections.
See this screenshot, which was an attempt to delete a collection from our sandbox environment. https://drive.google.com/file/d/1wLCqUnVy3EpJLVksK_RzS6Le6FJiVD10/view?usp=sharing Note that I've experienced these errors since the completion of an April 2018 upgrade from DSpace 3.X JSPUI to DSpace 5.X XMLUI. (We use Atmire's hosted Open Repository services, so when I run into these issues I submit a ticket to Atmire, if the error prevents me from doing something that I need to do, and then they resolve the issue.) I'm not a technical developer, so I don't know if these issues are similar - but I wanted to chime in since I've seen a similar-looking error in our repository. Note that this error, at least for me, occurred with a single collection or single item that is not mapped into multiple collections. Sincerely, Kimberly at the University of Arizona Libraries On Wed, Sep 12, 2018 at 7:02 AM Tim Donohue <[email protected]> wrote: > Hi Marcelo, > > I'm not sure I understand completely how this error occurred. However, > the error is noting that there's an issue with the *data* within that > database (so I'm not surprised that it doesn't occur on another database). > > The error is essentially saying that the Item with item_id=2 cannot be > deleted because it is still "linked" with a Collection (in the > collection2item table). Maybe this item is "mapped" or "linked" to > multiple collections? You also could lookup the item with that ID and see > if you can delete it directly (I'm not sure whether you are using the XMLUI > or JSPUI, but both provide administrative options to lookup an Item by its > internal ID). > > Not sure if this will be of help. But, if you require more support, feel > free to respond on this mailing list so that we can better understand the > issue. > > Tim > > On Tue, Sep 11, 2018 at 9:44 AM Marcelo Caceres < > [email protected]> wrote: > >> We can't reproduce this error in a testing server. >> >> El martes, 11 de septiembre de 2018, 10:26:45 (UTC-4), Marcelo Caceres >> escribió: >>> >>> When delete a collection to load data again generates >>> >>> The batch import you initiated from the DSpace UI was not completed, due >>> to the following reason: >>> 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)=(2) 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:441) >>> at >>> org.dspace.storage.rdbms.DatabaseManager.deleteByValue(DatabaseManager.java:612) >>> at >>> org.dspace.storage.rdbms.DatabaseManager.delete(DatabaseManager.java:571) >>> at >>> org.dspace.storage.rdbms.DatabaseManager.delete(DatabaseManager.java:796) >>> at org.dspace.content.Item.delete(Item.java:1308) >>> at >>> org.dspace.content.WorkspaceItem.deleteAll(WorkspaceItem.java:594) >>> at >>> org.dspace.app.itemimport.ItemImport.addItem(ItemImport.java:918) >>> at >>> org.dspace.app.itemimport.ItemImport.addItems(ItemImport.java:736) >>> at >>> org.dspace.app.itemimport.ItemImport$3.run(ItemImport.java:2253) >>> >>> Configuration used is >>> DSpace 5.2 >>> postgresql-9.3.6-2-linux-x64 >>> apache-tomcat-7.0.50 >>> apache-maven-3.0.5 >>> apache-ant-1.9.3 >>> >>> All the solutions writed are about migrations from version 1.6 or 1.7. >>> >>> Someone tell me about a solution in DSpace 5? >>> >>> -- >> All messages to this mailing list should adhere to the DuraSpace Code of >> Conduct: https://duraspace.org/about/policies/code-of-conduct/ >> --- >> 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. >> > -- > Tim Donohue > Technical Lead for DSpace & DSpaceDirect > DuraSpace.org | DSpace.org | DSpaceDirect.org > > -- > All messages to this mailing list should adhere to the DuraSpace Code of > Conduct: https://duraspace.org/about/policies/code-of-conduct/ > --- > 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. > -- All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/ --- 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.
