Hi, I am new to Kafka and I am trying to get my JDBC-Connector started but I got the same error over and over: java.sql.SQLException: No suitable driver found for jdbc:postgresql://localhost:5432/TEST_SM
I already read the article Kafka Connect Deep Dive – JDBC Source Connector | Confluent but it didnt fix the problem or I couldnt run it properly.
I tried to run it in standalone mode and in the distributed mode as well.
Since the postgres jdbc driver is already installed in the same directory as the kafka-connector-jdbc.jar I havent download another driver. The database already exist and I can run it in DBeaver and make requests.
Here is my POST request for generating the connector:
curl -X POST http://localhost:8083/connectors -H “Content-Type: application/json” -d ‘{
“name”: “jdbc_source_mysql_03”,
“config”: {
“connector.class”: “io.confluent.connect.jdbc.JdbcSourceConnector”,
“connection.url”: “jdbc:postgresql://localhost:5432/TEST_SM”,
“connection.user”: “postgres”,
“connection.password”: “*****”,
“topic.prefix”: “jdbc”,
“mode”:“bulk”,
“poll.interval.ms” : 3600000
}
}’
I changed the loglevel to DEBUG and it even registered the driver, BUT not immediately after the “INFO Added plugin JDBCSourceConnector” as stated in the article.
[2024-07-18 14:07:01,024] DEBUG Registered java.sql.Driver: org.postgresql.Driver@7c24b813 to java.sql.DriverManager (org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader:335)
I also deactivated the authorization, but it did not work either.
What am I missing? Thanks for the help