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

Logback throws NP Exception when trying to use groovy configuration file.

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 0.9.29
    • logback-classic
    • None

    Description

      If logback jars (logback-claaic and logback-core) are located in endorsed libraries ( -Djava.endorsed.dirs) its not possible to use a logback configuration url that ends with groovy.

      This is because of line 23 in ch.qos.logback.classic.util.EnvUtil

      ClassLoader classLoader = EnvUtil.class.getClassLoader();

      witch return null if called from endorsed libraries.

      It should work if you change it to

      ClassLoader classLoader = EnvUtil.class.getClassLoader();
      if (classLoader == null)
      classLoader = ClassLoader.getSystemClassLoader();

      I have not been able to verify this fix since I am not able to build logback

      Attachments

        Activity

          People

            logback-dev Logback dev list
            webmarck Nicolai Marck Ă˜dum
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: