Re: [Dspace-tech] Delete item/collection/communities
DSpace 3.0 allow customize which browse engine is utilized. I use now SOLR Browse Engine(browseCreateDAO.class = org.dspace.browse.SolrBrowseCreateDAO). This class not add/remove any row in communities2item table. When I add an item no new row are add in the communities2item table. Above I used browseCreateDAO.class = org.dspace.browse.BrowseCreateDAOPostgres when I add an item, a new row are add in the communities2item table each item. When I attempt to erase an item add with the old configuration browseCreateDAO.class = org.dspace.browse.BrowseCreateDAOPostgres since the new configuration browseCreateDAO.class = org.dspace.browse.SolrBrowseCreateDAO no row are deleted from communities2item and an error ocurr Excepción: org.postgresql.util.PSQLException: ERROR: update o delete en «item» viola la llave foránea «communities2item_item_id_fkey» en la tabla «communities2item» Detail: La llave (item_id)=(1984) todavía es referida desde la tabla «communities2item». * Gustavo Perosillo Herrera STIC- Universidad de Valladolid Telefono: 983423418 e-mail: gustavo.perosi...@uva.es * -Mensaje original- De: ivan.ma...@gmail.com [mailto:ivan.ma...@gmail.com] En nombre de helix84 Enviado el: viernes, 26 de julio de 2013 14:12 Para: Gustavo CC: dspace-tech@lists.sourceforge.net Asunto: Re: [Dspace-tech] Delete item/collection/communities Hi Gustavo, the item is probably an unfinished submission. Check your list of pending submissions. If that doesn't help, you can do DELETE FROM communities2item WHERE item_id=1984; and then try again deleting the item. Regards, ~~helix84 Compulsory reading: DSpace Mailing List Etiquette https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette On Fri, Jul 26, 2013 at 11:15 AM, Gustavo gustavo.perosi...@uva.es wrote: I have update to Dspace 3.1 and when I try to delete an item, collection o communitie, it show the message: Excepción: org.postgresql.util.PSQLException: ERROR: update o delete en «item» viola la llave foránea «communities2item_item_id_fkey» en la tabla «communities2item» Detail: La llave (item_id)=(1984) todavía es referida desde la tabla «communities2item». at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExe cutorI mpl.java:2103) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorI mpl.ja va:1836) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2State ment.j ava:512) * Gustavo Perosillo Herrera STIC- Universidad de Valladolid Telefono: 983423418 e-mail: gustavo.perosi...@uva.es * -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.c lktrk ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- Get your SQL database under version control now! Version control is standard for application code, but databases havent caught up. So what steps can you take to put your SQL databases under version control? Why should you start doing it? Read more to find out. http://pubads.g.doubleclick.net/gampad/clk?id=49501711iu=/4140/ostg.clktrk ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] Delete item/collection/communities
Hi Gustavo, have you run the index-init script as part of you upgrade process *after* to have changed the Browse implementation? The org.dspace.browse.SolrBrowseCreateDAO https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/browse/SolrBrowseCreateDAO.java#L404 delegate to the DBMS browse implementation the drop of any old tables/views that could be created before for the browse using the DBMS implementation. Looking to the code it seems that I have missed to delegate the operation for the deleteCommunityMappings (but not sure that it is really needed) https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/browse/SolrBrowseCreateDAO.java#L362 that looks as possible source for your issue. If you switch back to the SOLR implementation you can just delete all the rows in the communities2item table and you should not have any more issues deleting items as the SOLR implementation never write in this table. I will appreciate too if you can check if delegating the operation for the method deleteCommunityMappings i.e. @Override public void deleteCommunityMappings(int itemID) throws BrowseException { dbCreateDAO.deleteCommunityMappings(itemID); } solve your problem running the index-init script. Please report also this issue as a JIRA bug Thanks, Andrea Il 31/07/2013 11:28, Gustavo ha scritto: DSpace 3.0 allow customize which browse engine is utilized. I use now SOLR Browse Engine(browseCreateDAO.class = org.dspace.browse.SolrBrowseCreateDAO). This class not add/remove any row in communities2item table. When I add an item no new row are add in the communities2item table. Above I used browseCreateDAO.class = org.dspace.browse.BrowseCreateDAOPostgres when I add an item, a new row are add in the communities2item table each item. When I attempt to erase an item add with the old configuration browseCreateDAO.class = org.dspace.browse.BrowseCreateDAOPostgres since the new configuration browseCreateDAO.class = org.dspace.browse.SolrBrowseCreateDAO no row are deleted from communities2item and an error ocurr Excepción: org.postgresql.util.PSQLException: ERROR: update o delete en «item» viola la llave foránea «communities2item_item_id_fkey» en la tabla «communities2item» Detail: La llave (item_id)=(1984) todavía es referida desde la tabla «communities2item». * Gustavo Perosillo Herrera STIC- Universidad de Valladolid Telefono: 983423418 e-mail: gustavo.perosi...@uva.es * -Mensaje original- De: ivan.ma...@gmail.com [mailto:ivan.ma...@gmail.com] En nombre de helix84 Enviado el: viernes, 26 de julio de 2013 14:12 Para: Gustavo CC: dspace-tech@lists.sourceforge.net Asunto: Re: [Dspace-tech] Delete item/collection/communities Hi Gustavo, the item is probably an unfinished submission. Check your list of pending submissions. If that doesn't help, you can do DELETE FROM communities2item WHERE item_id=1984; and then try again deleting the item. Regards, ~~helix84 Compulsory reading: DSpace Mailing List Etiquette https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette On Fri, Jul 26, 2013 at 11:15 AM, Gustavo gustavo.perosi...@uva.es wrote: I have update to Dspace 3.1 and when I try to delete an item, collection o communitie, it show the message: Excepción: org.postgresql.util.PSQLException: ERROR: update o delete en «item» viola la llave foránea «communities2item_item_id_fkey» en la tabla «communities2item» Detail: La llave (item_id)=(1984) todavía es referida desde la tabla «communities2item». at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExe cutorI mpl.java:2103) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorI mpl.ja va:1836) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2State ment.j ava:512) * Gustavo Perosillo Herrera STIC- Universidad de Valladolid Telefono: 983423418 e-mail: gustavo.perosi...@uva.es * -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.c lktrk ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- Get your SQL database under version control now! Version control is standard
Re: [Dspace-tech] Delete item/collection/communities
Hi, I tried to give generic advice regarding the SQL constraint, but Andrea (in CC) wrote the SolrBrowseCreateDAO, so he will probably know the particular implementation details. Regards, ~~helix84 Compulsory reading: DSpace Mailing List Etiquette https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- Get your SQL database under version control now! Version control is standard for application code, but databases havent caught up. So what steps can you take to put your SQL databases under version control? Why should you start doing it? Read more to find out. http://pubads.g.doubleclick.net/gampad/clk?id=49501711iu=/4140/ostg.clktrk ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
[Dspace-tech] Delete item/collection/communities
I have update to Dspace 3.1 and when I try to delete an item, collection o communitie, it show the message: Excepción: org.postgresql.util.PSQLException: ERROR: update o delete en «item» viola la llave foránea «communities2item_item_id_fkey» en la tabla «communities2item» Detail: La llave (item_id)=(1984) todavía es referida desde la tabla «communities2item». at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorI mpl.java:2103) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.ja va:1836) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.j ava:512) * Gustavo Perosillo Herrera STIC- Universidad de Valladolid Telefono: 983423418 e-mail: gustavo.perosi...@uva.es * -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette