# Kafka Jdbc Source Connector throwing error while starting task - JDBC driver version 2 is newer than required version 4.0

**URL:** https://forum.confluent.io/t/kafka-jdbc-source-connector-throwing-error-while-starting-task-jdbc-driver-version-2-is-newer-than-required-version-4-0/37111
**Category:** Kafka Connect
**Created:** [6 February 2025 10:38 UTC](https://forum.confluent.io/t/kafka-jdbc-source-connector-throwing-error-while-starting-task-jdbc-driver-version-2-is-newer-than-required-version-4-0/37111 "2025-02-06T10:38:42Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![DeeptiK](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@DeeptiK](https://forum.confluent.io/u/DeeptiK)
#### Post date: [6 February 2025 10:38 UTC](https://forum.confluent.io/t/kafka-jdbc-source-connector-throwing-error-while-starting-task-jdbc-driver-version-2-is-newer-than-required-version-4-0/37111/1 "2025-02-06T10:38:42Z")

</div>

I downloaded the Confluent’s Self-Hosted connector kafka-connect-jdbc Version 10.8.0 I have kafka version kafka\_2.13-3.8.1. I placed the kafka-connect-jdbc as a plugin and started kafka and connector. I tried with mode = buld and incrementing. It works fine. But when I tried with mode = timestamp, I get an error while starting task

```auto
[2025-02-04 18:05:14,439] INFO [jdbc_source_conn_2|task-0] Database connection established. (io.confluent.connect.jdbc.util.CachedConnectionProvider:64) [2025-02-04 18:05:14,443] INFO [jdbc_source_conn_2|task-0] JDBC driver version 2 is newer than required version 4.0 (io.confluent.connect.jdbc.util.JdbcDriverInfo:122) [2025-02-04 18:05:14,443] INFO [jdbc_source_conn_2|task-0] JDBC driver version 2 is newer than required version 4.0 (io.confluent.connect.jdbc.util.JdbcDriverInfo:122) [2025-02-04 18:05:14,443] INFO [jdbc_source_conn_2|task-0] JDBC driver version 2 is newer than required version 4.0 (io.confluent.connect.jdbc.util.JdbcDriverInfo:122) [2025-02-04 18:05:14,443] INFO [jdbc_source_conn_2|task-0] JDBC driver version 2 is newer than required version 4.0 (io.confluent.connect.jdbc.util.JdbcDriverInfo:122) [2025-02-04 18:05:14,443] INFO [jdbc_source_conn_2|task-0] JDBC driver version 2 is newer than required version 4.0 (io.confluent.connect.jdbc.util.JdbcDriverInfo:122) [2025-02-04 18:05:14,444] INFO [jdbc_source_conn_2|task-0] JDBC driver version 2 is newer than required version 4.0 (io.confluent.connect.jdbc.util.JdbcDriverInfo:122) [2025-02-04 18:05:14,444] INFO [jdbc_source_conn_2|task-0] JDBC driver version 2 is newer than required version 4.0 (io.confluent.connect.jdbc.util.JdbcDriverInfo:122) [2025-02-04 18:05:14,444] INFO [jdbc_source_conn_2|task-0] JDBC driver version 2 is newer than required version 4.0 (io.confluent.connect.jdbc.util.JdbcDriverInfo:122) [2025-02-04 18:05:14,444] INFO [jdbc_source_conn_2|task-0] JDBC driver version 2 is newer than required version 4.0 (io.confluent.connect.jdbc.util.JdbcDriverInfo:122) [2025-02-04 18:05:14,444] INFO [jdbc_source_conn_2|task-0] JDBC driver version 2 is newer than required version 4.0 (io.confluent.connect.jdbc.util.JdbcDriverInfo:122) [2025-02-04 18:05:14,444] INFO [jdbc_source_conn_2|task-0] Current Result is null. Executing query. (io.confluent.connect.jdbc.source.TimestampIncrementingTab

```

The POST request is below

```auto
{
    "name":"jdbc_source_conn_2",
    "config":{
        "connector.class":"io.confluent.connect.jdbc.JdbcSourceConnector",
        "connection.url":"jdbc:oracle:thin:@xxx:xxx:xxx",
        "connection.user":"xxx",
        "connection.password":"xxx",
        "mode":"timestamp",
        "topic.prefix":"mode-timestamp-",
        "timestamp.column.name":"UPDATED_TS",
        "table.whitelist":"TEST_CUSTOMERS"
    }
}

```

```auto
desc TEST_CUSTOMERS

Name Null? Type

---------- -------- -------------

ID NOT NULL NUMBER(38)

FIRST_NAME VARCHAR2(255)

LAST_NAME VARCHAR2(255)

CREATED_TS NOT NULL TIMESTAMP(6)

UPDATED_TS NOT NULL TIMESTAMP(6)

```

The ojdbc driver version available with the plugin is ojdbc8-19.7.0.0.jar

Could you please help me resolve the issue

---

<div class="post-metadata">

### Author: ![dtroiano](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/dtroiano/32/1961_2.png) [@dtroiano](https://forum.confluent.io/u/dtroiano)
#### Post date: [7 February 2025 17:25 UTC](https://forum.confluent.io/t/kafka-jdbc-source-connector-throwing-error-while-starting-task-jdbc-driver-version-2-is-newer-than-required-version-4-0/37111/2 "2025-02-07T17:25:31Z")

</div>

Based on some internal discussion I am seeing about this logging, it’s not problematic. It is confusing though that it says `JDBC driver version 2 is newer than required version 4.0` since 2 is \< 4.0, but that’s just buggy logging since in your case the version is 4.2, i.e., it logs the minor version. The logging has already been fixed in [this](https://github.com/confluentinc/kafka-connect-jdbc/pull/1451/files) pull request and changed from `INFO` to `DEBUG`.

---

<div class="post-metadata">

### Author: ![DeeptiK](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@DeeptiK](https://forum.confluent.io/u/DeeptiK)
#### Post date: [8 February 2025 04:39 UTC](https://forum.confluent.io/t/kafka-jdbc-source-connector-throwing-error-while-starting-task-jdbc-driver-version-2-is-newer-than-required-version-4-0/37111/3 "2025-02-08T04:39:24Z")

</div>

Thank you. Should I wait for new version or should I go back to any versions?

---

<div class="post-metadata">

### Author: ![dtroiano](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/dtroiano/32/1961_2.png) [@dtroiano](https://forum.confluent.io/u/dtroiano)
#### Post date: [10 February 2025 14:07 UTC](https://forum.confluent.io/t/kafka-jdbc-source-connector-throwing-error-while-starting-task-jdbc-driver-version-2-is-newer-than-required-version-4-0/37111/4 "2025-02-10T14:07:38Z")

</div>

AIUI there’s no need to wait or downgrade. It’s misleading logging but is benign.

---

<div class="post-metadata">

### Author: ![DeeptiK](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@DeeptiK](https://forum.confluent.io/u/DeeptiK)
#### Post date: [10 February 2025 14:52 UTC](https://forum.confluent.io/t/kafka-jdbc-source-connector-throwing-error-while-starting-task-jdbc-driver-version-2-is-newer-than-required-version-4-0/37111/5 "2025-02-10T14:52:55Z")

</div>

Thank you. But when I tried to create a record or update an existing record, the record is not pushed to kafka stream. I assumed that due to the jdbc driver version error, the updates were not pushed to kafka stream. If this is just a logging issue, then could you please help me how to push records to kafka stream on incrementing timestamp columns.

---

<div class="post-metadata">

### Author: ![dtroiano](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/dtroiano/32/1961_2.png) [@dtroiano](https://forum.confluent.io/u/dtroiano)
#### Post date: [10 February 2025 15:25 UTC](https://forum.confluent.io/t/kafka-jdbc-source-connector-throwing-error-while-starting-task-jdbc-driver-version-2-is-newer-than-required-version-4-0/37111/6 "2025-02-10T15:25:29Z")

</div>

Hard to say what the issue might be. Is there any helpful info elsewhere in the log?

If nothing helpful turns up, then I would turn on trace logging to debug this. E.g., see what gets logged for [this](https://github.com/confluentinc/kafka-connect-jdbc/blob/67eef36e1e10a514346ec199d4d85e27fd16d108/src/main/java/io/confluent/connect/jdbc/source/TimestampIncrementingTableQuerier.java#L219) line. This should give you the timestamp filter query that the connector runs to determine rows to land in Kafka. With trace logging enabled, hopefully you’d be able to see if something looks off with either the query or the data in the DB.

---

<div class="post-metadata">

### Author: ![DeeptiK](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@DeeptiK](https://forum.confluent.io/u/DeeptiK)
#### Post date: [10 February 2025 17:08 UTC](https://forum.confluent.io/t/kafka-jdbc-source-connector-throwing-error-while-starting-task-jdbc-driver-version-2-is-newer-than-required-version-4-0/37111/7 "2025-02-10T17:08:53Z")

</div>

I enabled the trace logging, and got below logs

[2025-02-10 17:00:03,959] TRACE [source-bulk-conn-7|task-0] Set the committed offset: 2025-02-04 12:15:59.310495 (io.confluent.connect.jdbc.source.TimestampIncrementingTableQuerier:183)  
[2025-02-10 17:00:08,961] INFO [source-bulk-conn-7|task-0] Database connection established. (io.confluent.connect.jdbc.util.CachedConnectionProvider:64)  
[2025-02-10 17:00:08,961] DEBUG [source-bulk-conn-7|task-0] Creating PreparedStatement (io.confluent.connect.jdbc.source.TimestampIncrementingTableQuerier:131)  
[2025-02-10 17:00:08,962] TRACE [source-bulk-conn-7|task-0] TimestampTableQuerier{table=“xxx”.“TEST\_CUSTOMERS”, query=‘null’, topicPrefix=‘mode-timestamp-’, timestampColumns=[UPDATED\_TS]} prepared SQL query: SELECT \* FROM “xxx”.“TEST\_CUSTOMERS” WHERE “xxx”.“TEST\_CUSTOMERS”.“UPDATED\_TS” \> ? AND “xxx”.“TEST\_CUSTOMERS”.“UPDATED\_TS” \< ? ORDER BY “xxx”.“TEST\_CUSTOMERS”.“UPDATED\_TS” ASC (io.confluent.connect.jdbc.source.TimestampIncrementingTableQuerier:160)  
[2025-02-10 17:00:08,964] TRACE [source-bulk-conn-7|task-0] Statement to execute: oracle.jdbc.driver.OraclePreparedStatementWrapper@3f253fc6 (io.confluent.connect.jdbc.source.TimestampIncrementingTableQuerier:219)  
[2025-02-10 17:00:08,966] INFO [source-bulk-conn-7|task-0] JDBC driver version 2 is newer than required version 4.0 (io.confluent.connect.jdbc.util.JdbcDriverInfo:122)  
[2025-02-10 17:00:08,966] INFO [source-bulk-conn-7|task-0] JDBC driver version 2 is newer than required version 4.0 (io.confluent.connect.jdbc.util.JdbcDriverInfo:122)  
[2025-02-10 17:00:08,966] INFO [source-bulk-conn-7|task-0] JDBC driver version 2 is newer than required version 4.0 (io.confluent.connect.jdbc.util.JdbcDriverInfo:122)  
[2025-02-10 17:00:08,966] INFO [source-bulk-conn-7|task-0] JDBC driver version 2 is newer than required version 4.0 (io.confluent.connect.jdbc.util.JdbcDriverInfo:122)  
[2025-02-10 17:00:08,966] INFO [source-bulk-conn-7|task-0] JDBC driver version 2 is newer than required version 4.0 (io.confluent.connect.jdbc.util.JdbcDriverInfo:122)  
[2025-02-10 17:00:08,966] INFO [source-bulk-conn-7|task-0] Current Result is null. Executing query. (io.confluent.connect.jdbc.source.TimestampIncrementingTableQuerier:174)

---

<div class="post-metadata">

### Author: ![dtroiano](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/dtroiano/32/1961_2.png) [@dtroiano](https://forum.confluent.io/u/dtroiano)
#### Post date: [10 February 2025 17:30 UTC](https://forum.confluent.io/t/kafka-jdbc-source-connector-throwing-error-while-starting-task-jdbc-driver-version-2-is-newer-than-required-version-4-0/37111/8 "2025-02-10T17:30:02Z")

</div>

Can you tell what the begin and end timestamps are? The prepared statement only shows `?` but maybe you can find [this](https://github.com/confluentinc/kafka-connect-jdbc/blob/67eef36e1e10a514346ec199d4d85e27fd16d108/src/main/java/io/confluent/connect/jdbc/source/TimestampIncrementingCriteria.java#L177-L180) line:

```java
    log.debug("Executing prepared statement with timestamp value = {} end time = {}",
        DateTimeUtils.formatTimestamp(beginTime, timeZone),
        DateTimeUtils.formatTimestamp(endTime, timeZone)
    );

```

Alternatively, if you have access to the DB query log, see what query hits Oracle.

---

<div class="post-metadata">

### Author: ![DeeptiK](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@DeeptiK](https://forum.confluent.io/u/DeeptiK)
#### Post date: [11 February 2025 11:09 UTC](https://forum.confluent.io/t/kafka-jdbc-source-connector-throwing-error-while-starting-task-jdbc-driver-version-2-is-newer-than-required-version-4-0/37111/9 "2025-02-11T11:09:59Z")

</div>

I enabled tracing for TimestampIncrementingCriteria and figured out that begin and end timestamps were in UTC timezone and the db timestamp column was in UTC+05:30 timezone. So I added the property “db.timezone”:“Asia/Kolkata” to the POST request to connector and then it worked fine. Thanks for the help.

---

<div class="post-metadata">

### Author: ![LarryWilson](https://avatars.discourse-cdn.com/v4/letter/l/b2d939/32.png) [@LarryWilson](https://forum.confluent.io/u/LarryWilson)
#### Post date: [11 March 2025 19:28 UTC](https://forum.confluent.io/t/kafka-jdbc-source-connector-throwing-error-while-starting-task-jdbc-driver-version-2-is-newer-than-required-version-4-0/37111/10 "2025-03-11T19:28:24Z")

</div>

I have had the same issue with the “JDBC driver version 2 is newer than required version 4.0” message appearing in the logs. And while it is a benign error, it happens with such frequency that my log files are filling up and rolling over every 45 minutes. This hampers our ability to troubleshoot other issues using the logs, because the rollover so often.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex019/uploads/confluentcommunity/original/1X/c49438c90c9df282e9996fdf6971be890c71b65a.svg) [@system](https://forum.confluent.io/u/system)
#### Post date: [10 April 2025 19:29 UTC](https://forum.confluent.io/t/kafka-jdbc-source-connector-throwing-error-while-starting-task-jdbc-driver-version-2-is-newer-than-required-version-4-0/37111/11 "2025-04-10T19:29:13Z")

</div>

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