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

Replacing log4j with log4j-over-slf4j break code that use log4j

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Critical Critical
    • core
    • jenkins-1.622

      In the jenkins-1.622 log4j was suddenly replaced by log4j-over-slf4j without any warning or even mention in the release notes.

      log4j-over-slf4j jar has only partial implementation of log4j classes and interfaces. Many are absent or have an empty implementation.
      That breaks plugins that use log4j.

      I got the following errors:

      java.lang.NoSuchMethodError: org.apache.log4j.WriterAppender.<init>(Lorg/apache/log4j/Layout;Ljava/io/OutputStream;)V

      java.lang.NoSuchMethodError: org.apache.log4j.Logger.removeAppender(Lorg/apache/log4j/Appender;)V

      It is possible to work around by using <pluginFirstClassLoader>true</pluginFirstClassLoader> , but that solution can potentially lead to classloading issues.

            Unassigned Unassigned
            sergeyk Sergey Kadaner
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: