Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elasticsearch connector doesn't work - java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableSet #409

Closed
tirelibirefe opened this issue May 26, 2020 · 3 comments

Comments

@tirelibirefe
Copy link

Please look at the comprehensively explanation of the problem:
https://stackoverflow.com/questions/62015340/elasticsearch-connector-doesnt-work-java-lang-noclassdeffounderror-com-googl

"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)\n"

Please advise, am I missing something or anything else?

@tirelibirefe
Copy link
Author

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

COPY guava-20.0.jar /opt/kafka/libs/

@datumgeek
Copy link

Adding missing guava-20.0.jar to /opt/kafka/libs/ at worker node container fixed the problem for me :) :)

@shri3k
Copy link

shri3k commented Jun 4, 2023

I ran into this too and was banging my head for some time. And just an FYI why this happens is I think it's because you possibly downloaded Kafka from Apache's site as opposed to using Confluent's version. I didn't see guava included in Apache's version in their /libs/ directory but did see it in Confluent's docker images.
And last thing, you can get guava from this page but I was able to just do find / -name guava* and copy that from one of the other folder which already had that jar file available there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants