Receiving NodeNotFoundInParentException when querying my repository.
zeiglerm Jul 25, 2017 11:47 AMI have a scheduled job that runs overnight that cleans up deleted or abandoned documents from my repository. My job is failing on a particular document. Here is the stack trace I am finding in my logs:
Caused by: org.modeshape.jcr.cache.NodeNotFoundInParentException: Cannot locate child node: 48f11047505d64370407e3-89d2-4ce7-a984-7dd496729aeb within parent: 48f11047505d6471cc18fc-748b-4514-ab4c-d323f3f494a2
at org.modeshape.jcr.cache.document.LazyCachedNode.parentReferenceToSelf(LazyCachedNode.java:247)
at org.modeshape.jcr.cache.document.LazyCachedNode.getSegment(LazyCachedNode.java:284)
at org.modeshape.jcr.cache.document.LazyCachedNode.getPath(LazyCachedNode.java:293)
at org.modeshape.jcr.JcrQueryManager$SessionQueryContext.getPath(JcrQueryManager.java:333)
at org.modeshape.jcr.JcrQueryManager$SessionQueryContext.canRead(JcrQueryManager.java:305)
at org.modeshape.jcr.query.engine.process.SecureSequence$1.isCurrentRowValid(SecureSequence.java:51)
at org.modeshape.jcr.query.NodeSequence$23.findNext(NodeSequence.java:1866)
at org.modeshape.jcr.query.NodeSequence$23.hasNext(NodeSequence.java:1849)
at org.modeshape.jcr.query.NodeSequence$SingleWidthBatch.<init>(NodeSequence.java:1920)
at org.modeshape.jcr.query.NodeSequence.copy(NodeSequence.java:1907)
at org.modeshape.jcr.query.engine.process.RestartableSequence.loadBatch(RestartableSequence.java:213)
at org.modeshape.jcr.query.engine.process.RestartableSequence$1.nextBatch(RestartableSequence.java:92)
at org.modeshape.jcr.query.engine.process.RestartableSequence.nextBatch(RestartableSequence.java:119)
at org.modeshape.jcr.query.JcrQueryResult$QueryResultIterator.findNextBatch(JcrQueryResult.java:257)
at org.modeshape.jcr.query.JcrQueryResult$QueryResultIterator.hasNext(JcrQueryResult.java:241)
I believe this is causing other jobs to hang. It appears my repository is corrupt at this document node. I need to get this document out of my repository. I no longer need the data, i just need to remove it. How can I get this node deleted?
I am running on a SQLServer database. I am using ModeShape 4.4.0.Final and Infinispan 7.2.3.Final.