|
Consider a simple blob mapping:
@Lob
private java.sql.Blob data;
Using the jTDS driver an exception is thrown when such an entity is stored.
SQLFeatureNotSupportedException: Method not implemented
I tracked the problem down to org.hibernate.type.descriptor.sql.BlobTypeDescriptor where in line 151 the method java.sql.PreparedStatement.setBinaryStream(int, InputStream, long) is called.
The problem here is that this method was introduced in JDBC4 (Java 6). In JDBC3/Java 5, the methods signature is java.sql.PreparedStatement.setBinaryStream(int, InputStream, int)
Note the last parameter being int instead of long.
Work-around available: Use the official Microsoft JDBC4 driver
|