Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
886 views
in Technique[技术] by (71.8m points)

postgresql - java.lang.NoClassDefFoundError: org/apache/kafka/connect/header/ConnectHeaders

I am trying to create a connector using debezium connector to postgresql and kafka connect. But am seeing this error

[2020-12-31 21:52:20,251] ERROR Producer failure (io.debezium.pipeline.ErrorHandler:31)
java.lang.RuntimeException: java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError: org/apache/kafka/connect/header/ConnectHeaders
ERROR WorkerSourceTask{id=test-connector-poc-0} Task threw an uncaught and unrecoverable exception (org.apache.kafka.connect.runtime.WorkerTask:172)
org.apache.kafka.connect.errors.ConnectException: An exception occurred in the change event producer. This connector will be stopped.
        at io.debezium.pipeline.ErrorHandler.setProducerThrowable(ErrorHandler.java:42)
        at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:117)
        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:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError: org/apache/kafka/connect/header/ConnectHeaders.

I tried testing the status of the connector. It says status failed with the same error as above.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Connect Headers were added in Kafka 1.1.0 with KIP-145

According to the comments, you're using Kafka 1.0.2


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...