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] [Commented] (JCR-3673) ChildAxisQuery#advance method results in IllegalArgumentException through #indexIsValid method
Date Mon, 30 Sep 2013 13:52:24 GMT

    [ https://issues.apache.org/jira/browse/JCR-3673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13781815#comment-13781815
] 

Ard Schrijvers commented on JCR-3673:
-------------------------------------

fixed in r1527567 and r1527568

> 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, 2.7.2
>
>
> 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