jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Koci <Martin.K...@aura.cz>
Subject Strange exception: javax.jcr.ItemNotFoundException: d1a479a0-b822-43a3-8181-9380635fb02a
Date Mon, 19 Jun 2006 10:00:51 GMT
Hello, 

I'm adding recursively nodes, but this leads to exception occasionally:
javax.jcr.ItemNotFoundException: d1a479a0-b822-43a3-8181-9380635fb02a
	at
org.apache.jackrabbit.core.ItemManager.createItemInstance(ItemManager.java:464)
	at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:320)
	at
org.apache.jackrabbit.core.NodeImpl.internalAddChildNode(NodeImpl.java:794)
	at
org.apache.jackrabbit.core.NodeImpl.internalAddNode(NodeImpl.java:738)
	at
org.apache.jackrabbit.core.NodeImpl.internalAddNode(NodeImpl.java:685)
	at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1772)
	at
cz.aura.cms.preferences.impl.PreferencesServiceImpl.addRecursively(PreferencesServiceImpl.java:195)


My code is:
for (int i = 0; i < nodeNames.length; i++) {
	    relPath = nodeNames[i];
                if (workNode.hasNode(relPath) == false) {
                    Node node = workNode.addNode(relPath);
                    workNode = node;
                } else {
                    workNode = workNode.getNode(relPath);
                }
}

Unfortunately this behaviour is not reproducible with test and come on
accidentally.

Thanks,

Martin



Mime
View raw message