Subject Obscure error
Author Simon Harper
Hi there,

I get an error from some data which is in an odd state. I'm afraid I'm not sure how best to describe it, but it's a blob that has no content, but is not defined as null. This is the error (through ColdFusion MX):

java.sql.SQLException: You can't read a new blob
at org.firebirdsql.jdbc.FBBlob$FBBlobInputStream.<init>(FBBlob.java:338)
at org.firebirdsql.jdbc.FBBlob$FBBlobInputStream.<init>(FBBlob.java:336)
at org.firebirdsql.jdbc.FBBlob.getBinaryStream(FBBlob.java:158)
at org.firebirdsql.jdbc.FBLongVarCharField.getBytes(FBLongVarCharField.java:77)
at org.firebirdsql.jdbc.FBLongVarCharField.getCachedObject(FBLongVarCharField.java:119)
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.execute(FBStatement.java:473)

The query which generates this error does work in Firebird (I'm using IB Manager to test this), and indeed if I go into the data and explicitly set the offending field to null, the query works again via JayBird.

Hope this helps, please let me know if I can be a little more specific or if you want me to try something.

Thanks,

Simon

---
Simon.Harper@...
Applications Development Manager
Warwick Business School