Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KNOX-3011 - Excluded logback-[core|classic] as transitive dependencies pulled in by Zookeeper #861

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

smolnar82
Copy link
Contributor

What changes were proposed in this pull request?

Before my change, any time I ran a KnoxCLI command I saw the following warning messages wrt. there are multiple SLF4J bindings on the classpath:

$ bin/knoxcli.sh create-master --master gateway
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/sandormolnar/test/knoxGateway/bin/../dep/log4j-slf4j-impl-2.17.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/sandormolnar/test/knoxGateway/bin/../dep/logback-classic-1.2.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Master secret has been persisted to disk.

I also confirmed that we have had ch.qos.logback:logback-[core-classic]:jar:1.2.10 on Maven's dependency tree multiple times.

$ mvn dependency:tree | grep '^.*logback.*1.2.10.*$' | wc -l
      66

How was this patch tested?

  1. Running the previous mvn:dependencyTree command:
$ mvn dependency:tree | grep '^.*logback.*1.2.10.*$' | wc -l
       0
  1. Rebuilt and redeployed Knox, then ran the create-master command:
$ bin/knoxcli.sh create-master --master gateway
Master secret has been persisted to disk.

@smolnar82 smolnar82 requested a review from zeroflag February 27, 2024 11:18
@smolnar82 smolnar82 self-assigned this Feb 27, 2024
@smolnar82 smolnar82 added dependencies Pull requests that update a dependency file Maven labels Feb 27, 2024
@smolnar82 smolnar82 merged commit e1d9bb7 into apache:master Feb 27, 2024
2 checks passed
@smolnar82 smolnar82 deleted the KNOX-3011 branch February 27, 2024 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file Maven
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants