0 votes
in Programming by (400 points)

I am creating kafka connect for my azure cognitive search but getting some weird error i tried couple of thing but didn't work 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 couple of thing like adding jackson-core-asl-1.9.13.jar this 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 i still getting 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"]}
  ]
}

Please log in or register to answer this question.

...