title: Getting Exception org.apache.logging.slf4j.SLF4JLoggerContext cannot be cast to org.apache.logging.log4j.core.LoggerContext
body: <p>My code is very simple using apache-log4j-2.0.2:</p>
  
  <pre><code>import org.apache.log4j.BasicConfigurator;
  import org.apache.log4j.Logger;
  
  public class Log4jtest {
    static Logger log =Logger.getLogger(Log4jtest.class);
    public static void main(String[] args) {
      BasicConfigurator.configure();
          log.debug("This is debug message");
    }
  
  }
  </code></pre>
  
  <p>But I'm getting exception like:</p>
  
  <pre><code>Exception in thread "main" java.lang.ExceptionInInitializerError
  Caused by: java.lang.ClassCastException: org.apache.logging.slf4j.SLF4JLoggerContext cannot be          cast to org.apache.logging.log4j.core.LoggerContext``
  at org.apache.log4j.Logger.getLogger(Logger.java:41)
  at Log4jtest.&lt;clinit&gt;(Log4jtest.java:11)
  </code></pre>
  
  <p>Why is the exception coming from a simple program?</p>