我正在尝试在kafka-connect上创建jdbc接收器连接器(不是在汇合上),并且正在为以下错误而苦苦挣扎:
ERROR Plugin class loader for connector: 'io.confluent.connect.jdbc.JdbcSinkConnector'
我在CLASSPATH中设置了以下路径,并放置了所有与jdbc connect相关的JAR。 C:\ Oviyan \ Software \ kafka_2.12-2.3.1 \ libs C:\ Oviyan \ Software \ confluentinc-kafka-connect-jdbc-5.3.1 \ lib
配置属性:
connect-standalone.properties:
bootstrap.servers=localhost:9092
key.converter=org.apache.kafka.connect.storage.StringConverter
value.converter=org.apache.kafka.connect.storage.StringConverter
key.converter.schemas.enable=true
value.converter.schemas.enable=true
offset.storage.file.filename=/tmp/connect.offsets
offset.flush.interval.ms=10000
plugin.path=C:<user-name>\Software\kafka_2.12-2.3.1\libs\kafka-connect-jdbc
rest.port=8086
rest.host.name=localhost
Jdbc-connect-config.properties:
name=test-sink-jdbc-autoincrement
connector.class=io.confluent.connect.jdbc.JdbcSinkConnector
tasks.max=1
topics=test-topic
connection.url=jdbc:postgres://localhost:5432/<db-name>
connection.user=
connection.password=
auto.create=true
错误日志:
ERROR Plugin class loader for connector: 'io.confluent.connect.jdbc.JdbcSinkConnector' was not found.
Returning: org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader@3a1dd365
org.apache.kafka.connect.errors.ConnectException: java.sql.SQLException: No suitable driver found
for jdbc:postgres://localhost:5432/kafka-test1
at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: No suitable driver found for jdbc:postgres://localhost:5432/kafka-
test1
感谢任何帮助!