Problem using Connector on Cloudera Kafka Connect
ilosamart opened this issue · 2 comments
Hello!
Cloudera Kafka Connect ships with log4j:2.10
, but the elasticsearch.client
which is dependency for this project uses log4j:2.9
. When we try to use this connector an error like this raises:
java.util.ServiceConfigurationError: org.apache.logging.log4j.spi.Provider: Provider org.apache.logging.log4j.core.impl.Log4jProvider not a subtype
It seems a bug in log4j
, ref.: https://issues.apache.org/jira/browse/LOG4J2-2055 . I've explicitly added jog4j
dependencies with version 2.10, like this:
<!-- ... -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.10.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.10.0</version>
</dependency>
<!-- ... -->
Tests have passed, but I don't know if you'll consider this a bug, since it's a behavior occurring in Cloudera's distribution, not in Confluent's.
Any guidance or help would be appreciated :)
Cloudera Kafka right now is not tested/supported by the connector.
However, you might look at this guide:
https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-low-usage-shading.html
Thanks for your help!