Can you make a test?

On Wed, Jun 29, 2011 at 2:35 AM, Patrick Bosek <> wrote:
Update: I've looked at the code that this point to...

int prevNr = prevNodeInLevel[level];    // TODO: remove potential ArrayIndexOutOfBoundsException
        if (prevNr > -1)
  [prevNr] = nodeNr;[nodeNr] = prevNodeInLevel[level - 1];
        prevNodeInLevel[level] = nodeNr;
        return nodeNr;

HA! Looks like I found that potential problem. How do I remove it?



On Tue, Jun 28, 2011 at 5:33 PM, Patrick Bosek <> wrote:
Hi Everyone,

I'm getting an error when I try to return a document stored in my database through one of my java functions. I can access this document through eXist and the admin console with out a problem, but when I try to return it from my java module (as a NodeProxy) I end up with this error. Also if I simply System.out.print() the NodeProxy it returns me the right path and documentElement. Any suggestions?

I'm on 1.4.x

2011-06-28 17:28:22,548 [P1-8] ERROR ( [process]:438) - -1
java.lang.ArrayIndexOutOfBoundsException: -1
    at org.exist.memtree.MemTreeBuilder.startElement(
    at org.exist.memtree.DocumentBuilderReceiver.startElement(

Dmitriy Shabanov