无法创建jdbc接收器连接器:连接器的插件类加载器出错:“io.confluent.connect.jdbc.jdbcsinkconnector”

dzhpxtsq  于 2021-06-04  发布在  Kafka
关注(0)|答案(0)|浏览(257)

我正在尝试在kafka connect(而不是confluent)上创建jdbc接收器连接器,但遇到以下错误:

ERROR Plugin class loader for connector: 'io.confluent.connect.jdbc.JdbcSinkConnector'

我在类路径中设置了下面的路径,并放置了所有与jdbc连接相关的jar。c:\oviyan\software\kafka\u 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

谢谢你的帮助!

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题