Hibernate 4.1.12 is using setBinaryStream(int,InputStream,long) insteat of setBinaryStream(int,InputStream,int) in order to specify the length of a blob. This does not work with jTDS, as it throws an AbstractMEthodError().
The JDBC4 method sould be implemented, eighter by forwarding to the old method of the size fits into an int, or by generally forwarding the long value, if this can be done easily.
I have created a patch for 1.3.1 which forwards the method calls on to the methods which accept the int length. I have reused the same error messages which are used by setBlob(int parameterIndex, Blob x) and setClob(int parameterIndex, Clob x) when the length of the data is > Integer.MAX_VALUE.
We have only checked that the change for setBinaryStream(int,InputStream,long) is working on our system, not the clob changes. I regret to say that I have not looked at the unit tests as at the moment they are complaining about a missing junit dependency.
Original ticket - https://sourceforge.net/p/jtds/bugs/703/
I took a patch of Martin Ball to make that fix, from here https://sourceforge.net/p/jtds/bugs/703/#7c8c :