由于其对log4j-1.2.17(CVE-2019-1757)的内部依赖性,因此无法使用hbase-shaded-client jar [英] Can't use hbase-shaded-client jar because of its internal dependency to log4j-1.2.17(CVE-2019-1757)

查看:84
本文介绍了由于其对log4j-1.2.17(CVE-2019-1757)的内部依赖性,因此无法使用hbase-shaded-client jar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种排除它的方法.我确实尝试了一下,但遇到了ClassNotFoundException:org.apache.log4j.Level我确实看到hbase-shaded-client确实具有slf4j依赖性,因此可能有一种排除log4j并使用slf4j的方法,但是我无法.

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.

推荐答案

是的,您可以排除 log4j ,但是必须重新添加 log4j-over-slf4j .

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>

这篇关于由于其对log4j-1.2.17(CVE-2019-1757)的内部依赖性,因此无法使用hbase-shaded-client jar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆