Skip to content Skip to sidebar Skip to footer

Exception While Using Jtds For Sqlserver Connectivity

I am using jtds driver to connect to SQLServer from a UnixBox using windows authentication from a SpringBoot+JPA application. Its a standalone application and not a WebBased applic

Solution 1:

There is an open jTDS bug for this. In short, the JDBC standards specifies two different methods for setting character stream:

Old method signature:

publicvoidsetCharacterStream(int parameterIndex, Reader reader, long length)throws SQLException

New method signature:

publicvoidsetCharacterStream(int parameterIndex, Reader reader, int length)throws SQLException

With the difference being the last parameter that was changed from long to int.

jTDS haven't implemented the new method, which is used by Hibernate, and therefore you get the AbstractMethodError.

You have 2 options here:

  1. Switch to Microsoft JDBC driver, which supports this method
  2. Get the sources code of jTDS and implement the method yourself (most likely by forwarding the old method to the new method)

From my experience, don't count on an official release anytime soon.

Post a Comment for "Exception While Using Jtds For Sqlserver Connectivity"