I am using Confluent platform 5.2.1
and jdbc source connector to read data from MySql table. I have done all the required config changes and also the JDBC source connector and MySql driver jar's are placed in share/java/kafka-connect-jdbc
directory.
I have successfully started all the processes i.e. zookeeper, schema registry, kafka connect etc.
When I am trying to execute connector configuration to start reading the data from MySql I am getting below error -
{"error_code":400,"message":"Connector configuration is invalid and contains the following 2 error(s):\nInvalid value java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/test?user=test_user&password=Welc0me! for configuration Couldn't open connection to jdbc:mysql://localhost:3306/test?user=test_user&password=Welc0me!\nInvalid value java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/test?user=test_user&password=Welc0me! for configuration Couldn't open connection to jdbc:mysql://localhost:3306/test?user=test_user&password=Welc0me!\nYou can also find the above list of errors at the endpoint `/{connectorType}/config/validate`"}
I have gone through many blogs from Confluent itself and others websites as well but could not find any concrete solution, everywhere the suggestion is given to place your driver jar in share/java/kafka-connect-jdbc
directory which I have already done.
Additional Informations -
- I am using MySql 8.0.16 and the driver jar is also 8.0.16 to avoid the compatibility issue.
- I have set the classpath and plugin.path variable to the same folder where the jars are installed.
- I am running in stand alone mode.
- Below is the MySql properties I am using -
{
"name": "jdbc_source_mysql_foobar_01",
"config": {
"connector.class": "io.confluent.connect.jdbc.JdbcSourceConnector",
"key.converter": "io.confluent.connect.avro.AvroConverter",
"key.converter.schema.registry.url": "http://localhost:8081",
"value.converter": "io.confluent.connect.avro.AvroConverter",
"value.converter.schema.registry.url": "http://localhost:8081",
"connection.url": "jdbc:mysql://localhost:3306/test?user=test_user&password=Welc0me!",
"table.whitelist": "foobar",
"mode": "timestamp",
"timestamp.column.name": "update_ts",
"validate.non.null": "false",
"topic.prefix": "mysql-"
}
}
Kindly let me know if any other input is needed form my side, I am stuck and blocked completely. Any help will be appreciated.