jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Reschke <julian.resc...@gmx.de>
Subject SPI: ItemInfo.getParentId()
Date Thu, 02 Nov 2006 14:43:16 GMT
Hi,

here's a question on ItemInfo.getParentId().

In my store, all version histories live directly below 
/jcr:system/jcr:versionStorage. However, getNodeIds() will not return 
any children. As far as I understand, that is legal in JCR (versioning 
nodes are exposed below jcr:versionStorage, but you can't navigate to them).

With this setup, I'm getting an NPE (see below), as the code seems to 
rely on the assumption that if getParentId() returns something != null, 
the item will show up in the child node list of the parent.

I can workaround this by return null in this special case for now, but 
I'd really like to clarify

- whether the setup itself is ok, and

- what getParentId() is supposed to return in this case...

Best regards, Julian



====
	at 
org.apache.jackrabbit.jcr2spi.state.WorkspaceItemStateFactory.createNodeState(WorkspaceItemStateFactory.java:99)
	at 
org.apache.jackrabbit.jcr2spi.state.CachingItemStateManager.resolve(CachingItemStateManager.java:168)
	at 
org.apache.jackrabbit.jcr2spi.state.CachingItemStateManager.getItemState(CachingItemStateManager.java:94)
	at 
org.apache.jackrabbit.jcr2spi.WorkspaceManager.getItemState(WorkspaceManager.java:328)
	at 
org.apache.jackrabbit.jcr2spi.state.TransientISFactory.createNodeState(TransientISFactory.java:120)
	at 
org.apache.jackrabbit.jcr2spi.state.CachingItemStateManager.resolve(CachingItemStateManager.java:168)
	at 
org.apache.jackrabbit.jcr2spi.state.CachingItemStateManager.getItemState(CachingItemStateManager.java:94)
	at 
org.apache.jackrabbit.jcr2spi.state.TransientItemStateManager.getItemState(TransientItemStateManager.java:209)
	at 
org.apache.jackrabbit.jcr2spi.state.SessionItemStateManager.getItemState(SessionItemStateManager.java:155)
	at 
org.apache.jackrabbit.jcr2spi.SessionImpl.getNodeById(SessionImpl.java:271)
	at 
org.apache.jackrabbit.jcr2spi.SessionImpl.getNodeByUUID(SessionImpl.java:239)


Mime
View raw message