if (address == 0) { Thread.dumpStack(); LOG.debug("node " + node.gid + " not found"); }
	protected long findValue(Object lock, NodeProxy node)		throws IOException, BTreeException {		final DocumentImpl doc = (DocumentImpl) node.getDoc();		final NativeBroker.NodeRef nodeRef =			new NativeBroker.NodeRef(doc.getDocId(), node.getGID());		// first try to find the node in the index		final long p = findValue(nodeRef);		if(p == KEY_NOT_FOUND) {			//LOG.debug("node " + node.gid + " not found, trying parent.");			// node not found in index: try to find the nearest available			// ancestor and traverse it			long id = node.getGID();			long parentPointer = -1;			while (parentPointer < 0) {				if (id < 1)					throw new BTreeException(						"node " + node.gid + " not found.");				id = XMLUtil.getParentId(doc, id);				NativeBroker.NodeRef parentRef =					new NativeBroker.NodeRef(doc.getDocId(), id);				try {					parentPointer = findValue(parentRef);				} catch (BTreeException bte) {				}			}			final long firstChildId = XMLUtil.getFirstChildId(doc, id);			final Iterator iter =				new NodeIterator(lock, this, node.doc, parentPointer);			final NodeImpl n = (NodeImpl) iter.next();			n.setGID(id);			final long address = findNode(n, node.gid, iter);			return address == 0 ? -1 : address;		} else			return p;	}