[ http://jira.dspace.org/jira/browse/DS-596?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claudia Jürgen updated DS-596: ------------------------------ Attachment: Community.java.patch Hi Tim, the deletion of a community is just a removal from its parent or a "raw" removal if it is a top level community. This differs from other container types where the content is first removed, so one works its way up from the bottom. Fix for 1.6.x not yet tested performance for large structures. Claudia > Cannot Delete Community which has two or more levels of SubCommunities > ---------------------------------------------------------------------- > > Key: DS-596 > URL: http://jira.dspace.org/jira/browse/DS-596 > Project: DSpace 1.x > Issue Type: Bug > Components: DSpace API > Affects Versions: 1.6.1 > Environment: Any > Reporter: Tim Donohue > Attachments: Community.java.patch > > > If you have a Community which has two or more levels of subcommunities, a > database error will be thrown when you attempt to delete it. > As an example, suppose you have the following hierarchy: > Community 1 > - Sub-Community 1.1 > - Sub-Sub-Community 1.1.1 > In that example, if you attempt to delete "Community 1", then you will end > up receiving a "PSQLException" similar to the following: > org.postgresql.util.PSQLException: ERROR: update or delete on table > "community" violates foreign key constraint "com2com_child_fk" on table > "community2community" > Detail: Key (community_id)=(SOME_ID) is still referenced from table > "community2community". > (Where "SOME_ID" will be the internal ID of the "Sub-Community 1.1) > Essentially, it looks like the Sub-Community 1.1 is unable to be deleted as > its ID is not removed from community2community. > You can see this error by logging in as an Admin and trying to delete the > following Top-Level Community on the Demo Server (it has both a sub-community > & a sub-sub-community): > http://demo.dspace.org/xmlui/handle/10673/203 > However, it's worth noting that Community deletion works fine if you only > have "Sub-Communities" and do not have an "Sub-Sub-Communities". > I haven't had a chance to figure out *why* this happens -- just wanted to > note that it is happening. > Here's a slightly larger Java stacktrace: > org.postgresql.util.PSQLException: ERROR: update or delete on table > "community" violates foreign key constraint "com2com_child_fk" on table > "community2community" > Detail: Key (community_id)=(42) is still referenced from table > "community2community". > at > org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1531) > at > org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1313) > at > org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188) > at > org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452) > at > org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:354) > at > org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:308) > at > org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102) > at > org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102) > at > org.dspace.storage.rdbms.DatabaseManager.updateQuery(DatabaseManager.java:460) > at > org.dspace.storage.rdbms.DatabaseManager.deleteByValue(DatabaseManager.java:605) > at > org.dspace.storage.rdbms.DatabaseManager.delete(DatabaseManager.java:572) > at > org.dspace.storage.rdbms.DatabaseManager.delete(DatabaseManager.java:807) > at org.dspace.content.Community.rawDelete(Community.java:1053) > at org.dspace.content.Community.removeSubcommunity(Community.java:954) > at org.dspace.content.Community.rawDelete(Community.java:1030) > at org.dspace.content.Community.delete(Community.java:1001) > at > org.dspace.app.xmlui.aspect.administrative.FlowContainerUtils.processDeleteCommunity(FlowContainerUtils.java:922) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > .... -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.dspace.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Dspace-devel mailing list Dspace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-devel