title: SLF4J: Class path contains multiple SLF4J bindings. multiple logback-classic jars
body: <p>I am bulding and run Spring web app using gradle. There are multiple bindings. Reading the existing posts, I found lots of similar problems. But I have two problems. (1) I can not find conflict depencies. (2) I am not very fimilar with gradle syntaxt. SO I tried lots of methods. But still confused. Any help is welcome. Thanks.  Here is the error:</p>
  <blockquote>
  <p>SLF4J: Class path contains multiple SLF4J bindings.</p>
  <p>SLF4j: Found bindings in [jar:file:/C:/myproject/gradle-2.3-all/gradle-2.3/lib/logback-classic-1.0.13.jar!/org/slf4j/impl/StatLoggerBinder.class]</p>
  <p>SLF4j: Found bindings in [jar:file:/C:/myproject/myproject/build/temp/tomcatRunWar/work/Tomcat/localhost/myproject/WEB-INF/lib/logback-classic-1.1.2.jar!/org/slf4j/impl/StatLoggerBinder.class]</p>
  <p>SLF4j: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]</p>
  </blockquote>
  <p>Below is my depencies:</p>
  <pre><code>buildscript {
  repositories {
      maven { url &quot;http://repo.spring.io/libs-release&quot; }
      mavenLocal()
  }
  dependencies {
      classpath(&quot;org.springframework.boot:spring-boot-gradle-plugin:1.0.1.RELEASE&quot;)
      classpath 'org.gradle.api.plugins:gradle-tomcat-plugin:1.2.4'
  }} 
  
  apply plugin: 'java'
  apply plugin: 'eclipse'
  apply plugin: 'spring-boot'
  apply plugin: 'war'
  apply plugin: 'groovy'
  apply plugin: 'tomcat'
  
  
  eclipse {
  jdt {
      sourceCompatibility = 1.8
      targetCompatibility = 1.8
  }}
  
  jar {
  baseName = 'myproject'
  version =  '0.1.0' }
  
  repositories {
  mavenCentral()
  maven { url &quot;http://repo.spring.io/libs-release&quot; } }
  
  dependencies {
  compile('commons-fileupload:commons-fileupload:1.3.1')
  compile(&quot;org.codehaus.jackson:jackson-mapper-asl:1.9.0&quot;)
  compile(&quot;org.springframework.boot:spring-boot-starter-web&quot;)
  compile(&quot;org.springframework.data:spring-data-mongodb&quot;)
  compile(&quot;org.springframework.security:spring-security-crypto:3.2.3.RELEASE&quot;)
  compile(&quot;com.fasterxml.jackson.core:jackson-databind&quot;)
  compile(&quot;joda-time:joda-time:2.2&quot;)
  compile(&quot;org.apache.directory.studio:org.apache.commons.codec:1.6&quot;)
  compile('com.amazonaws:aws-java-sdk:1.2.1')
  testCompile(&quot;junit:junit&quot;)
      runtime 'javax.servlet:jstl:1.2'
  providedCompile group:&quot;org.apache.tomcat&quot;, name:&quot;tomcat-catalina&quot;, version:&quot;7.0.47&quot; }
  
  
  dependencies { 
  def tomcatVersion = '7.0.47' 
  tomcat &quot;org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}&quot;, 
  &quot;org.apache.tomcat.embed:tomcat-embed-logging-log4j:${tomcatVersion}&quot; 
  tomcat(&quot;org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}&quot;) { 
  exclude group: 'org.eclipse.jdt.core.compiler', module: 'ecj' 
  } }
  
  
  tomcatRun { daemon = true 
  httpPort = 8080
  outputFile = file('/logs/tomcat.log')
  stopKey = 'ctl-d'
  webDefaultXml = file('src/main/webapp/WEB-INF/web.xml')  }
  
   tomcatRunWar { outputFile = file('/logs/tomcat.log')  }
  tomcatStop { stopKey = 'ctl-d'  }
  </code></pre>