You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by bu...@apache.org on 2004/08/17 18:34:45 UTC

DO NOT REPLY [Bug 30538] - Deleting of non-empty-collections does not work

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30538>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30538

Deleting of non-empty-collections does not work

b.eicki@gmx.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|Critical                    |Major
            Summary|SymbolTables get lost       |Deleting of non-empty-
                   |sometimes                   |collections does not work



------- Additional Comments From b.eicki@gmx.net  2004-08-17 16:34 -------
After hours of investigation I found a reason. The following happened:
At first my system tries to delete some collection 'name' (which is not empty 
and may have subcollections) within a collection 'path' by 

col = org.xmldb.api.DatabaseManager.getCollection(m_dbURL + path);
CollectionManagementService service = (CollectionManagementService) 
col.getService("CollectionManagementService", "1.0");
service.removeCollection(name);

After that I want to import the same collection, resources again, but before I 
do this I check if these files exist by checking if

org.xmldb.api.DatabaseManager.getCollection(m_dbURL + path).getResource(id) != 
null

This returns true for the resources within my collection I thought I had 
deleted, resulting in the situation that the collection is created again 
(containing the old documents, which somehow have not been deleted completely), 
but the SymbolTable is empty, which then leads to NullPointerExceptions if 
accessing these documents.

To make this even more confusing this seems only to happen if I reload my 
webapplication (XIndice is running embeded under Tomcat 5) before I start 
deleting the collection. If I restart the whole Tomcat server this does not 
happen. 

A workaround I found out is now to recursively delete all subcollections and 
resources within the collection first and then removing the empty collection.

Bjoern Eickvonder