0

I am creating a Kafka Connect connector for my Azure cognitive search but getting an error. Not sure if I am missing any configuration.

Json configuration for connector:

    curl -X POST http://localhost:8083/connectors -H "Content-Type: application/json" -d '{
      "name": "azure-search",
      "config": {
        "topics": "mytopic",
        "tasks.max": "1",
        "connector.class": "io.confluent.connect.azure.search.AzureSearchSinkConnector",
        "confluent.topic.bootstrap.servers": "localhost:9092",
        "confluent.topic.replication.factor": "1",
        "azure.search.service.name": "myazuresearch",
        "index.name": "property-hub-final-out",
        "azure.search.api.key": "<my key>",
        "reporter.bootstrap.servers": "localhost:9092",
        "reporter.error.topic.name": "test-error",
        "reporter.error.topic.replication.factor": "1",
        "reporter.error.topic.key.format": "string",
        "reporter.error.topic.value.format": "string",
        "reporter.result.topic.name": "test-result",
        "reporter.result.topic.key.format": "string",
        "reporter.result.topic.value.format": "string",
        "reporter.result.topic.replication.factor": "1",
        "key.converter": "org.apache.kafka.connect.storage.StringConverter",
        "key.converter.schemas.enable": "false",
        "value.converter": "io.confluent.connect.avro.AvroConverter",
        "value.converter.schema.registry.url": "http://localhost:8081"
      }
    }'

Error:

    tasks": [
    {
    "id": 0,
    "state": "FAILED",
    "worker_id": "192.168.245.73:8083",
    "trace": "java.lang.NoClassDefFoundError: org/codehaus/jackson/node/ValueNode\n\tat io.confluent.connect.avro.AvroConverter.configure(AvroConverter.java:71)\n\tat org.apache.kafka.connect.runtime.isolation.Plugins.newConverter(Plugins.java:298)\n\tat org.apache.kafka.connect.runtime.Worker.startTask(Worker.java:546)\n\tat org.apache.kafka.connect.runtime.distributed.DistributedHerder.startTask(DistributedHerder.java:1290)\n\tat org.apache.kafka.connect.runtime.distributed.DistributedHerder.access$1700(DistributedHerder.java:130)\n\tat org.apache.kafka.connect.runtime.distributed.DistributedHerder$10.call(DistributedHerder.java:1305)\n\tat org.apache.kafka.connect.runtime.distributed.DistributedHerder$10.call(DistributedHerder.java:1301)\n\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat java.base/java.lang.Thread.run(Thread.java:829)\nCaused by: java.lang.ClassNotFoundException: org.codehaus.jackson.node.ValueNode\n\tat java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)\n\tat java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)\n\tat org.apache.kafka.connect.runtime.isolation.PluginClassLoader.loadClass(PluginClassLoader.java:104)\n\tat java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)\n\t... 11 more\n"
    }
    ],

I tried adding jackson-core-asl-1.9.13.jar jar to

/confluent-6.1.1/share/java/kafka
/confluent-6.1.1/share/java/schema-registry
/confluent-6.1.1/share/java/kafka-connect-replicator

but still getting the same error.

Below is the value schema of Kafka message:

    {
      "type": "record",
      "name": "Test",
      "namespace": "com.test.schema",
      "fields": [
        {"name": "client_id", "type": ["null","string"]},
        {"name": "client_name", "type": ["null","string"]}
      ]
    }
David Makogon
  • 69,407
  • 21
  • 141
  • 189
Mohit Singh
  • 401
  • 1
  • 10
  • 30

1 Answers1

0

I'm experiencing the same issue with latest connector version (1.0.4), you can use 1.0.1 version of the connector instead, it does't have this issue.

vdesabou
  • 17
  • 4