Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-12650

jenkins running in Tomcat doesn't initalize slf4j properly

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • ssh-plugin
    • None
    • jenkins 1.450, tomcat 7.0.23, java 1.6.0-30

      when running tomcat, the slf4j library isn't correctly initialized, this is not a problem by itself since it simply turns off logging completely for the components that use slf, however if the logging output is needed for a component it would be better to provide the simple logger.

      SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
      SLF4J: Defaulting to no-operation (NOP) logger implementation
      SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

      when I put the necessary jar into the war, the log output becomes this:

      16 [NullIdDescriptorMonitor.verifyId] INFO org.apache.sshd.common.util.SecurityUtils - Trying to register BouncyCastle as a JCE provider
      511 [NullIdDescriptorMonitor.verifyId] INFO org.apache.sshd.common.util.SecurityUtils - Registration succeeded

      so this is used by the sshd module in the default installation.

      Alternatively, the binding for jdk14 logging or log4j could be used (which ever is more fitting for the rest of jenkins).

          [JENKINS-12650] jenkins running in Tomcat doesn't initalize slf4j properly

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          maven-plugin/pom.xml
          pom.xml
          war/pom.xml
          http://jenkins-ci.org/commit/jenkins/ef1ad6ca29c313fa0b4bc6f5dcd8344046221049
          Log:
          [FIXED JENKINS-12334 JENKINS-12446 JENKINS-12650]

          Bundle slf4j binding to the war.
          See the comment in war/pom.xml for detailed discussion.

          This is fundamentally a "damned if I do, damned if I don't" situation,
          but given that JENKINS-12334 is a fatal error, and the downside of
          bundling the binding jar is "multiple binding" warning, it seems like
          the lesser evil is to bundle it and risk some warnings.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html maven-plugin/pom.xml pom.xml war/pom.xml http://jenkins-ci.org/commit/jenkins/ef1ad6ca29c313fa0b4bc6f5dcd8344046221049 Log: [FIXED JENKINS-12334 JENKINS-12446 JENKINS-12650] Bundle slf4j binding to the war. See the comment in war/pom.xml for detailed discussion. This is fundamentally a "damned if I do, damned if I don't" situation, but given that JENKINS-12334 is a fatal error, and the downside of bundling the binding jar is "multiple binding" warning, it seems like the lesser evil is to bundle it and risk some warnings.

          dogfood added a comment -

          Integrated in jenkins_main_trunk #1526
          [FIXED JENKINS-12334 JENKINS-12446 JENKINS-12650] (Revision ef1ad6ca29c313fa0b4bc6f5dcd8344046221049)

          Result = SUCCESS
          Kohsuke Kawaguchi : ef1ad6ca29c313fa0b4bc6f5dcd8344046221049
          Files :

          • maven-plugin/pom.xml
          • changelog.html
          • pom.xml
          • war/pom.xml

          dogfood added a comment - Integrated in jenkins_main_trunk #1526 [FIXED JENKINS-12334 JENKINS-12446 JENKINS-12650] (Revision ef1ad6ca29c313fa0b4bc6f5dcd8344046221049) Result = SUCCESS Kohsuke Kawaguchi : ef1ad6ca29c313fa0b4bc6f5dcd8344046221049 Files : maven-plugin/pom.xml changelog.html pom.xml war/pom.xml

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          maven-plugin/pom.xml
          pom.xml
          war/pom.xml
          http://jenkins-ci.org/commit/jenkins/7cc71cd78ea5839bec9a4c881c00751dde9b5b5a
          Log:
          [FIXED JENKINS-12334 JENKINS-12446 JENKINS-12650]

          Bundle slf4j binding to the war.
          See the comment in war/pom.xml for detailed discussion.

          This is fundamentally a "damned if I do, damned if I don't" situation,
          but given that JENKINS-12334 is a fatal error, and the downside of
          bundling the binding jar is "multiple binding" warning, it seems like
          the lesser evil is to bundle it and risk some warnings.

          Cherry-picked-from: ef1ad6ca29c313fa0b4bc6f5dcd8344046221049

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: maven-plugin/pom.xml pom.xml war/pom.xml http://jenkins-ci.org/commit/jenkins/7cc71cd78ea5839bec9a4c881c00751dde9b5b5a Log: [FIXED JENKINS-12334 JENKINS-12446 JENKINS-12650] Bundle slf4j binding to the war. See the comment in war/pom.xml for detailed discussion. This is fundamentally a "damned if I do, damned if I don't" situation, but given that JENKINS-12334 is a fatal error, and the downside of bundling the binding jar is "multiple binding" warning, it seems like the lesser evil is to bundle it and risk some warnings. Cherry-picked-from: ef1ad6ca29c313fa0b4bc6f5dcd8344046221049

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          pom.xml
          http://jenkins-ci.org/commit/maven-plugin/40034fea378dba1fee10a57493981a937433dfe6
          Log:
          [FIXED JENKINS-12334 JENKINS-12446 JENKINS-12650]

          Bundle slf4j binding to the war.
          See the comment in war/pom.xml for detailed discussion.

          This is fundamentally a "damned if I do, damned if I don't" situation,
          but given that JENKINS-12334 is a fatal error, and the downside of
          bundling the binding jar is "multiple binding" warning, it seems like
          the lesser evil is to bundle it and risk some warnings.

          Originally-Committed-As: ef1ad6ca29c313fa0b4bc6f5dcd8344046221049

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: pom.xml http://jenkins-ci.org/commit/maven-plugin/40034fea378dba1fee10a57493981a937433dfe6 Log: [FIXED JENKINS-12334 JENKINS-12446 JENKINS-12650] Bundle slf4j binding to the war. See the comment in war/pom.xml for detailed discussion. This is fundamentally a "damned if I do, damned if I don't" situation, but given that JENKINS-12334 is a fatal error, and the downside of bundling the binding jar is "multiple binding" warning, it seems like the lesser evil is to bundle it and risk some warnings. Originally-Committed-As: ef1ad6ca29c313fa0b4bc6f5dcd8344046221049

          Closing fixed issue,

          Łukasz Jąder added a comment - Closing fixed issue,

            kohsuke Kohsuke Kawaguchi
            alexlehm Alex Lehmann
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: