Log4j2 - Error processing element Appender
<p>I wanted to write a simple programm to test log4j2. I copied most of my code form the <a href="https://logging.apache.org/log4j/2.x/manual/configuration.html" rel="noreferrer">manual</a>.
This is the error I get:</p>

<pre><code>2016-05-02 10:11:31,054 main ERROR Error processing element Appender ([Appenders: null]): CLASS_NOT_FOUND
2016-05-02 10:11:31,054 main ERROR Error processing element Appender ([Appenders: null]): CLASS_NOT_FOUND
2016-05-02 10:11:31,117 main ERROR Unable to locate appender "STDOUT" for logger config "root"
2016-05-02 10:11:31,117 main ERROR Unable to locate appender "File" for logger config "MyLogger"
</code></pre>

<p>My java code:</p>

<pre><code>package log4jtest;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

public class Log4jtest {
    private static final Logger logger = LogManager.getLogger("MyLogger");
    public static void main(String[] args) {
        logger.error("Hello, World!");
    }
}
</code></pre>

<p>My log4j2 configuration file:</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;Configuration status="WARN" name="Log4jTest" packages=""&gt;
    &lt;Properties&gt;
        &lt;Property name="filename"&gt;test.log&lt;/Property&gt;
    &lt;/Properties&gt;

    &lt;Appenders&gt;
        &lt;Appender type="Console" name="STDOUT"&gt;
            &lt;PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/&gt;
        &lt;/Appender&gt;

        &lt;Appender type="File" name="File" fileName="${filename}"&gt;
            &lt;PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/&gt;
        &lt;/Appender&gt;
    &lt;/Appenders&gt;

    &lt;Loggers&gt;
        &lt;Logger name="MyLogger" level="ALL" additivity="false"&gt;
            &lt;AppenderRef ref="File" /&gt;
        &lt;/Logger&gt;
        &lt;Root level="ALL"&gt;
            &lt;AppenderRef ref="STDOUT" /&gt;
        &lt;/Root&gt;
    &lt;/Loggers&gt;
&lt;/Configuration&gt;
</code></pre>

<p>Any ideas how to fix this error?</p>