Can't use hbase-shaded-client jar because of its internal dependency to log4j-1.2.17(CVE-2019-1757)

≡放荡痞女 提交于 2021-02-11 13:52:51

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!