Failed to find any class that implements Connector

592 views
Skip to first unread message

Taras Kloba

unread,
Jun 29, 2018, 4:27:36 PM6/29/18
to Confluent Platform

Hello,
Please help with configuration "CloudPubSubSinkConnector".

I have a very weird situation.

I have built PubSub connector from source on Centos 7 with following commands:

sudo yum install -y wget
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
sudo yum install -y apache-maven
mvn --version

cd ~
sudo yum install -y git
git clone --recursive https://github.com/GoogleCloudPlatform/cloud-pubsub-kafka
cd cloud-pubsub-kafka/kafka-connector

mvn package

Than I have copied everything from folder 'target' to '/usr/share/java' (this folder is configured in /etc/kafka/connect-distributed.properties as plugin.path).

Restarted confluent-kafka-connect service.

And after loading, I have checked connector-plugins URL (http://localhost:8083/connector-plugins). And in this page, I have information about my loaded Kafka Connect Plugins.

[{"class":"com.google.pubsub.kafka.sink.CloudPubSubSinkConnector","type":"sink","version":"1.1.1-cp1"},{"class":"com.google.pubsub.kafka.source.CloudPubSubSourceConnector","type":"source","version":"1.1.1-cp1"},{"class":"io.confluent.connect.activemq.ActiveMQSourceConnector","type":"source","version":"4.1.1"},{"class":"io.confluent.connect.elasticsearch.ElasticsearchSinkConnector","type":"sink","version":"4.1.1"},{"class":"io.confluent.connect.hdfs.HdfsSinkConnector","type":"sink","version":"4.1.1"},{"class":"io.confluent.connect.hdfs.tools.SchemaSourceConnector","type":"source","version":"1.1.1-cp1"},{"class":"io.confluent.connect.ibm.mq.IbmMQSourceConnector","type":"source","version":"4.1.1"},{"class":"io.confluent.connect.jdbc.JdbcSinkConnector","type":"sink","version":"4.1.1"},{"class":"io.confluent.connect.jdbc.JdbcSourceConnector","type":"source","version":"4.1.1"},{"class":"io.confluent.connect.jms.JmsSourceConnector","type":"source","version":"4.1.1"},{"class":"io.confluent.connect.replicator.ReplicatorSourceConnector","type":"source","version":"4.1.1"},{"class":"io.confluent.connect.s3.S3SinkConnector","type":"sink","version":"4.1.1"},{"class":"io.confluent.connect.storage.tools.SchemaSourceConnector","type":"source","version":"1.1.1-cp1"},{"class":"org.apache.kafka.connect.file.FileStreamSinkConnector","type":"sink","version":"1.1.1-cp1"},{"class":"org.apache.kafka.connect.file.FileStreamSourceConnector","type":"source","version":"1.1.1-cp1"}]

But when I am trying to create new connector with following command:
curl -X POST \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -d '{ "name": "pubsub_test", "config": { "connector.class": "com.google.pubsub.kafka.sink.CloudPubSubSinkConnector", "tasks.max": "1", "topics": "kafka_test_topic", "cps.topic": "pubsub_test_topic", "cps.project": "pubsub_test_project" } }' http://localhost:8083/connectors

I see following information:
{"error_code":500,"message":"Failed to find any class that implements Connector and which name matches com.google.pubsub.kafka.sink.CloudPubSubSinkConnector

Amit Sahu

unread,
Jul 13, 2018, 4:03:01 PM7/13/18
to confluent...@googlegroups.com
Hi, 
Your class names are not matching, it is throwing that error, as it is not able to find the deployed jar with the class name you provided with your curl command. 

Regards, 
Amit 

--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platform+unsub...@googlegroups.com.
To post to this group, send email to confluent-platform@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/68a68ea4-5fe3-470e-99e5-b6f9983928bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages