You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Vitali Fichtner <v....@googlemail.com> on 2015/02/03 10:21:10 UTC

xpath jcr:contains NullPointerException

Hello,

i´m using jackrabbit 2.8.0. I´m trying to make a free text search on
node properties.

Here is my example:

/jcr:root/a/b/*[jcr:contains(.,'foo')]/*/*/jcr:content[tags='tagA']

This query finds me all files (nodes) with the tag "tagA" and the term "foo"
in the parent node. This works quite good if the term "foo" is available,
if it is not present it crashes and I get the following
NullPointerException:

....

at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException
at
org.apache.jackrabbit.core.query.lucene.ChildAxisQuery$ChildAxisScorer.calculateChildren(ChildAxisQuery.java:450)
at
org.apache.jackrabbit.core.query.lucene.ChildAxisQuery$ChildAxisScorer.nextDoc(ChildAxisQuery.java:396)
at org.apache.lucene.search.Scorer.score(Scorer.java:89)
at
org.apache.jackrabbit.core.query.lucene.ChildAxisQuery$ChildAxisScorer.calculateChildren(ChildAxisQuery.java:450)
at
org.apache.jackrabbit.core.query.lucene.ChildAxisQuery$ChildAxisScorer.nextDoc(ChildAxisQuery.java:396)
at org.apache.lucene.search.Scorer.score(Scorer.java:89)
....


Do you have any idea, how to fix it?  Is my xpath query wrong?

Thanks!

Vitali