jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Haderka <jan.hade...@magnolia-cms.com>
Subject NPE from within node.getNodes()
Date Mon, 04 Feb 2013 08:43:05 GMT
Hi,

I get NPE during call to node.getNodes() in JackRabbit 2.4.3. Not sure what the cause is.


The failing line is:
        if (!data.getParentId().equals(parentId)) {

When error occurs, data.getParentId() return null. Could it be because item in data is transient?
Is this a bug in JackRabbit or should I not be allowed to iterate over transient items?

Thanks for any insight,

Jan


Stacktrace:
java.lang.NullPointerException
	at org.apache.jackrabbit.core.ItemManager.getNode(ItemManager.java:671)
	at org.apache.jackrabbit.core.ItemManager.getNode(ItemManager.java:647)
	at org.apache.jackrabbit.core.LazyItemIterator.prefetchNext(LazyItemIterator.java:120)
	at org.apache.jackrabbit.core.LazyItemIterator.<init>(LazyItemIterator.java:104)
	at org.apache.jackrabbit.core.ItemManager.getChildNodes(ItemManager.java:755)
	at org.apache.jackrabbit.core.NodeImpl$9.perform(NodeImpl.java:2175)
	at org.apache.jackrabbit.core.NodeImpl$9.perform(NodeImpl.java:2171)
	at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216)
	at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91)
	at org.apache.jackrabbit.core.NodeImpl.getNodes(NodeImpl.java:2171)

Extra info:
ItemManager (org.apache.jackrabbit.core.ItemManager@6bca3af1)
Items in cache:
Property:           3b76a3ce-76ef-4bbe-ae40-e24eb4354f75/{http://www.magnolia.info/jcr/mgnl}created
/page/otherPar/mgnl:created (3b76a3ce-76ef-4bbe-ae40-e24eb4354f75/{http://www.magnolia.info/jcr/mgnl}created)
Property:           b1aa30b9-d277-4186-80d2-6f84504ccaa6/{http://www.jcp.org/jcr/1.0}uuid
/page/jcr:uuid (b1aa30b9-d277-4186-80d2-6f84504ccaa6/{http://www.jcp.org/jcr/1.0}uuid)
Property:           b1aa30b9-d277-4186-80d2-6f84504ccaa6/{http://www.jcp.org/jcr/1.0}createdBy
/page/jcr:createdBy (b1aa30b9-d277-4186-80d2-6f84504ccaa6/{http://www.jcp.org/jcr/1.0}createdBy)
Property:           3b76a3ce-76ef-4bbe-ae40-e24eb4354f75/{http://www.jcp.org/jcr/1.0}uuid
/page/otherPar/jcr:uuid (3b76a3ce-76ef-4bbe-ae40-e24eb4354f75/{http://www.jcp.org/jcr/1.0}uuid)
Node: transient f739840b-3501-4011-a57e-28b5c0566b28	f739840b-3501-4011-a57e-28b5c0566b28
(f739840b-3501-4011-a57e-28b5c0566b28)
Property:           b1aa30b9-d277-4186-80d2-6f84504ccaa6/{http://www.jcp.org/jcr/1.0}mixinTypes
/page/jcr:mixinTypes (b1aa30b9-d277-4186-80d2-6f84504ccaa6/{http://www.jcp.org/jcr/1.0}mixinTypes)
Property:           3b76a3ce-76ef-4bbe-ae40-e24eb4354f75/{http://www.jcp.org/jcr/1.0}created
/page/otherPar/jcr:created (3b76a3ce-76ef-4bbe-ae40-e24eb4354f75/{http://www.jcp.org/jcr/1.0}created)
Property:           b1aa30b9-d277-4186-80d2-6f84504ccaa6/{http://www.jcp.org/jcr/1.0}created
/page/jcr:created (b1aa30b9-d277-4186-80d2-6f84504ccaa6/{http://www.jcp.org/jcr/1.0}created)
Property:           3b76a3ce-76ef-4bbe-ae40-e24eb4354f75/{http://www.jcp.org/jcr/1.0}mixinTypes
/page/otherPar/jcr:mixinTypes (3b76a3ce-76ef-4bbe-ae40-e24eb4354f75/{http://www.jcp.org/jcr/1.0}mixinTypes)
Property: transient b1aa30b9-d277-4186-80d2-6f84504ccaa6/{http://www.magnolia.info/jcr/mgnl}created
/page/mgnl:created (b1aa30b9-d277-4186-80d2-6f84504ccaa6/{http://www.magnolia.info/jcr/mgnl}created)
Node:           3b76a3ce-76ef-4bbe-ae40-e24eb4354f75	/page/otherPar (3b76a3ce-76ef-4bbe-ae40-e24eb4354f75)
Node: transient b1aa30b9-d277-4186-80d2-6f84504ccaa6	/page (b1aa30b9-d277-4186-80d2-6f84504ccaa6)
Property:           b1aa30b9-d277-4186-80d2-6f84504ccaa6/{http://www.jcp.org/jcr/1.0}primaryType
/page/jcr:primaryType (b1aa30b9-d277-4186-80d2-6f84504ccaa6/{http://www.jcp.org/jcr/1.0}primaryType)
Property: transient b1aa30b9-d277-4186-80d2-6f84504ccaa6/{http://www.magnolia.info/jcr/mgnl}lastModified
/page/mgnl:lastModified (b1aa30b9-d277-4186-80d2-6f84504ccaa6/{http://www.magnolia.info/jcr/mgnl}lastModified)
Property: transient b1aa30b9-d277-4186-80d2-6f84504ccaa6/{http://www.magnolia.info/jcr/mgnl}lastModifiedBy
/page/mgnl:lastModifiedBy (b1aa30b9-d277-4186-80d2-6f84504ccaa6/{http://www.magnolia.info/jcr/mgnl}lastModifiedBy)
Property:           3b76a3ce-76ef-4bbe-ae40-e24eb4354f75/{http://www.jcp.org/jcr/1.0}createdBy
/page/otherPar/jcr:createdBy (3b76a3ce-76ef-4bbe-ae40-e24eb4354f75/{http://www.jcp.org/jcr/1.0}createdBy)
Property:           3b76a3ce-76ef-4bbe-ae40-e24eb4354f75/{http://www.jcp.org/jcr/1.0}primaryType
/page/otherPar/jcr:primaryType (3b76a3ce-76ef-4bbe-ae40-e24eb4354f75/{http://www.jcp.org/jcr/1.0}primaryType)
Node:           cafebabe-cafe-babe-cafe-babecafebabe	/ (cafebabe-cafe-babe-cafe-babecafebabe)

ParentId:   b1aa30b9-d277-4186-80d2-6f84504ccaa6
data:          f739840b-3501-4011-a57e-28b5c0566b28





Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message