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.

Broken shaded internal in kafka sender

See original GitHub issue

Bundled version of LazyCloseable in kafka-sender 1.0.2 is broken :

...
   public void close() throws IOException {
      T maybeNull = this.maybeNull();
      if (maybeNull != null) {
         Util.checkArgument(maybeNull instanceof Closeable, "Override close() to close " + maybeNull, new Object[0]);
         ((Closeable)maybeNull).close();
      }
   }
...

In the close method, the Util class is not imported neither shaded in the jar. This leads to a ClassNotFoundException when calling this method.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
codefromthecryptcommented, Sep 10, 2017

Oh ok 😃 I see that you removed the usage of Util.

yeah it was an oversight and this problem could bite other libraries, too… Thanks for the shade fix, though!

1reaction
codefromthecryptcommented, Sep 10, 2017

thanks will fix

Read more comments on GitHub >

github_iconTop Results From Across the Web

org.apache.kafka.common.KafkaException: Failed to construct ...
It has nothing to do with your configuration; it's a class loader problem. Use -verbose JVM arg to see which jars classes are...
Read more >
Documentation - Apache Kafka
The internal Kafka Streams producer retries default value was changed from 0 to 10. The internal Kafka Streams consumer max.poll.interval.ms default value ...
Read more >
MirrorMaker2 throwing error - NOT_ENOUGH_REPLICAS
I'm running Kafka version 3.0.0 on AKS clusters. The Kafka Cluster definition that I'm using for both the clusters is -.
Read more >
Top 5 Things Every Apache Kafka Developer Should Know
However, records aren't stored in one big file but are broken up into segments by partition where the offset order is continuous across...
Read more >
Sender · The Internals of Apache Kafka
Sender is created when KafkaProducer is created and immediately started under the name kafka-producer-network-thread | [clientId] (as a daemon thread).
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