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.

Different Google guava versions

See original GitHub issue

I want to use your kafka cassandra connector with docker confluentinc/cp-kafka-connect:3.3.0 image. When i run this image without your connector, its started successfully. If i add it to classpath kafka-connect-cassandra-0.3.0-3.3.0-all.jar it throws error.

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:221)
	at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.scanUrlsAndAddPlugins(DelegatingClassLoader.java:198)
        at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.initLoaders(DelegatingClassLoader.java:159)
	at org.apache.kafka.connect.runtime.isolation.Plugins.<init>(Plugins.java:47)
	at org.apache.kafka.connect.cli.ConnectDistributed.main(ConnectDistributed.java:63)

I completely deleted guava from this jar, repack it and provide to kafka connect. Than it starts ok, but if i start you tasks it fails with error:

java.lang.NoSuchMethodError: com.google.common.util.concurrent.Futures.transform(Lcom/google/common/util/concurrent/ListenableFuture;Lcom/google/common/util/concurrent/AsyncFunction;Ljava/util/concurrent/Executor;)Lcom/google/common/util/concurrent/ListenableFuture;
	at com.datastax.driver.core.Connection.initAsync(Connection.java:173)
	at com.datastax.driver.core.Connection$Factory.open(Connection.java:731)
	at com.datastax.driver.core.ControlConnection.tryConnect(ControlConnection.java:251)
	at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:199)
	at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:77)
	at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1414)
	at com.datastax.driver.core.Cluster.init(Cluster.java:162)
	at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:333)
	at com.datastax.driver.core.Cluster.connect(Cluster.java:283)
	at com.datamountaineer.streamreactor.connect.cassandra.CassandraConnection$.getSession(CassandraConnection.scala:65)
	at com.datamountaineer.streamreactor.connect.cassandra.CassandraConnection$.apply(CassandraConnection.scala:35)
	at com.datamountaineer.streamreactor.connect.cassandra.sink.CassandraWriter$$anonfun$1.apply(CassandraWriter.scala:32)
	at com.datamountaineer.streamreactor.connect.cassandra.sink.CassandraWriter$$anonfun$1.apply(CassandraWriter.scala:32)
	at scala.util.Try$.apply(Try.scala:192)
	at com.datamountaineer.streamreactor.connect.cassandra.sink.CassandraWriter$.apply(CassandraWriter.scala:32)
	at com.datamountaineer.streamreactor.connect.cassandra.sink.CassandraSinkTask.start(CassandraSinkTask.scala:58)
	at org.apache.kafka.connect.runtime.WorkerSinkTask.initializeAndStart(WorkerSinkTask.java:232)
	at org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:145)
	at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:146)
	at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:190)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)```

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12

github_iconTop GitHub Comments

2reactions
hleb-albaucommented, Aug 31, 2017

@andrewstevenson I want to say big thanks for your fast answers, you save a lot of my time.

Finally, i managed it. I found at kafka connector docs that, we should use plugin.path property. So, I just added to my compose file and it started!

    environment:
       CONNECT_PLUGIN_PATH: /etc/kafka-connect/custom-plugins
    volumes:
      - ../connectors/ethereum/build/libs/connect/:/etc/kafka-connect/custom-plugins
0reactions
Antwniscommented, Sep 1, 2017

Thanks i’ve filled in #263 in order to rename connector into appropriate template This will be done in the next release, as we are in the process of releasing the entire collection for Kafka 0.10.2 and Kafka 0.11 right now 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Releases · google/guava - GitHub
Releases : google/guava ; 31.1. Feb 28 · v31.1 ; 31.0.1. Sep 27, 2021 · v31.0.1 ; 31.0. Sep 24, 2021 · v31.0...
Read more >
com.google.guava - Maven Repository
Guava is a suite of core and expanded libraries that include utility classes, google's collections, io classes, and much much more. This project...
Read more >
Google Guava - Wikipedia
Google Guava is an open-source set of common libraries for Java, mainly developed by Google engineers. Google Guava. Original author(s), Kevin Bourrillion ...
Read more >
Guava: Google Core Libraries for Java 31.1-jre API - javadoc.io
The EventBus allows publish-subscribe-style communication between components without requiring the components to explicitly register with one another (and ...
Read more >
com.google.guava : guava : 28.2-jre - Maven Central
Guava : Google Core Libraries for Java ; Apache Maven maven.apache.org ; Gradle Groovy DSL gradle.org ; Gradle Kotlin DSL github.com/gradle/kotlin-dsl ; Scala...
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