From 7256e9473cea690c373058b88fffd1111870cfe6 Mon Sep 17 00:00:00 2001 From: Lev Zemlyanov Date: Fri, 24 Jul 2020 23:12:05 -0700 Subject: [PATCH] fix reporter to catch NoSuchMethodFoundError instead NoClassDefFoundError (#430) Signed-off-by: Lev Zemlyanov --- .../confluent/connect/elasticsearch/ElasticsearchSinkTask.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/confluent/connect/elasticsearch/ElasticsearchSinkTask.java b/src/main/java/io/confluent/connect/elasticsearch/ElasticsearchSinkTask.java index 7a7dc5280..285df03ea 100644 --- a/src/main/java/io/confluent/connect/elasticsearch/ElasticsearchSinkTask.java +++ b/src/main/java/io/confluent/connect/elasticsearch/ElasticsearchSinkTask.java @@ -146,7 +146,7 @@ public void start(Map props, ElasticsearchClient client) { // may be null if DLQ not enabled builder.setErrantRecordReporter(context.errantRecordReporter()); - } catch (NoClassDefFoundError e) { + } catch (NoClassDefFoundError | NoSuchMethodError e) { // Will occur in Connect runtimes earlier than 2.6 log.warn("AK versions prior to 2.6 do not support the errant record reporter"); }