Subject Re: ArrayIndexOutOfBoundsException trying to read blob
Author phil_hhn
--- In Firebird-Java@yahoogroups.com, Roman Rokytskyy <rrokytskyy@...>
wrote:
>
> > When we call the following:
> > byte[] imageBytes = rs.getBytes(16);
> >
> > We get the error:
> > java.lang.ArrayIndexOutOfBoundsException
> > at java.lang.System.arraycopy(Native Method)
> > at
> >
org.firebirdsql.jdbc.field.FBBlobField.getBytesInternal(FBBlobField.java:153)
> > at
org.firebirdsql.jdbc.field.FBBlobField.getBytes(FBBlobField.java:113)
> > at org.firebirdsql.jdbc.FBResultSet.getBytes(FBResultSet.java:431)
>
> Should never happen... Can you provide a test case?
Not really - I found this in a clients log file; it's happened several
times but I do not know why. I can tell you though - the blobs being
retrieved here contain images - I'd expect only 50-100k but as they
are user-editable I cannot know for certain.

> > I don't know if the second error is related, but it is logged at
> > exactly the same second. Did the first error destabilise the JDBC
driver?
>
> No, the second is another problem - it has problem parsing the server's
> reply. Can you send me a database and a test case?
>
> Roman

The database in the above situation is 66MB :( and as I say I don't
know what causes it. Sometimes it works.
Does the stack trace not indicate where in the driver the problem is?
Can I get cvs access (read only) to the source?

Thanks, Phil