You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2024/02/27 11:19:00 UTC

[jira] [Work logged] (KNOX-3011) Resolve duplicated SL4J on classpath issue

     [ https://issues.apache.org/jira/browse/KNOX-3011?focusedWorklogId=907147&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-907147 ]

ASF GitHub Bot logged work on KNOX-3011:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 27/Feb/24 11:18
            Start Date: 27/Feb/24 11:18
    Worklog Time Spent: 10m 
      Work Description: smolnar82 opened a new pull request, #861:
URL: https://github.com/apache/knox/pull/861

   ## 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
   ```
   2. Rebuilt and redeployed Knox, then ran the `create-master` command:
   ```
   $ bin/knoxcli.sh create-master --master gateway
   Master secret has been persisted to disk.
   ```
   




Issue Time Tracking
-------------------

            Worklog Id:     (was: 907147)
    Remaining Estimate: 0h
            Time Spent: 10m

> Resolve duplicated SL4J on classpath issue
> ------------------------------------------
>
>                 Key: KNOX-3011
>                 URL: https://issues.apache.org/jira/browse/KNOX-3011
>             Project: Apache Knox
>          Issue Type: Improvement
>    Affects Versions: 2.1.0
>            Reporter: Sandor Molnar
>            Assignee: Sandor Molnar
>            Priority: Major
>             Fix For: 2.1.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Any time I run a KnoxCLI command, it always starts with the following warning messages displayed on my terminal:
> {noformat}
> 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]
> {noformat}
> The reason behind this warning is that Zookeeper pulls in outdated {{logback}} dependencies which we should exclude.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)