title: getting error 'No appenders are available for AsyncAppender ASYNC' while log4j 1.x to 2.x migration
body: <p>I am getting error 'Exception in thread "main" java.lang.ExceptionInInitializerError
  Caused by: org.apache.logging.log4j.core.config.ConfigurationException: No appenders are available for AsyncAppender ASYNC' while migrating from log4j1.x to log4j 2.x using the Log4j 1.x bridge as per <a href="https://logging.apache.org/log4j/2.x/manual/migration.html" rel="nofollow noreferrer">https://logging.apache.org/log4j/2.x/manual/migration.html</a>.</p>
  
  <p>I have tried to add 'CONSOLE' appender in appender-ref of 'ASYNC' appender but it didnt work for me.(reference : <a href="https://issues.apache.org/jira/browse/LOG4J2-894" rel="nofollow noreferrer">https://issues.apache.org/jira/browse/LOG4J2-894</a>)</p>
  
  <p>Complete stack trace :</p>
  
  <p>Exception in thread "main" java.lang.ExceptionInInitializerError
  Caused by: org.apache.logging.log4j.core.config.ConfigurationException: No appenders are available for AsyncAppender ASYNC
          at org.apache.logging.log4j.core.appender.AsyncAppender.start(AsyncAppender.java:117)
          at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:255)
          at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:530)
          at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:603)
          at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:620)
          at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:226)
          at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:152)
          at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
          at org.apache.logging.log4j.LogManager.getContext(LogManager.java:307)
          at org.apache.log4j.LogManager$PrivateManager.getContext(LogManager.java:215)
          at org.apache.log4j.LogManager.getLogger(LogManager.java:74)
          at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:73)
          at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:277)
          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:657)
          at org.springframework.context.support.AbstractApplicationContext.(AbstractApplicationContext.java:159)
          at org.springframework.context.support.AbstractApplicationContext.(AbstractApplicationContext.java:223)
          at org.springframework.context.support.AbstractRefreshableApplicationContext.(AbstractRefreshableApplicationContext.java:88)
          at org.springframework.context.support.AbstractRefreshableConfigApplicationContext.(AbstractRefreshableConfigApplicationContext.java:58)
          at org.springframework.context.support.AbstractXmlApplicationContext.(AbstractXmlApplicationContext.java:61)
          at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:136)
          at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:83)
          at com.sm.common.business.security.StrongMailSymmetricEncryptionUtility.(StrongMailSymmetricEncryptionUtility.java:53)</p>
  
  <p>**My log4j2.xml **: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Configuration&gt;
    &lt;Appenders&gt;
      &lt;Async name="ASYNC"&gt;
        &lt;AppenderRef ref="R"/&gt;
        &lt;AppenderRef ref="CONSOLE"/&gt;
      &lt;/Async&gt;
     &lt;Async name="ASYNC_WARN"&gt;
       &lt;ThresholdFilter level="WARN"/&gt;
       &lt;AppenderRef ref="R"/&gt;
       &lt;AppenderRef ref="CONSOLE"/&gt;
     &lt;/Async
      &lt;Console name="CONSOLE" target="SYSTEM_OUT"&gt;
        &lt;PatternLayout pattern="%d %-5p [%t] %C{2} - %m%n"/&gt;
      &lt;/Console&gt;   
   &lt;/Appenders&gt;
  
   &lt;Loggers&gt;    
      &lt;Logger name="com.sm" level="WARN" additivity="false"&gt;
        &lt;AppenderRef ref="ASYNC"/&gt;
      &lt;/Logger&gt; 
      &lt;Logger name="com.sm.random" level="WARN" additivity="false"&gt;
        &lt;AppenderRef ref="ASYNC_WARN"/&gt;
      &lt;/Logger&gt; 
      &lt;Logger name="com.sm.services" level="WARN" additivity="false"&gt;
        &lt;AppenderRef ref="ASYNC"/&gt;
      &lt;/Logger&gt;
  
      &lt;Root level="WARN"&gt;
        &lt;AppenderRef ref="ASYNC"/&gt;
      &lt;/Root&gt;
    &lt;/Loggers&gt;
  &lt;/Configuration&gt;
  </code></pre>
  
  <p>Thanks.</p>