java.lang.NoClassDefFoundError: org/apache/kafka/connect/header/ConnectHeaders
java.lang.NoClassDefFoundError: org/apache/kafka/connect/header/ConnectHeaders
我正在尝试使用 debezium 连接器创建连接器以连接 postgresql 和 kafka。但是我看到了这个错误
[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[=10=](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.
我尝试测试连接器的状态。它说状态失败并出现与上述相同的错误。
Connect Headers 已添加到 Kafka 1.1.0 和 KIP-145
根据评论,您使用的是 Kafka 1.0.2
我正在尝试使用 debezium 连接器创建连接器以连接 postgresql 和 kafka。但是我看到了这个错误
[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[=10=](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.
我尝试测试连接器的状态。它说状态失败并出现与上述相同的错误。
Connect Headers 已添加到 Kafka 1.1.0 和 KIP-145
根据评论,您使用的是 Kafka 1.0.2