Lenses sink postgresql - "No suitable driver found" error

Hi all,

I try to create a postgresql(timescaldb) sink with the JDBC Connector. But i only get an error message:

Caused by: org.apache.kafka.connect.errors.ConnectException: java.sql.SQLException: No suitable driver found

I use the Lenses Box. Is this possible? Is there any good description?

@blanpa The timescaledb jdbc driver will need to be added to the classpath of the Connect workers inside of the Lenses Box. You will need to mount it in the /connectors folder.

For example:

docker run --rm -it --net=host \
           -v my-jdbc-driver.jar:/connectors/my-jdbc-driver.jar \

Hello blanpa! In Lenses Box, we include the PostgreSQL JDBC driver to both the Confluent JDBC and Debezium Postgres connectors. For Confluent JDBC the driver currently is at version 42.3.3, for Debezium Postgres the driver is at version 42.4.1.

So your error seems a little funny. If you can share your connector configuration we might be able to deduct why it isn’t working.

In any case, if you need to add a custom JDBC driver to Box, you have to add them to each connector’s directory. This happens because Kafka Connect uses classpath isolation for connectors.

As an example, if you have my-jdbc.jar and want to add it to both Confluent JDBC and Debezium Postgres:

docker run ... \
  -v /path/to/my-jdbc.jar:/opt/landoop/connectors/third-party/kafka-connect-jdbc/my-jdbc.jar \
  -v /path/to/my-jdbc.jar:/opt/landoop/connectors/third-party/kafka-connect-debezium-postgres/my-jdbc.jar \
  ... lensesio/box