jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vitali Fichtner <v.ficht...@googlemail.com>
Subject xpath jcr:contains NullPointerException
Date Tue, 03 Feb 2015 09:21:10 GMT
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

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