Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-871

Unable to load logback.xml in multiple classloader jvm.

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • None
    • 1.0.13
    • logback-classic
    • None
    • Websphere 6.1

    Description

      If application have multiple classloader ,like Websphere.
      There is a chance that one classloader which load LoggerConext and another load logback.xml. This incident lead to "can NOT find [logback.xml]" message.

      Reproduce problem :
      1.Using spring scheduler which is launched before web sevlets start-> this will produce 2 classloader in single application.

      2. Using shared library which have slf4j & logback jar file.

      after launch , the first classloader is set classpath to shared library . The second one is load class from web's WEB-INF/class which have logback.xml

      After using StatusPrinter.print(lc);
      logback will print "can NOT find [logback.xml]".

      interim solution for me:
      solution 1: copy logback.xml into shared library
      solution 2: change classloader behaviour to single classloader per application.

      Attached file for more info.

      Attachments

        Activity

          People

            logback-dev Logback dev list
            zoftdev ThisadeeP
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: