Unable to delete community on DSpace UI

645 views
Skip to first unread message

Lewatle Johannes Phaladi

unread,
Mar 31, 2016, 9:27:37 AM3/31/16
to DSpace Technical Support
Hi All,

I have created new community, sub-community and collection on DSPace then moved items into new collection, at the moment I want to delete the old community but I am getting the following error when deleting old community :

org.postgresql.util.PSQLException: ERROR: update or delete on table "community" violates foreign key constraint "communities2item_community_id_fkey" on table "communities2item"
Detail: Key (community_id)=(65) is still referenced from table "communities2item".

please advise on how to delete one community using command line
the community has the following identifier 10539/8384

Regards,
Lewatle

Tim Donohue

unread,
Apr 1, 2016, 10:49:02 AM4/1/16
to dspac...@googlegroups.com
Hi Lewatle,

It sounds like you are hitting a form of this error:
https://jira.duraspace.org/browse/DS-2578

If you are using Discovery in DSpace 5.x, the "communities2item" table is actually no longer needed. It can be safely removed, as it is an artifact of the old RDBMS browse system (which has been replaced by Discovery).

In the upcoming DSpace 6 release, this table will be automatically removed (if it still exists), as the RDBMS browse system has been fully removed from the 6.x codebase.

- Tim
--
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To post to this group, send email to dspac...@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

-- 
Tim Donohue
Technical Lead for DSpace & DSpaceDirect
DuraSpace.org | DSpace.org | DSpaceDirect.org

Lewatle Johannes Phaladi

unread,
Apr 4, 2016, 3:31:12 AM4/4/16
to DSpace Technical Support
Dear Tim,

Thanks for the reply I am using DSpace 4.3 and also using Discovery module, I will delete the table as indicated on the link you have sent hoping the delition wont affect DSpace software.

Regards,
Lewatle  

Lewatle Johannes Phaladi

unread,
Apr 5, 2016, 4:50:18 AM4/5/16
to DSpace Technical Support
Hi Tim, 

I have followed your instructions and managed to delete 2 of 3 communities the last community it still give me same error message. Is there anyway to delete community directly from community table using SQL like i have deleted all contents of communities2item table.

Regards,
Lewatle 


On Friday, 1 April 2016 16:49:02 UTC+2, Tim Donohue wrote:

Lewatle Johannes Phaladi

unread,
Apr 5, 2016, 5:15:46 AM4/5/16
to DSpace Technical Support
Hi Tim and Dspace Team, 

I am getting the following error message now it is complaining about bi_2_dmap table   :

org.postgresql.util.PSQLException: ERROR: update or delete on table "item" violates foreign key constraint "bi_2_dmap_item_id_fkey" on table "bi_2_dmap"
Detail: Key (item_id)=(12510) is still referenced from table "bi_2_dmap".

Regards,
Lewatle

On Friday, 1 April 2016 16:49:02 UTC+2, Tim Donohue wrote:

Tim Donohue

unread,
Apr 5, 2016, 9:20:26 AM4/5/16
to dspac...@googlegroups.com
Hi Lewatle,

That's another related issue with the old RDBMS browse system. See this ticket:
https://jira.duraspace.org/browse/DS-2145

It can be corrected by running the following:

[dspace]/bin/dspace index-db-browse -f -d

That command will remove all old DB browse tables (which start with "bi_*") from your database. They are no longer needed if you are running Discovery.

We've again fixed this bug in the upcoming 6.x release.

- Tim

Lewatle Johannes Phaladi

unread,
Apr 6, 2016, 9:21:43 AM4/6/16
to DSpace Technical Support
Dear Tim,

Thank you very much for prompt response, I will feed back after running the command and yes looking forward too for version 6.

Regards,
Lewatle 

Lewatle Johannes Phaladi

unread,
Apr 6, 2016, 9:24:36 AM4/6/16
to DSpace Technical Support
Hi Tim,

Hoping it doesnt require Tomcat restart afterwards : [dspace]/bin/dspace index-db-browse -f -d !

Regards,
Lewatle 
Reply all
Reply to author
Forward
0 new messages