You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Ard Schrijvers <a....@hippo.nl> on 2007/09/04 09:43:48 UTC

AIOOBE in ChildAxisScorer in jackrabbit trunk

Hello,

when running the same very simple test below in the JR trunk a few times (~5 times) I get an ArrayOutOfBoundsException in the ChildAxisQuery.ChildAxisScorer.indexIsValid(int i) on 

Document node = reader.document(i);

Did anybody have this before? The simple test is below. Running it a few times results randomly in ArrayOutOfBoundsException. Can somebody confirm it? I cannot reproduce it with 1.3.1 tag, so there it seems to be fine. 

Does anybody have an idea from the top of his head where the problem might have been introduced?

Regards Ard

public class SimpleQueryTest extends AbstractQueryTest {

    public void testIsNotNull() throws Exception {
        Node foo = testRootNode.addNode("foo");
        foo.setProperty("mytext", "the quick brown fox jumps over the lazy dog.");
        Node bar = testRootNode.addNode("bar");
        bar.setProperty("text", "the quick brown fox jumps over the lazy dog.");
        // documents which field name is not exactly "mytext" should not match (JCR-1051)
       
        testRootNode.save();

        String sql = "SELECT * FROM nt:unstructured WHERE jcr:path LIKE '"+testRoot+"/foo'";
        Query q = superuser.getWorkspace().getQueryManager().createQuery(sql, Query.SQL);
        QueryResult result = q.execute();
        checkResult(result, 1);

    }
}

Re: AIOOBE in ChildAxisScorer in jackrabbit trunk

Posted by Christoph Kiehl <ch...@sulu3000.de>.
Ard Schrijvers wrote:

> when running the same very simple test below in the JR trunk a few times (~5
> times) I get an ArrayOutOfBoundsException in the
> ChildAxisQuery.ChildAxisScorer.indexIsValid(int i) on
> 
> Document node = reader.document(i);
> 
> Did anybody have this before? The simple test is below. Running it a few
> times results randomly in ArrayOutOfBoundsException. Can somebody confirm it?
> I cannot reproduce it with 1.3.1 tag, so there it seems to be fine.
> 
> Does anybody have an idea from the top of his head where the problem might
> have been introduced?


I made some changes to the ChildAxisScorer while working on JCR-1041. 
Unfortunately I don't have the time right now to check if I introduced this bug. 
I'll try to have a look later this day. Feel free to check the affected revisions.

Cheers,
Christoph