db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Waagan <Kristian.Waa...@Sun.COM>
Subject Re: IndexOutOfBoundsException from client driver during getBlob
Date Tue, 04 Nov 2008 11:13:15 GMT
Daniel Noll wrote:
> Hi all.
>
> Has anyone seen an exception similar to the following, coming from a 
> call to getBlob()?

Hi,

Yes, I've seen it before, but only with 10.3.2.1 and earlier.
The repro I have, which is very similar to the code you posted, doesn't 
trigger the bug with 10.3.3.0 or newer.
Can you double check the versions (both client and server) you are using?

For the record, I've been running with JDK 1.6.0.


-- 
Kristian

>
>> 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 10.4.1.3 -- the issue is transient so even if we 
> update go 10.4.2.0 we have no way to know if it has fixed the issue. 
> But I have looked through the list of fixes for 10.4.2.0 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
>
>


Mime
View raw message