java.lang.AbstractMethodError using JTDS.

3,822 views
Skip to first unread message

Paul Caswell

unread,
Dec 13, 2013, 7:35:15 AM12/13/13
to hika...@googlegroups.com
Using jtds 1.3.1

config.setDataSourceClassName("net.sourceforge.jtds.jdbcx.JtdsDataSource");

I get:

java.lang.AbstractMethodError
    at net.sourceforge.jtds.jdbc.JtdsConnection.isValid(JtdsConnection.java:2833)
    at com.zaxxer.hikari.proxy.ConnectionProxy.__isValid(ConnectionProxy.java:474)
    at com.zaxxer.hikari.proxy.ConnectionProxy.isValid(ConnectionProxy.java:444)
    at com.zaxxer.hikari.HikariPool.isConnectionAlive(HikariPool.java:400)
    at com.zaxxer.hikari.HikariPool.addConnection(HikariPool.java:336)
    at com.zaxxer.hikari.HikariPool.fillPool(HikariPool.java:262)
    at com.zaxxer.hikari.HikariPool.<init>(HikariPool.java:109)
    at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:50)

Brett Wooldridge

unread,
Dec 13, 2013, 7:05:04 PM12/13/13
to hika...@googlegroups.com
It appears that the jTDS driver does not support the isValid() method specified by
JDBC 4.0.  You can disable the JDBC4 isValid() check and instead use a connection
validation query.

HikariConfig config = new HikariConfig();
config.setJdbc4ConnectionTest(false);
config.setConnectionTestQuery("SELECT 1");

I do prefer the jTDS driver over Microsoft's.

Andrés Salcedo

unread,
Oct 10, 2016, 12:45:09 PM10/10/16
to HikariCP
jTds still is your weapon of choice? No support since 2013 and I'm currently testing HikariCP with MS driver... isValid method works as expected.

PS. I used JTds myself some time ago but going back to check connection using a query does not look nice.

Brett Wooldridge

unread,
Oct 23, 2016, 2:41:58 AM10/23/16
to HikariCP
At the same time, the MS driver does not support prepared statement caching while jTDS does...
Reply all
Reply to author
Forward
0 new messages