Subject | Re: [Firebird-Java] ArrayIndexOutOfBoundsException trying to read blob |
---|---|
Author | Roman Rokytskyy |
Post date | 2007-10-14T16:00:43Z |
> When we call the following:Should never happen... Can you provide a test case?
> 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)
>No, the second is another problem - it has problem parsing the server's
> Can anyone (with access to the source I assume) tell me what is
> happening at this point in the stack trace?
>
> Immediately afterwards our code called statement.executeQuery and this
> happened:
> java.lang.NegativeArraySizeException
> at
> org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.parseTruncSqlInfo(AbstractJavaGDSImpl.java:2349)
> at
> org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.parseSqlInfo(AbstractJavaGDSImpl.java:2305)
> at
> org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.iscDsqlPrepare(AbstractJavaGDSImpl.java:1499)
> at
> org.firebirdsql.gds.impl.GDSHelper.prepareStatement(GDSHelper.java:196)
> at
> org.firebirdsql.jdbc.AbstractStatement.prepareFixedStatement(AbstractStatement.java:1129)
> at
> org.firebirdsql.jdbc.AbstractStatement.internalExecute(AbstractStatement.java:1108)
> at
> org.firebirdsql.jdbc.AbstractStatement.executeQuery(AbstractStatement.java:219)
>
> 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?
reply. Can you send me a database and a test case?
Roman