jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Miklos Pocsaji <miklos.pocs...@gmail.com>
Subject Strange error
Date Tue, 05 Jul 2005 09:16:44 GMT

I get a NoSuchElementException running the following code

QueryResult result = QueryHelper.query(session, qstr.toString(), "xpath");
NodeIterator ni = result.getNodes();
while (ni.hasNext())
      Node newsitem = ni.nextNode(); // ***
      // ...

The row marked with *** throws the following:

        at org.apache.jackrabbit.core.query.lucene.NodeIteratorImpl.nextNodeImpl(NodeIteratorImpl.java:164)
        at org.apache.jackrabbit.core.query.lucene.NodeIteratorImpl.nextNode(NodeIteratorImpl.java:72)
        at com.clarmont.cms.jcr.beans.NewsManagerBean.listNews(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)

Seems like the index is not coherent with the data stored. I am really
confused by this error, any ideas?
(Is it possible that unclosed sessions cause this error?)

Thank you in advance:
Miklos Pocsaji

View raw message