Logstash JDBC driver

Hi dears
I have upgraded my cluster form 7.6.2 to 7.16.2
There is only one problem I faced with.

My Logstash has some pipelines that need to connect to a sql db and according to a statement, get a SP result from sql db and index it to Elasticsearch.

The problem is Logstash 6.7.2 can do this with sqldbc42.jar jars/sqljdbc_4.2/enu/jre8/**sqljdbc42.jar**
But when I upgrade Logstash to 7.16.2 this driver can not connect Logstash to my sql

I just want to know what version of that driver I should use? Or where can I find this compatible driver?

This is my Logstash 7.16.2 log (When I downgrade to 7.6.2 everything is ok)

[2021-12-28T00:00:00,188][ERROR][logstash.inputs.jdbc     ][Agent][cdeebc9c4e6eafcf511187a160e912f3b09356b01df3ddadae6a1ce5dcc5313f] Unable to connect to database. Tried 1 times {:message=>"Java::JavaLang::NoClassDefFoundError: javax/xml/bind/DatatypeConverter", :exception=>Sequel::DatabaseConnectionError, :cause=>java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter, 

Thank you so much

It looks like you are trying to use a JDBC driver that was built for Java 8 (jre8 in the path), and Logstash is starting with Java 11 (we bundle a Java 11 with Logstash since ~7.10, preferring the one we bundle to the one on your $PATH). The javax.xml.bind libraries became explicit add-in with Java 9 (Sept 2017) and are no longer a part of the Java distribution since Java 11 was released (Sept 2018).

Does the vendor provide an updated library to work with Java 11?

A temporary work-around would be to set LS_JAVA_HOME to point to a locally-installed Java 8 (if you do this, note that Java 8 support is being dropped soon with the upcoming release of Logstash 8)

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.