title: Suddenly getting "LoggerFactory is not a Logback LoggerContext but Logback is on the classpath." and fails to run
body: <p>I use gradle and <code>latest.release</code> everywhere to be promiscuous, however, recently my Spring boot application stopped running from command line. When I run <code>gradle clean bootRun</code> I get...</p>
  
  <blockquote>
    <p>Exception in thread "main" java.lang.IllegalArgumentException: LoggerFactory is not a Logback LoggerContext but Logback is on the classpath. Either remove Logback or the competing implementation (class org.slf4j.impl.Log4jLoggerFactory loaded from file:/.../.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-log4j12/1.7.25/110cefe2df103412849d72ef7a67e4e91e4266b4/slf4j-log4j12-1.7.25.jar). If you are using WebLogic you will need to add 'org.slf4j' to prefer-application-packages in WEB-INF/weblogic.xml: org.slf4j.impl.Log4jLoggerFactory </p>
  </blockquote>
  
  <p>Per <a href="https://stackoverflow.com/questions/23984009/disable-logback-in-springboot">this post</a> I tried...</p>
  
  <pre><code>configurations.all {
      exclude group: 'org.springframework.boot', module: 'spring-boot-starter-tomcat'
      exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
      exclude group: 'org.springframework.boot', module: 'logback-classic'
      exclude group: "org.slf4j"
  }
  </code></pre>
  
  <p>and that silences the Logback error but spring won't start and fails with no error.</p>
  
  <blockquote>
    <p>Caused by: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1</p>
  </blockquote>
  
  <p>What am I missing?</p>