问题
Is there a way to exclude it.I did give it a try but got ClassNotFoundException: org.apache.log4j.Level I do see that hbase-shaded-client do have slf4j dependency so there might be a way to exclude log4j and use slf4j but I'm not able to.
回答1:
Yes, you can exclude log4j
, but you must add back in log4j-over-slf4j
.
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-client</artifactId>
<version>[some version]</version>
<exclusions>
<exclusion>
<artifactId>log4j</artifactId>
<groupId>log4j</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
<version>[some version]</version>
</dependency>
来源:https://stackoverflow.com/questions/59842903/cant-use-hbase-shaded-client-jar-because-of-its-internal-dependency-to-log4j-1