Subject Re: [Firebird-Java] Re: Problem when using Firebird + Hibernate + Blob fields
Author Roman Rokytskyy
> exactly the same error message:
> org.firebirdsql.jdbc.FBSQLException: You must use FBBlobs with Firebird.

Please check your classpath. The string above is no longer in any of the
class files, so you must have old JayBird in the classpath.

> Are there any other issues with blobs that outside the Hibernate context?
> Or through other ways they can be manipulated without major problems?

The issue you describe was never a problem, and in fact it is not expected
that applications implement the java.sql.Blob interface and then pass them
into PreparedStatement.setBlob(int, Blob) call. This is not stated in the
JDBC specification.

The Hibernate team created this workaround to solve the JDBC specification
issues, but the workround is not clean. If I'm not mistaken, Oracle still
requires call to their proprietary method
OracleConnection.createTemporaryBlob() which had to be released explicitly.

The JDBC 4.0 specification fixes this issue by adding the
Connection.createBlob() method which existed in JayBird from the very
beginning. And to make other driver vendors happy (at least Oracle), a method (not needed for Firebird). So, expect Hibernate 4.0 to
switch to the new code :)