0

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.

Yadav
  • 129
  • 1
  • 11
  • Why do you need a shaded client? Also log4j is used as a test dependency, not compilation https://mvnrepository.com/artifact/org.apache.hbase/hbase-client/2.2.3 – OneCricketeer Jan 21 '20 at 14:11

1 Answers1

2

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>
OneCricketeer
  • 179,855
  • 19
  • 132
  • 245