Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-8954

SLF4J: Class path contains multiple SLF4J bindings" warnings

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Undefined Undefined
    • None
    • AMQ 7.11.6.GA
    • console
    • None
    • False
    • None
    • False
    • Workaround Exists
    • Hide

      NOTE The warning emitted by SLF4J is just that, a warning. Even when multiple bindings are present, SLF4J will pick one logging framework/implementation and bind with it. The way SLF4J picks a binding is determined by the JVM and for all practical purposes should be considered random. As of version 1.6.6, SLF4J will name the framework/implementation class it is actually bound to.

       

      Show
      NOTE The warning emitted by SLF4J is just that, a warning. Even when multiple bindings are present, SLF4J will pick one logging framework/implementation and bind with it. The way SLF4J picks a binding is determined by the JVM and for all practical purposes should be considered random. As of version 1.6.6, SLF4J will name the framework/implementation class it is actually bound to.  
    • Low

      During the start up, we encountered: 

      SLF4J: Class path contains multiple SLF4J bindings.
      SLF4J: Found binding in [jar:file:/broker7116/tmp/webapps/jetty-localhost-8161-hawtio_war-_console-_Connector-0-17775834467743855108/webapp/WEB-INF/lib/log4j-slf4j-impl-2.20.0.redhat-00002.jar!/org/slf4j/impl/StaticLoggerBinder.class]
      SLF4J: Found binding in [jar:file:/amq-broker-7.11.6/apache-artemis-2.28.0.redhat-00019/lib/log4j-slf4j-impl-2.19.0.redhat-00001.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]
      

       

      Two versions of jars shipped with AMQ 7.11.6 and broker throwing " SLF4J: Class path contains multiple SLF4J bindings" warnings.

      AMQ 7.1.6 Venial Version SLF4J jar:
      -----------------------
      amq-broker-7.11.6-bin/apache-artemis-2.28.0.redhat-00019/lib
      $ ls -lart log4j*
      rw-rr-. 1  24445 Jan 31 2023 log4j-slf4j-impl-2.19.0.redhat-00001.jar
       
      /amq-broker-7.11.6-bin/apache-artemis-2.28.0.redhat-00019/web/hawtio/WEB-INF/lib
      $ ls -lart log4*
      rw-rr-. 1    23907 Jun 16  2023 log4j-slf4j-impl-2.20.0.redhat-00002.jar
      rw-rr-. 1  1847605 Jun 16  2023 log4j-core-2.20.0.redhat-00002.jar
      rw-rr-. 1   313334 Jun 16  2023 log4j-api-2.20.0.redhat-00002.jar
      

       

              dbruscin Domenico Francesco Bruscino
              rhn-support-mthippar Mallikarjuna Thippareddy
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: