jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexandru Popescu" <the.mindstorm.mailingl...@gmail.com>
Subject Re: IndexOutOfBoundsException in QueryImpl.execute
Date Fri, 19 May 2006 05:43:33 GMT
24 hours later....

I have tried to reproduce the failures on my Windows machine, but
believe it or not, I couldn't. Than trying to understand why this is
happening only on my colleague machine (Linux) and not on my machine
we have discovered than another dependency of our project is including
directly in their jar a Lucene version. Checking with the creators, we
have found our that there was a mismatch between Lucene 1.4.3 required
by Jackrabbit and the one included (silently) by this 3rd party tool.

Making the story shorter, after we removed this "custom" Lucene
version from the 3rd party jars, we have no longer see the problem
(now there are almost  18 hours from that point).

I will keep an wide-open eye on this. Jukka I appreciate very much
your help. Thanks again.

./alex
--
.w( the_mindstorm )p.


On 5/18/06, Jukka Zitting <jukka.zitting@gmail.com> wrote:
> Hi,
>
> On 5/18/06, Alexandru Popescu <the.mindstorm.mailinglist@gmail.com> wrote:
> > Unfortunately there is no attachment :-)
>
> It must have gotten lost along the way. Here's the
> ConcurrentQueryTest.java file inline:
>
> ----------
> import java.io.*;
> import java.util.*;
> import javax.jcr.*;
> import javax.jcr.query.*;
> import org.apache.jackrabbit.core.TestRepository;
> import junit.framework.TestCase;
>
> public class ConcurrentQueryTest extends TestCase {
>
>     private class QueryRunner implements Runnable {
>
>         private final Session session;
>
>         public QueryRunner(Session session) {
>             this.session = session;
>         }
>
>         public void run() {
>             try {
>                 for (int i = 0; i < 1000; i++) {
>                     QueryManager manager =
>                         session.getWorkspace().getQueryManager();
>                     Query query = manager.createQuery(
>                         "//*[jcr:contains(.,'void')]", Query.XPATH);
>                     query.execute().getNodes();
>                 }
>             } catch (Exception e) {
>                 exception = e;
>             } finally {
>                 session.logout();
>             }
>         }
>
>     }
>
>     private Exception exception;
>
>     private Session session;
>
>     private Thread a;
>
>     private Thread b;
>
>     protected void setUp() throws Exception {
>         Repository repository = TestRepository.getInstance();
>         session = repository.login();
>         Node n = session.getRootNode().addNode("test");
>         for (int i = 0; i < 1000; i++) {
>             Node f = n.addNode("node" + i, "nt:file");
>             Node r = f.addNode("jcr:content", "nt:resource");
>             r.setProperty("jcr:mimeType", "text/plain");
>             r.setProperty("jcr:lastModified", Calendar.getInstance());
>             InputStream is = new FileInputStream("ConcurrentQueryTest.java");
>             try {
>                 r.setProperty("jcr:data", is);
>             } finally {
>                 is.close();
>             }
>         }
>         session.save();
>
>         exception = null;
>         a = new Thread(new QueryRunner(repository.login()));
>         b = new Thread(new QueryRunner(repository.login()));
>     }
>
>     protected void tearDown() throws Exception {
>         session.getItem("/test").remove();
>         session.save();
>         session.logout();
>     }
>
>     public void testConcurrentQuery() throws Exception {
>         a.start();
>         b.start();
>         a.join();
>         b.join();
>         if (exception != null) {
>             fail("Got exception: " + exception.getMessage());
>         }
>     }
>
> }
> ----------
>
> BR,
>
> Jukka Zitting
>
> --
> Yukatan - http://yukatan.fi/ - info@yukatan.fi
> Software craftsmanship, JCR consulting, and Java development
>

Mime
View raw message