Subject Problem retrieving data from MON$STATEMENTS
Author IJFQSFTGESJU@spammotel.com
Hello,

I have a problem running SELECT statement against the MON$STATEMENT table.

When trying to retrieve the value from the MON$SQL_TEXT column the driver throws an error.

This is the relevant part of the error's stacktrace:

GDS Exception. 335544329. invalid BLOB ID [SQL State=HY000, DB Errorcode=335544329]
org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544329. invalid BLOB ID
at org.firebirdsql.jdbc.FBBlob$FBBlobInputStream. (FBBlob.java:647)
at org.firebirdsql.jdbc.FBBlob$FBBlobInputStream. (FBBlob.java:620)
at org.firebirdsql.jdbc.FBBlob.getBinaryStream(FBBlob.java:357)
at org.firebirdsql.jdbc.field.FBLongVarCharField.getBinaryStream(FBLongVarCharField.java:96)
at org.firebirdsql.jdbc.field.FBField.getCharacterStream(FBField.java:619)
at org.firebirdsql.jdbc.FBResultSet.getCharacterStream(FBResultSet.java:1085)

I also tried using getString() instead of getCharacterStream() but that essentially produces the same error:

GDS Exception. 335544329. invalid BLOB ID [SQL State=HY000, DB Errorcode=335544329]
org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544329. invalid BLOB ID
at org.firebirdsql.jdbc.FBBlob$FBBlobInputStream. (FBBlob.java:647)
at org.firebirdsql.jdbc.FBBlob$FBBlobInputStream. (FBBlob.java:620)
at org.firebirdsql.jdbc.FBBlob.getBinaryStream(FBBlob.java:357)
at org.firebirdsql.jdbc.field.FBLongVarCharField.getBytes(FBLongVarCharField.java:106)
at org.firebirdsql.jdbc.field.FBLongVarCharField.getString(FBLongVarCharField.java:159)
at org.firebirdsql.jdbc.FBResultSet.getString(FBResultSet.java:547)

I tried this with Jaybird 2.1.1 and 2.1.6 against a FB 2.1.3 database.

The error does not occur always, and I don't have problems retrieving BLOB SUB_TYPE 1 from other tables.

Could this be a driver problem, or a problem in the way the table is maintained by Firebird internally?

Regards
Thomas