jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlos Villegas <...@uniscope.jp>
Subject setProperty ItemNotFoundException
Date Wed, 22 Feb 2006 09:26:09 GMT

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

        // 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
            // remove property
            PropertyId propId = new PropertyId(thisState.getNodeId(),
            try {
            } 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

Any thoughts?


View raw message