[Question] Elastic Connector - Caused by: java.lang.ClassNotFoundException: com.google.common.collect.ImmutableSet
See original GitHub issueHello; I’m trying to install ElasticSearch Connector via Strimzi. My Docker image contains Elastic plugin.
devadmin@vdi-mk2-ubn:~/kafka$ kubectl exec -i kafka-beytepe-kafka-0 -n kafka -- curl -s -XGET http://mssql-minio-connect-cluster-connect-api:8083/connector-plugins|jq '.[].class'
Defaulting container name to kafka.
Use 'kubectl describe pod/kafka-beytepe-kafka-0 -n kafka' to see all of the containers in this pod.
"io.confluent.connect.elasticsearch.ElasticsearchSinkConnector"
"io.confluent.connect.s3.S3SinkConnector"
"io.confluent.connect.storage.tools.SchemaSourceConnector"
"io.debezium.connector.sqlserver.SqlServerConnector"
"org.apache.kafka.connect.file.FileStreamSinkConnector"
"org.apache.kafka.connect.file.FileStreamSourceConnector"
"org.apache.kafka.connect.mirror.MirrorCheckpointConnector"
"org.apache.kafka.connect.mirror.MirrorHeartbeatConnector"
"org.apache.kafka.connect.mirror.MirrorSourceConnector"
"uk.co.threefi.connect.shell.ShellSinkConnector"
…but when I fire up the connector, the following execption is throwed.
` "name": "elastic-files-connector",
"connector": {
"state": "RUNNING",
"worker_id": "10.244.1.39:8083"
},
"tasks": [
{
"id": 0,
"state": "FAILED",
"worker_id": "10.244.1.39:8083",
"trace": "java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableSet\n\tat io.searchbox.client.AbstractJestClient.<init>(AbstractJestClient.java:38)\n\tat io.searchbox.client.http.JestHttpClient.<init>(JestHttpClient.java:43)\n\tat io.searchbox.client.JestClientFactory.getObject(JestClientFactory.java:51)\n\tat io.confluent.connect.elasticsearch.jest.JestElasticsearchClient.<init>(JestElasticsearchClient.java:149)\n\tat io.confluent.connect.elasticsearch.jest.JestElasticsearchClient.<init>(JestElasticsearchClient.java:141)\n\tat io.confluent.connect.elasticsearch.ElasticsearchSinkTask.start(ElasticsearchSinkTask.java:122)\n\tat io.confluent.connect.elasticsearch.ElasticsearchSinkTask.start(ElasticsearchSinkTask.java:51)\n\tat org.apache.kafka.connect.runtime.WorkerSinkTask.initializeAndStart(WorkerSinkTask.java:305)\n\tat org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:193)\n\tat org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:184)\n\tat org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:234)\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat java.lang.Thread.run(Thread.java:748)\nCaused by: java.lang.ClassNotFoundException: com.google.common.collect.ImmutableSet\n\tat java.net.URLClassLoader.findClass(URLClassLoader.java:382)\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:418)\n\tat org.apache.kafka.connect.runtime.isolation.PluginClassLoader.loadClass(PluginClassLoader.java:104)\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:351)\n\t... 16 more\n"
}
],
"type": "sink"
}`
I think If it’s CLASSPATH issue, the first command wouldn’t list available connector, isn’t it? I need to your help again.
Thanks & Regards
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (3 by maintainers)
Top Results From Across the Web
kubernetes - elasticsearch connector doesn't work - java.lang ...
elasticsearch connector doesn't work - java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableSet ; $ curl -u ; "elastic: ...
Read more >getting error in testng java lang NoClassDefFoundError com ...
getting this error java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableMap here is the code: package testngpkg;
Read more >Diff - gerrit - Google Git
+ +package com.google.gerrit.elasticsearch; + +import com.google.common.base.Joiner; +import java.util.regex.Pattern; + +public enum ElasticVersion { + ...
Read more >Sign In - Talend Community
I have this error: Exception in thread "Thread-1" java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableMap.
Read more >Diff - gerrit - Google Git
socketTimeout:: ++ +Sets the timeout for the underlying connection. ... A common use of plugins is to have +Gerrit interoperate with site-specific tools, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you all guys! Adding missing
guava-20.0.jar
to/opt/kafka/libs/
at worker node container fixed the problem. My environment is; Strimzi 0.18 Kafka 2.5.0@wtayyeb If you look at my detaily explanation here
[https://stackoverflow.com/questions/62015340/elasticsearch-connector-doesnt-work-java-lang-noclassdeffounderror-com-googl](https://stackoverflow.com/questions/62015340/elasticsearch-connector-doesnt-work-java-lang-noclassdeffounderror-com-googl)
, I’ve already added guava and also other missing jars to the worker at the same folder with existing jars. It’s sad that it didn’t work.