question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MongoDB Sink - Exception UnmodifiableIterator

See original GitHub issue

Hi,

I’ve download the Mongo Sink (for Kafka version 1.0) from here: https://lenses.stream/connectors/sink/mongo.html

I’ve extracted the JAR out and created a docker image with the base FROM confluentinc/cp-kafka-connect:4.0.0 with the single jar from the MongoSink in the folder: /usr/share/java/.

In my docker-compose I then set the plugin path (as per Confluent documentation) using: CONNECT_PLUGIN_PATH: /usr/share/java/

However I keep getting the error:

[2018-04-25 03:33:54,806] INFO Loading plugin from: /usr/share/java/kafka-connect-mongodb-1.0.0-1.0.0-all.jar (org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader)
[2018-04-25 03:34:19,526] INFO Reflections took 24380 ms to scan 1 urls, producing 6252 keys and 49763 values  (org.reflections.Reflections)
Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.collect.Sets$SetView.iterator()Lcom/google/common/collect/UnmodifiableIterator;
	at org.reflections.Reflections.expandSuperTypes(Reflections.java:380)
	at org.reflections.Reflections.<init>(Reflections.java:126)
	at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.scanPluginPath(DelegatingClassLoader.java:258)
	at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.scanUrlsAndAddPlugins(DelegatingClassLoader.java:201)
	at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.registerPlugin(DelegatingClassLoader.java:193)
	at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.initLoaders(DelegatingClassLoader.java:153)
	at org.apache.kafka.connect.runtime.isolation.Plugins.<init>(Plugins.java:47)
	at org.apache.kafka.connect.cli.ConnectDistributed.main(ConnectDistributed.java:70)

Any ideas what is wrong?

Are there other dependencies/JARs i need to have?

Thanks.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
psmod2commented, May 2, 2018

@Antwnis - Also FYI - I’m placing the JARs within a docker image with the following as the base:

FROM confluentinc/cp-kafka-connect:4.0.0

And within its etc/kafka-connect/jars/ folder I noticed guava-18.0.jar. Is this the issue - should it be version 20? If so I presume my only option is to use a more recent version of the docker image FROM confluentinc/cp-kafka-connect:4.0.0 ?

0reactions
andrewstevensoncommented, Mar 25, 2020

closing due to inactivity

Read more comments on GitHub >

github_iconTop Results From Across the Web

MongoDB Sink - Exception UnmodifiableIterator · Issue #428 ...
Hi, I've download the Mongo Sink (for Kafka version 1.0) from here: https://lenses.stream/connectors/sink/mongo.html I've extracted the JAR out and created ...
Read more >
Error Handling — MongoDB Kafka Connector
In this guide, you can learn how to handle errors in your sink connector. ... To learn about the exceptions your connector defines...
Read more >
Kafka MongoDB sink Connector exception handling
I have created a connector from Kafka to MongoDB to sink the data. In some cases, there is a case in which I...
Read more >
https://network.pivotal.io/open-source/download?pr...
... go.mongodb.org/mongo-driver-v1.9.0 ... Commons Attribution 2.5 >>> GNU General Public License v2.0 w/Classpath exception >>> Mozilla Public License, ...
Read more >
Download hive-exec-0.13.0.jar file - Java2s.com
UnmodifiableIterator.class com.google.common.collect. ... ExceptionUtils.class org.apache.commons.lang.exception.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found