jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobias Bocanegra" <tobias.bocane...@day.com>
Subject Re: setProperty ItemNotFoundException
Date Wed, 22 Feb 2006 09:32:02 GMT
hi carlos,
i would be good, if you could figure out some test-case or test-code
that reproduces the behaviour you've seen. if the itegrity of the
repository is corrupted, there must be a bug somewhere else. i don't
think covering the exception does any good to this :-)

regards, toby

On 2/22/06, Carlos Villegas <cav@uniscope.jp> wrote:
> Hi,
>
> I'm new to this list, and JIRA is very slow...
>
> I having a trouble in which sometimes Node.setProperty throws an
> ItemNotFoundException. It seems the node is corrupted, that property was
> set previously and something went wrong. Now it throws ItemNotFound. I
> try to trace the exception, and found that the id exists, so it seems
> the property is defined somewhere but it gives the error when it tries
> to retrieve the item state. So I tried to delete the node and recreate
> it but it gives me the same error, I can't delete it.
> Well, to make the deletion work, I did the following on
> NodeImpl.onRemove()
>
>
>        // remove properties
>        // use temp set to avoid ConcurrentModificationException
>        HashSet tmp = new HashSet(thisState.getPropertyNames());
>        for (Iterator iter = tmp.iterator(); iter.hasNext();) {
>            QName propName = (QName) iter.next();
>            // remove the property entry
>            thisState.removePropertyName(propName);
>            // remove property
>            PropertyId propId = new PropertyId(thisState.getNodeId(),
> propName);
>            try {
>                itemMgr.getItem(propId).setRemoved();
>            } catch (ItemNotFoundException ne) {
>                // ignore it!!!!?????
>            }
>        }
>
> Note the try/catch statement.
> This works, I can now delete the node and recreate it. But I don't know
> if this is correct or if it leaves garbage in the persistence storage.
> Also I don't know how the node got to that state. But I need to do some
> recovery.
>
> Any thoughts?
>
>
> Carlos
>


--
-----------------------------------------< tobias.bocanegra@day.com >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---

Mime
View raw message