1 Reply Latest reply on Nov 25, 2011 5:24 AM by alesj

    Class path contains multiple SLF4J bindings

    jc.thalys

      Please, I have a big problem and would like to see if anyone here could help me, well researched and have not even found a good solution.

       

      I'm trying to upgrade from jboss 4.3.2 to 5.1.0 and I have this problem of implementation of slf4j, I've seen several forums on the Internet but didn't see a more plausible solution, I wonder if anyone has done this in some way and I could help.

       

      I would like to prioritize the application classloader and thus believe that these problems would not have...

       

       

      16:20:36,437 ERROR [STDERR] SLF4J: Class path contains multiple SLF4J bindings.
      16:20:36,437 ERROR [STDERR] SLF4J: Found binding in [vfszip:/C:/Development/Tools/Jboss/5.1.0/server/default/deploy/acsele-DEVELOPMENT.DO-NO-SVN-INFO-20111124.ear/acsele-DEVELOPMENT.DO-NO-SVN-INFO-20111124.war/WEB-INF/lib/logback-classic-1.0.0.jar/org/slf4j/impl/StaticLoggerBinder.class]
      16:20:36,437 ERROR [STDERR] SLF4J: Found binding in [vfszip:/C:/Development/Tools/Jboss/5.1.0/common/lib/slf4j-jboss-logging.jar/org/slf4j/impl/StaticLoggerBinder.class]
      16:20:36,437 ERROR [STDERR] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
      16:20:36,468 ERROR [STDERR] Failed to auto configure default logger context
      16:20:36,468 ERROR [STDERR] Reported exception:
      16:20:36,468 ERROR [STDERR] ch.qos.logback.core.joran.spi.JoranException: Parser configuration error occurred
      16:20:36,468 ERROR [STDERR]     at ch.qos.logback.core.joran.event.SaxEventRecorder.buildSaxParser(SaxEventRecorder.java:86)
      16:20:36,468 ERROR [STDERR]     at ch.qos.logback.core.joran.event.SaxEventRecorder.recordEvents(SaxEventRecorder.java:57)
      16:20:36,468 ERROR [STDERR]     at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:132)
      16:20:36,468 ERROR [STDERR]     at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:96)
      16:20:36,468 ERROR [STDERR]     at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:55)
      16:20:36,468 ERROR [STDERR]     at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
      16:20:36,468 ERROR [STDERR]     at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:148)
      16:20:36,484 ERROR [STDERR]     at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
      
      

       

      Thanks in advance

        • 1. Re: Class path contains multiple SLF4J bindings
          alesj

          The app classloader is already checked first -- as you can see from print.

          But I guess that code checks *all* binding resources, hence finding JBoss' slf4j as well.

          You need to filter out slf4j lookups from your app -- which then might lead to other weird behavior.

          And also, with 5.1. you don't have a declarative way of filtering between CL domains; we only added than later, in AS 6.1.

          (but you can do it programmatically ...)