You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Bryan Pendleton <bp...@amberpoint.com> on 2007/12/01 00:24:58 UTC

Re: IndexOutOfBoundsException

> I really like derby.  My program siphons emails out of outlook and puts
> them into derby.  It has started failing with the message:
> 
> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

Thanks for using Derby!

Your program also fails for me. The exception stack trace that
I receive is:

performing dump.
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
         at java.util.ArrayList.RangeCheck(ArrayList.java:507)
         at java.util.ArrayList.get(ArrayList.java:324)
         at org.apache.derby.client.net.NetCursor.findExtdtaData(NetCursor.java:1047)
         at org.apache.derby.client.net.NetCursor.getClobColumn_(NetCursor.java:1120)
         at org.apache.derby.client.am.Cursor.getClob(Cursor.java:1187)
         at org.apache.derby.client.am.ResultSet.getClob(ResultSet.java:1257)
         at error.getLob(error.java:97)
         at error.dump_db(error.java:161)
         at error.main(error.java:172)

Line 1047 of NetCursor.java is the assignment to the "data" variable
in this code:

     protected byte[] findExtdtaData(int column) {
         byte[] data = null;

         // locate the EXTDTA bytes, if any
         Integer key = new Integer(column);

         if (extdtaPositions_.containsKey(key)) {
             //  found, get the data
             int extdtaQueuePosition = ((Integer) extdtaPositions_.get(key)).intValue();
             data = (byte[]) (extdtaData_.get(extdtaQueuePosition));
         }

         return data;
     }


This looks like a bug to me. I think you should open a JIRA
issue and attach your program as a test case.
See http://db.apache.org/derby/DerbyBugGuidelines.html
for more information about how to do this.

thanks,

bryan