Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-204

java.lang.NoClassDefFoundError: org/slf4j/spi/LocationAwareLogger

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 2.0-beta4
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:

      Description

      Very simple source:

      package loggerimpl;

      import org.apache.logging.log4j.LogManager;
      import org.apache.logging.log4j.Logger;

      public class LoggerImpl {
      private static Logger logg = LogManager.getLogger(LoggerImpl.class.getName());

      public static void main(String[] args)

      { logg.info("Pierwsze info"); logg.debug("Drugi debug"); logg.warn("Trzeci warning"); logg.trace("Czwarty trace"); logg.error("Piąty ERROR"); logg.fatal("Szósty F A T A L"); }

      }

      produces error:

      java.lang.NoClassDefFoundError: org/slf4j/spi/LocationAwareLogger
      at org.apache.logging.slf4j.SLF4JLoggerContext.getLogger(SLF4JLoggerContext.java:39)
      at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:342)
      at loggerimpl.LoggerImpl.<clinit>(LoggerImpl.java:11)
      Caused by: java.lang.ClassNotFoundException: org.slf4j.spi.LocationAwareLogger
      at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
      .. 3 more
      Exception in thread "main" Java Result: 1

      I can't find in bins/sources org.slf4j.spi.LocationAwareLogger

      Regards
      Wojciech Zaręba

        Attachments

        1. error.log
          77 kB
          Wojciech Zaręba

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                wojtekz_ Wojciech Zaręba
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: