jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ard Schrijvers (JIRA)" <j...@apache.org>
Subject [jira] [Created] (JCR-3673) ChildAxisQuery#advance method results in IllegalArgumentException through #indexIsValid method
Date Mon, 30 Sep 2013 13:20:27 GMT
Ard Schrijvers created JCR-3673:
-----------------------------------

             Summary: ChildAxisQuery#advance method results in IllegalArgumentException through
#indexIsValid method
                 Key: JCR-3673
                 URL: https://issues.apache.org/jira/browse/JCR-3673
             Project: Jackrabbit Content Repository
          Issue Type: Bug
            Reporter: Ard Schrijvers
            Assignee: Ard Schrijvers
            Priority: Minor
             Fix For: 2.6.4


When ChildAxisQuery#advance is invoked, then the following while loop:

while (nextDoc > -1 && !indexIsValid(nextDoc)) {
      nextDoc();
}

easily results in stacktrace below. This is because nextDoc returns NO_MORE_DOCS (Integer.MAX_VALUE)
in case there are no hits any more, which results in IllegalArgumentException in indexIsValid

java.lang.IllegalArgumentException: docID must be >= 0 and < maxDoc=3
(got docID=2147483158)
at org.apache.lucene.index.SegmentReader.document(SegmentReader.java:490)
at org.apache.lucene.index.DirectoryReader.document(DirectoryReader.java:568)
at org.apache.lucene.index.FilterIndexReader.document(FilterIndexReader.java:186)
at org.apache.jackrabbit.core.query.lucene.CachingIndexReader.document(CachingIndexReader.java:291)
at org.apache.lucene.index.FilterIndexReader.document(FilterIndexReader.java:186)
at org.apache.lucene.index.FilterIndexReader.document(FilterIndexReader.java:186)
at org.apache.lucene.index.MultiReader.document(MultiReader.java:252)
at org.apache.lucene.index.FilterIndexReader.document(FilterIndexReader.java:186)
at org.apache.jackrabbit.core.query.lucene.ChildAxisQuery$ChildAxisScorer.indexIsValid(ChildAxisQuery.java:488)
at org.apache.jackrabbit.core.query.lucene.ChildAxisQuery$ChildAxisScorer.advance(ChildAxisQuery.java:433)



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message