Failed to find any class that implements Connector and which name matches io.confluent.connect.jdbc.JdbcSourceConnector

Viewed 17

I've installed community version of tar of Confluent Platform. I'm trying to use below command from ksql and getting below error

confluent version 
confluent - Confluent CLI

Version:     v1.40.0
Git Ref:     1c975456
Build Date:  2021-09-23T02:04:31Z
Go Version:  go1.16.3 (darwin/arm64)
Development: false

prateekashtikar@Prateeks-MacBook-Pro ksql-course-master % confluent local version
The local commands are intended for a single-node development environment only,
NOT for production usage. https://docs.confluent.io/current/cli/index.html

Confluent Platform: 7.0.1

Command -

ksql> CREATE SOURCE CONNECTOR `postgres-jdbc-source` WITH (
>   "connector.class"='io.confluent.connect.jdbc.JdbcSourceConnector',
>   "connection.url"='jdbc:postgresql://postgres:5432/postgres',
>   "mode"='incrementing',
>   "incrementing.column.name"='ref',
>   "table.whitelist"='carusers',
>   "connection.password"='postgres',
>   "connection.user"='postgres',
>   "topic.prefix"='db-',
>   "key"='username');

Error -

{
  "error_code" : 500,
  "message" : "Failed to find any class that implements Connector and which name matches io.confluent.connect.jdbc.JdbcSourceConnector, available connectors are: PluginDesc{klass=class io.confluent.connect.replicator.ReplicatorSourceConnector, name='io.confluent.connect.replicator.ReplicatorSourceConnector', version='7.0.1', encodedVersion=7.0.1, type=source, typeName='source', location='file:/Users/prats/confluent-7.0.1/share/java/kafka-connect-replicator/'}, PluginDesc{klass=class org.apache.kafka.connect.mirror.MirrorCheckpointConnector, name='org.apache.kafka.connect.mirror.MirrorCheckpointConnector', version='1', encodedVersion=1, type=source, typeName='source', location='file:/Users/prats/confluent-7.0.1/share/java/kafka/'}, PluginDesc{klass=class org.apache.kafka.connect.mirror.MirrorHeartbeatConnector, name='org.apache.kafka.connect.mirror.MirrorHeartbeatConnector', version='1', encodedVersion=1, type=source, typeName='source', location='file:/Users/prats/confluent-7.0.1/share/java/kafka/'}, PluginDesc{klass=class org.apache.kafka.connect.mirror.MirrorSourceConnector, name='org.apache.kafka.connect.mirror.MirrorSourceConnector', version='1', encodedVersion=1, type=source, typeName='source', location='file:/Users/prats/confluent-7.0.1/share/java/kafka/'}, PluginDesc{klass=class org.apache.kafka.connect.tools.MockConnector, name='org.apache.kafka.connect.tools.MockConnector', version='7.0.1-ce', encodedVersion=7.0.1-ce, type=connector, typeName='connector', location='file:/Users/prats/confluent-7.0.1/share/java/confluent-kafka-mqtt/'}, PluginDesc{klass=class org.apache.kafka.connect.tools.MockSinkConnector, name='org.apache.kafka.connect.tools.MockSinkConnector', version='7.0.1-ce', encodedVersion=7.0.1-ce, type=sink, typeName='sink', location='file:/Users/prats/confluent-7.0.1/share/java/confluent-kafka-mqtt/'}, PluginDesc{klass=class org.apache.kafka.connect.tools.MockSourceConnector, name='org.apache.kafka.connect.tools.MockSourceConnector', version='7.0.1-ce', encodedVersion=7.0.1-ce, type=source, typeName='source', location='file:/Users/prats/confluent-7.0.1/share/java/confluent-kafka-mqtt/'}, PluginDesc{klass=class org.apache.kafka.connect.tools.SchemaSourceConnector, name='org.apache.kafka.connect.tools.SchemaSourceConnector', version='7.0.1-ce', encodedVersion=7.0.1-ce, type=source, typeName='source', location='file:/Users/prats/confluent-7.0.1/share/java/confluent-kafka-mqtt/'}, PluginDesc{klass=class org.apache.kafka.connect.tools.VerifiableSinkConnector, name='org.apache.kafka.connect.tools.VerifiableSinkConnector', version='7.0.1-ce', encodedVersion=7.0.1-ce, type=source, typeName='source', location='file:/Users/prats/confluent-7.0.1/share/java/confluent-kafka-mqtt/'}, PluginDesc{klass=class org.apache.kafka.connect.tools.VerifiableSourceConnector, name='org.apache.kafka.connect.tools.VerifiableSourceConnector', version='7.0.1-ce', encodedVersion=7.0.1-ce, type=source, typeName='source', location='file:/Users/prats/confluent-7.0.1/share/java/confluent-kafka-mqtt/'}"
} 
---------------------------------------------------------------------------------------------------------------------------------
1 Answers

I was able to solve by going to https://docs.confluent.io/kafka-connectors/self-managed/confluent-hub/client.html#c-hub-client

confluent-hub install debezium/debezium-connector-postgresql:1.9.3
The component can be installed in any of the following Confluent Platform installations: 
  1. /Users/prats/confluent-7.0.1 (based on $CONFLUENT_HOME) 
  2. /Users/prats/confluent-7.0.1 (where this tool is installed) 
Choose one of these to continue the installation (1-2): 1
Do you want to install this into /Users/prats/confluent-7.0.1/share/confluent-hub-components? (yN) y

 
Component's license: 
Apache 2.0 
https://github.com/debezium/debezium/blob/master/LICENSE.txt 
I agree to the software license agreement (yN) y

You are about to install 'debezium-connector-postgresql' from Debezium Community, as published on Confluent Hub. 
Do you want to continue? (yN) y

Downloading component Debezium PostgreSQL CDC Connector 1.9.3, provided by Debezium Community from Confluent Hub and installing into /Users/prats/confluent-7.0.1/share/confluent-hub-components 
Detected Worker's configs: 
  1. Standard: /Users/prats/confluent-7.0.1/etc/kafka/connect-distributed.properties 
  2. Standard: /Users/prats/confluent-7.0.1/etc/kafka/connect-standalone.properties 
  3. Standard: /Users/prats/confluent-7.0.1/etc/schema-registry/connect-avro-distributed.properties 
  4. Standard: /Users/prats/confluent-7.0.1/etc/schema-registry/connect-avro-standalone.properties 
  5. Based on CONFLUENT_CURRENT: /var/folders/kn/4wr9__651l37hckxvnnwt4hh0000gn/T/confluent.218210/connect/connect.properties 
  6. Used by Connect process with PID 41219: /var/folders/kn/4wr9__651l37hckxvnnwt4hh0000gn/T/confluent.218210/connect/connect.properties 
Do you want to update all detected configs? (yN) y

Adding installation directory to plugin path in the following files: 
  /Users/prats/confluent-7.0.1/etc/kafka/connect-distributed.properties 
  /Users/prats/confluent-7.0.1/etc/kafka/connect-standalone.properties 
  /Users/prats/confluent-7.0.1/etc/schema-registry/connect-avro-distributed.properties 
  /Users/prats/confluent-7.0.1/etc/schema-registry/connect-avro-standalone.properties 
  /var/folders/kn/4wr9__651l37hckxvnnwt4hh0000gn/T/confluent.218210/connect/connect.properties 
  /var/folders/kn/4wr9__651l37hckxvnnwt4hh0000gn/T/confluent.218210/connect/connect.properties 
 
Completed 
Related