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

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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.

            Assignee:
            Unassigned
            Reporter:
            Sergey Kadaner
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: