java.lang.ClassNotFoundException: org.slf4j.LoggerFactory

GitHub | edwardlau | 2 years ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to poroszd , Rafael Fischer Viola and rafael . Or join the community to write better ones.
  1. 0

    Caused by: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

    GitHub | 2 years ago | edwardlau
    java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0
    samebug tip
    A few things cause this exception: 1) Check if you have all jars and if they're in the correct path when running. 2) Your classpath might be broken, you can define it in the command line with "java -cp yourClassPath" or at your IDE if you're using one.
  4. 0
    samebug tip
    If you're using Hibernate, this indicates you're missing FasterXML Classmate dependency, which you can add with the following: <groupId>com.fasterxml</groupId> <artifactId>classmate</artifactId> <version>1.0</version>
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.ClassNotFoundException

    org.slf4j.LoggerFactory

    at java.net.URLClassLoader.findClass()
  2. Java RT
    ClassLoader.loadClass
    1. java.net.URLClassLoader.findClass(URLClassLoader.java:381)[na:1.8.0_60]
    2. java.lang.ClassLoader.loadClass(ClassLoader.java:424)[na:1.8.0_60]
    3. sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)[na:1.8.0_60]
    4. java.lang.ClassLoader.loadClass(ClassLoader.java:357)[na:1.8.0_60]
    4 frames
  3. JBoss Logging 3
    Logger.getMessageLogger
    1. org.jboss.logging.Slf4jLoggerProvider.getLogger(Slf4jLoggerProvider.java:33)[jboss-logging-3.1.0.CR2.jar:3.1.0.CR2]
    2. org.jboss.logging.LoggerProviders.find(LoggerProviders.java:37)[jboss-logging-3.1.0.CR2.jar:3.1.0.CR2]
    3. org.jboss.logging.LoggerProviders.<clinit>(LoggerProviders.java:32)[jboss-logging-3.1.0.CR2.jar:3.1.0.CR2]
    4. org.jboss.logging.Logger.getLogger(Logger.java:2163)[jboss-logging-3.1.0.CR2.jar:3.1.0.CR2]
    5. org.jboss.logging.Logger.getMessageLogger(Logger.java:2259)[jboss-logging-3.1.0.CR2.jar:3.1.0.CR2]
    6. org.jboss.logging.Logger.getMessageLogger(Logger.java:2214)[jboss-logging-3.1.0.CR2.jar:3.1.0.CR2]
    6 frames
  4. Hibernate Validator Engine
    HibernateValidator.createGenericConfiguration
    1. org.hibernate.validator.internal.util.logging.LoggerFactory.make(LoggerFactory.java:28)[hibernate-validator-4.3.0.Final.jar:4.3.0.Final]
    2. org.hibernate.validator.internal.util.Version.<clinit>(Version.java:27)[hibernate-validator-4.3.0.Final.jar:4.3.0.Final]
    3. org.hibernate.validator.internal.engine.ConfigurationImpl.<clinit>(ConfigurationImpl.java:63)[hibernate-validator-4.3.0.Final.jar:4.3.0.Final]
    4. org.hibernate.validator.HibernateValidator.createGenericConfiguration(HibernateValidator.java:41)[hibernate-validator-4.3.0.Final.jar:4.3.0.Final]
    4 frames
  5. JavaEE 7
    Validation$GenericBootstrapImpl.configure
    1. javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:269)[validation-api-1.0.0.GA.jar:na]
    1 frame