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

Not compatible with Kafka 3.8 libraries #781

Closed
dpiddock opened this issue Sep 3, 2024 · 6 comments · Fixed by #810
Closed

Not compatible with Kafka 3.8 libraries #781

dpiddock opened this issue Sep 3, 2024 · 6 comments · Fixed by #810

Comments

@dpiddock
Copy link

dpiddock commented Sep 3, 2024

We tried upgrading our client libraries to Kafka 3.8 and started to get an exception:

Task threw an uncaught and unrecoverable exception. Task is being killed and will not recover until manually restarted (org.apache.kafka.connect.runtime.WorkerTask:233)
java.lang.NoClassDefFoundError: Could not initialize class io.confluent.connect.s3.S3SinkConnectorConfig$CannedAclValidator
	at io.confluent.connect.s3.S3SinkConnectorConfig.newConfigDef(S3SinkConnectorConfig.java:467)
	at io.confluent.connect.s3.S3SinkConnectorConfig.<init>(S3SinkConnectorConfig.java:839)
	at io.confluent.connect.s3.S3SinkTask.start(S3SinkTask.java:100)
	at org.apache.kafka.connect.runtime.WorkerSinkTask.initializeAndStart(WorkerSinkTask.java:323)
	at org.apache.kafka.connect.runtime.WorkerTask.doStart(WorkerTask.java:175)
	at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:224)
	at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:280)
	at org.apache.kafka.connect.runtime.isolation.Plugins.lambda$withClassLoader$1(Plugins.java:237)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.NoSuchMethodError: 'java.lang.String org.apache.kafka.common.utils.Utils.join(java.util.Collection, java.lang.String)' [in thread "task-thread-backup-events-to-s3-113"]
	at io.confluent.connect.s3.S3SinkConnectorConfig$CannedAclValidator.<clinit>(S3SinkConnectorConfig.java:1222)
	... 13 more

Kafka common.utils.Utils since 3.8.0 has removed the join method and replaced all uses with String.join() in apache/kafka#15823

@Exeu
Copy link

Exeu commented Oct 28, 2024

I have the same issue.
@dpiddock did you find any workaround for this?

@dpiddock
Copy link
Author

We have kept client libraries on Kafka 3.7.x.

@marcelstoer
Copy link

I ran into an argument with the Kafka maintainers over why they removed a public method (Utils.join()) in a minor release as it's a breaking change. Turns out they consider the whole org.apache.kafka.common.utils package "internal".

@juanAmayaRamirez
Copy link

this seems weird, I am using some connectors that suddenly broke due to this change...

enzo-cappa added a commit to enzo-cappa/kafka-connect-storage-cloud that referenced this issue Dec 31, 2024
The Kafka commons Utils class removed the "join" method in apache/kafka#15823 in Kafka 3.8. Due to this reason the connector stopped working on Kafka Connect 3.8 as well.

Following the example in the upstream PR, I'm replacing the usage of Utils.join with the JDK API of String.join, and updating the code accordingly.

This fixes confluentinc#781
@enzo-cappa
Copy link
Contributor

Hello, I've created #804 to address this issue. Hopefully it can be merged.
Thanks

@nitishkumar71
Copy link

nitishkumar71 commented Jan 14, 2025

For the time being which version from the release can be used to avoid this issue?

enzo-cappa added a commit to enzo-cappa/kafka-connect-storage-cloud that referenced this issue Jan 17, 2025
The Kafka commons Utils class removed the "join" method in
apache/kafka#15823 in Kafka 3.8. Due to this reason the connector
stopped working on Kafka Connect 3.8 as well.

Following the example in the upstream PR, I'm replacing the usage of
Utils.join with the JDK API of String.join, and updating the code
accordingly.

This is a new version of PR 804, but rebased for 10.0.x. Fixes confluentinc#781
enzo-cappa added a commit to enzo-cappa/kafka-connect-storage-cloud that referenced this issue Jan 17, 2025
The Kafka commons Utils class removed the "join" method in
apache/kafka#15823 in Kafka 3.8. Due to this reason the connector
stopped working on Kafka Connect 3.8 as well.

Following the example in the upstream PR, I'm replacing the usage of
Utils.join with the JDK API of String.join, and updating the code
accordingly.

This is a new version of PR 804, but rebased for 10.0.x. Fixes confluentinc#781
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants