title: Failed to load class "org.slf4j.impl.StaticLoggerBinder", Spring Boot
body: <p>I'm using Spring Boot 1.5.8. SLF4J doesn't seem to be working for me. Here is what I get in the console at the beginning of a project run. The below error shows appears :</p>
  
  <pre><code>SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
  SLF4J: Defaulting to no-operation (NOP) logger implementation
  SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
  </code></pre>
  
  <p><strong>START : EDIT 1 :</strong></p>
  
  <p>My console doesn't log the below:</p>
  
  <pre><code>LOGGER.error("ERROR");
  LOGGER.error("WARN");
  LOGGER.error("INFO");
  LOGGER.error("DEBUG");
  LOGGER.error("TRACE");
  </code></pre>
  
  <p>All I get is those three lines of error(warning) as the first lines in my console.</p>
  
  <p><strong>END : EDIT 1 :</strong></p>
  
  <p>I looked up the internet and found multiple issues titled as this,tried the suggestions but that didn't resolve my issue. I came across this <a href="https://stackoverflow.com/questions/13828719/failed-to-load-class-org-slf4j-impl-staticloggerbinder-which-classpath">stackoverflow question</a> where Konstantinos hints at the possibility of presence of multiple slf4j dependencies. Other solutions on the internet also suggested that; even the official site confirmed that to be the reason for such error.    </p>
  
  <p>Also checked my effective pom just to eliminate this possibility and found that my effective pom does contain all the 4 dependencies that he mentioned. The general suggestion is that the pom should contain only one of these four dependencies.  But , since this was all handled by Spring boot, I'm a bit confused as to how do I go about resolving this, because I never exclusively included any slf4j dependency in my pom. So I'm unable to follow the suggestion.</p>
  
  <p><strong>pom.xml:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;com.codingethics.flightreservation&lt;/groupId&gt;
      &lt;artifactId&gt;flightreservation&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
  
      &lt;name&gt;flightreservation&lt;/name&gt;
      &lt;description&gt;Flight Reservation Application&lt;/description&gt;
  
      &lt;parent&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;1.5.8.RELEASE&lt;/version&gt;
          &lt;relativePath /&gt; &lt;!-- lookup parent from repository --&gt;
      &lt;/parent&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;!-- https://mvnrepository.com/artifact/org.apache.tomcat.embed/tomcat-embed-jasper --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.tomcat.embed&lt;/groupId&gt;
              &lt;artifactId&gt;tomcat-embed-jasper&lt;/artifactId&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- https://mvnrepository.com/artifact/javax.servlet/jstl --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
              &lt;artifactId&gt;jstl&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;mysql&lt;/groupId&gt;
              &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- https://mvnrepository.com/artifact/com.itextpdf/itextpdf --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.itextpdf&lt;/groupId&gt;
              &lt;artifactId&gt;itextpdf&lt;/artifactId&gt;
              &lt;version&gt;5.5.13&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-mail --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-mail&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  
  &lt;/project&gt;
  </code></pre>
  
  <p><strong>application.properties :</strong></p>
  
  <pre><code>spring.datasource.url=jdbc:mysql://localhost:3306/reservation
  spring.datasource.username=root
  spring.datasource.password=password
  
  spring.jpa.show-sql=true
  
  spring.mvc.view.prefix=/WEB-INF/jsps/
  spring.mvc.view.suffix=.jsp
  
  server.context-path=/flightreservation
  
  spring.mail.host=smtp.gmail.com
  spring.mail.port=587
  spring.mail.username=&lt;myusername&gt;
  spring.mail.password=&lt;mypwd&gt;
  spring.mail.properties.mail.smtp.auth=true
  spring.mail.properties.mail.smtp.starttls.enable=true
  spring.mail.properties.mail.smtp.starttls.required=true
  </code></pre>
  
  <p>Why does this dependency-conflict(if at all that's the case here) happen in a Spring Boot project. Isn't Spring Boot meant to be looking after these beforehand.  </p>
  
  <p>Any sort of help/ guidance is highly appreciated.</p>
  
  <p><strong>START : EDIT for @Antot</strong> </p>
  
  <p>I get NoClassDefFoundError.(followed steps as advised by you) :</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
      at org.springframework.boot.SpringApplication.&lt;clinit&gt;(SpringApplication.java:179)
      at com.codingethics.flightreservation.FlightreservationApplication.main(FlightreservationApplication.java:10)
  Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
      at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      ... 2 more
  </code></pre>
  
  <p><strong>END : EDIT for @Antot</strong></p>