我正在使用Confluent platform 5.2.1
和jdbc源连接器从MySql表读取数据。我已完成所有必需的配置更改,并且JDBC源连接器和MySql驱动程序jar都放置在share/java/kafka-connect-jdbc
目录中。
我已经成功启动了所有流程,即zookeeper,架构注册表,kafka connect等。
当我尝试执行连接器配置以开始从MySql读取数据时,出现以下错误-
{"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`"}
我遍历了Confluent本身和其他网站上的许多博客,但是找不到任何具体的解决方案,到处都提出了将驱动程序jar放在我已经做过的share/java/kafka-connect-jdbc
目录中的建议。>
其他信息-
{
"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-"
}
}
请让我知道是否需要从我这一侧进行任何其他输入,我被完全卡住并封锁了。任何帮助将不胜感激。