Can you make a test?

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

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

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


Thanks,

Patrick


On Tue, Jun 28, 2011 at 5:33 PM, Patrick Bosek <patrick.bosek@jorsek.com> 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 (XQueryServlet.java [process]:438) - -1
java.lang.ArrayIndexOutOfBoundsException: -1
    at org.exist.memtree.MemTreeBuilder.startElement(MemTreeBuilder.java:146)
    at org.exist.memtree.DocumentBuilderReceiver.startElement(DocumentBuilderReceiver.java:139)

--
Dmitriy Shabanov