title: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory Spring boot 1.5.2 maven
body: <p>i'm following this tutorial <a href="https://spring.io/guides/gs/rest-service/" rel="nofollow noreferrer">https://spring.io/guides/gs/rest-service/</a> to build a restful application. when i run this app (run as spring boot application) from spring tool suite it throwing error :</p>
  
  <pre><code>Caused by: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
          at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
          at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132)
          at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:273)
          at org.springframework.boot.SpringApplication.&lt;clinit&gt;(SpringApplication.java:190)
          at webapp.Application.main(Application.java:9)
          ... 6 more
  Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
  </code></pre>
  
  <p>same error also happen when i tried to use the project initializr (<a href="https://start.spring.io/" rel="nofollow noreferrer">https://start.spring.io/</a>). </p>
  
  <p>my pom.xml is exact like the tutorial :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  </code></pre>
  
  <p>http://maven.apache.org/xsd/maven-4.0.0.xsd">
      4.0.0</p>
  
  <pre><code>&lt;groupId&gt;com.rondox.sb.restfulws&lt;/groupId&gt;
  &lt;artifactId&gt;wawa&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;jar&lt;/packaging&gt;
  
  &lt;name&gt;wawa&lt;/name&gt;
  &lt;description&gt;Demo project for Spring Boot&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.2.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-web&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;dependency&gt;
          &lt;groupId&gt;com.jayway.jsonpath&lt;/groupId&gt;
          &lt;artifactId&gt;json-path&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;repositories&gt;
      &lt;repository&gt;
          &lt;id&gt;spring-releases&lt;/id&gt;
          &lt;url&gt;https://repo.spring.io/libs-release&lt;/url&gt;
      &lt;/repository&gt;
  &lt;/repositories&gt;
  &lt;pluginRepositories&gt;
      &lt;pluginRepository&gt;
          &lt;id&gt;spring-releases&lt;/id&gt;
          &lt;url&gt;https://repo.spring.io/libs-release&lt;/url&gt;
      &lt;/pluginRepository&gt;
  &lt;/pluginRepositories&gt;
  </code></pre>
  
  <p></p>
  
  <p>my dependency tree :</p>
  
  <pre><code>[INFO] --- maven-dependency-plugin:2.10:tree (default-cli) @ wawa ---
  [INFO] com.rondox.sb.restfulws:wawa:jar:0.0.1-SNAPSHOT
  [INFO] +- org.springframework.boot:spring-boot-starter-web:jar:1.5.2.RELEASE:compile
  [INFO] |  +- org.springframework.boot:spring-boot-starter:jar:1.5.2.RELEASE:compile
  [INFO] |  |  +- org.springframework.boot:spring-boot:jar:1.5.2.RELEASE:compile
  [INFO] |  |  +- org.springframework.boot:spring-boot-autoconfigure:jar:1.5.2.RELEASE:compile
  [INFO] |  |  +- org.springframework.boot:spring-boot-starter-logging:jar:1.5.2.RELEASE:compile
  [INFO] |  |  |  +- ch.qos.logback:logback-classic:jar:1.1.11:compile
  [INFO] |  |  |  |  \- ch.qos.logback:logback-core:jar:1.1.11:compile
  [INFO] |  |  |  +- org.slf4j:jcl-over-slf4j:jar:1.7.24:compile
  [INFO] |  |  |  +- org.slf4j:jul-to-slf4j:jar:1.7.24:compile
  [INFO] |  |  |  \- org.slf4j:log4j-over-slf4j:jar:1.7.24:compile
  [INFO] |  |  \- org.yaml:snakeyaml:jar:1.17:runtime
  [INFO] |  +- org.springframework.boot:spring-boot-starter-tomcat:jar:1.5.2.RELEASE:compile
  [INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.11:compile
  [INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.11:compile
  [INFO] |  |  \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.11:compile
  [INFO] |  +- org.hibernate:hibernate-validator:jar:5.3.4.Final:compile
  [INFO] |  |  +- javax.validation:validation-api:jar:1.1.0.Final:compile
  [INFO] |  |  +- org.jboss.logging:jboss-logging:jar:3.3.0.Final:compile
  [INFO] |  |  \- com.fasterxml:classmate:jar:1.3.3:compile
  [INFO] |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.7:compile
  [INFO] |  |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.0:compile
  [INFO] |  |  \- com.fasterxml.jackson.core:jackson-core:jar:2.8.7:compile
  [INFO] |  +- org.springframework:spring-web:jar:4.3.7.RELEASE:compile
  [INFO] |  |  +- org.springframework:spring-aop:jar:4.3.7.RELEASE:compile
  [INFO] |  |  +- org.springframework:spring-beans:jar:4.3.7.RELEASE:compile
  [INFO] |  |  \- org.springframework:spring-context:jar:4.3.7.RELEASE:compile
  [INFO] |  \- org.springframework:spring-webmvc:jar:4.3.7.RELEASE:compile
  [INFO] |     \- org.springframework:spring-expression:jar:4.3.7.RELEASE:compile
  [INFO] +- org.springframework.boot:spring-boot-starter-test:jar:1.5.2.RELEASE:test
  [INFO] |  +- org.springframework.boot:spring-boot-test:jar:1.5.2.RELEASE:test
  [INFO] |  +- org.springframework.boot:spring-boot-test-autoconfigure:jar:1.5.2.RELEASE:test
  [INFO] |  +- junit:junit:jar:4.12:test
  [INFO] |  +- org.assertj:assertj-core:jar:2.6.0:test
  [INFO] |  +- org.mockito:mockito-core:jar:1.10.19:test
  [INFO] |  |  \- org.objenesis:objenesis:jar:2.1:test
  [INFO] |  +- org.hamcrest:hamcrest-core:jar:1.3:test
  [INFO] |  +- org.hamcrest:hamcrest-library:jar:1.3:test
  [INFO] |  +- org.skyscreamer:jsonassert:jar:1.4.0:test
  [INFO] |  |  \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
  [INFO] |  +- org.springframework:spring-core:jar:4.3.7.RELEASE:compile
  [INFO] |  \- org.springframework:spring-test:jar:4.3.7.RELEASE:test
  [INFO] \- com.jayway.jsonpath:json-path:jar:2.2.0:test
  [INFO]    +- net.minidev:json-smart:jar:2.2.1:test
  [INFO]    |  \- net.minidev:accessors-smart:jar:1.1:test
  [INFO]    |     \- org.ow2.asm:asm:jar:5.0.3:test
  [INFO]    \- org.slf4j:slf4j-api:jar:1.7.24:compile
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD SUCCESS
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 1.750 s
  [INFO] Finished at: 2017-04-09T12:05:22+07:00
  </code></pre>
  
  <p>have tried this solution <a href="https://stackoverflow.com/questions/9030065/classnotfoundexception-org-slf4j-loggerfactory?noredirect=1&amp;lq=1">ClassNotFoundException: org.slf4j.LoggerFactory</a> to add the latest jar to the classpath but it giving another error :</p>
  
  <pre><code>SLF4J: Class path contains multiple SLF4J bindings.
  </code></pre>
  
  <p>please throw some enlightment, i have been struggle for this issue for 3 days. </p>