db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Noll <dan...@nuix.com>
Subject IndexOutOfBoundsException from client driver during getBlob
Date Tue, 04 Nov 2008 00:18:37 GMT
Hi all.

Has anyone seen an exception similar to the following, coming from a 
call to getBlob()?

> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>         at java.util.ArrayList.RangeCheck(ArrayList.java:547)
>         at java.util.ArrayList.get(ArrayList.java:322)
>         at org.apache.derby.client.net.NetCursor.findExtdtaData(Unknown Source)
>         at org.apache.derby.client.net.NetCursor.getBlobColumn_(Unknown Source)
>         at org.apache.derby.client.am.Cursor.getBlob(Unknown Source)
>         at org.apache.derby.client.am.ResultSet.getBlob(Unknown Source)
>         at org.apache.derby.client.am.ResultSet.getBlob(Unknown Source)

This is happening on -- the issue is transient so even if we 
update go we have no way to know if it has fixed the issue. 
But I have looked through the list of fixes for and nothing 
similar appears to be in it.

The code triggering the error is relatively simple (after removing 
resource closing...)

   UUID uuid;
   // ...

   PreparedStatement ps = connection.prepareStatement(
     "SELECT data FROM binaries WHERE guidhigh = ? AND guid = ?");
   ps.setLong(1, uuid.getMostSignificantBits());
   ps.setLong(2, uuid.getLeastSignificantBits());
   rs = ps.executeQuery();
   if (rs.next()) {
     Blob blob = rs.getBlob("data");

     // Take slice of blob

In the mail archives there is a post from someone getting a similar 
issue but for CLOBs.  A response asked them to raise a bug for it but I 
can't find a bug along these lines.


Daniel Noll                            Forensic and eDiscovery Software
Senior Developer                              The world's most advanced
Nuix                                                email data analysis
http://nuix.com/                                and eDiscovery software

View raw message