Subject Re: null blob causes exception
Author adobni
Yes! the programmer was using IB Manager. We couldn't use that table
updating the blobs fields to a empty string, even rebooting the
server. We had to drop the table and recreate it.

--- In Firebird-Java@yahoogroups.com, "issujh"
<jonathan.handford@w...> wrote:
> Hi,
>
> We are having the same problem, and my Boss, Simon Harper, wrote
> about an "Obscure Error" a while back:
>
> http://groups.yahoo.com/group/Firebird-Java/message/3124
>
> Since the, we have not really solved the problem but have suspicions
> about a Firebird Administration application call IB Manager (or
> Quickdesk - The previous version) from EMS:
>
> http://www.ems-hitech.com/ibmanager
>
> Do you happen to use this program?
>
> This is reproducable by following these steps:
>
> 1) Within IB Manager, tick the NULL tick-box within a BLOB field.
> 2) Press Commit, and the tick-box will then be unticked but the field
> will be empty.
> 3) Select the field using FirebirdSQL, and you will get the following
> error:
>
> java.sql.SQLException: You can't read a new blob
> at org.firebirdsql.jdbc.FBBlob$FBBlobInputStream.<init>
> (FBBlob.java:343)
> at org.firebirdsql.jdbc.FBBlob$FBBlobInputStream.<init>
> (FBBlob.java:338)
> at org.firebirdsql.jdbc.FBBlob.getBinaryStream
> (FBBlob.java:158)
> at org.firebirdsql.jdbc.FBLongVarCharField.getBytes
> (FBLongVarCharField.java:107)
> at org.firebirdsql.jdbc.FBLongVarCharField.getCachedObject
> (FBLongVarCharField.java:149)
> at org.firebirdsql.jdbc.FBCachedFetcher.<init>
> (FBCachedFetcher.java:119)
> at org.firebirdsql.jdbc.FBResultSet.<init>
> (FBResultSet.java:122)
> at org.firebirdsql.jdbc.FBStatement.getCachedResultSet
> (FBStatement.java:565)
> at org.firebirdsql.jdbc.FBStatement.executeQuery
> (FBStatement.java:107)
> at TestDB.main(TestDB.java:17)
>
> 4) Tick the tick-box again and commit.
> 5) The query executes without an error.
>
> Does this sound familiar?
>
> Jonathan Handford