title: log4j2: pattern does not contain a date
body: <p>I'm trying to migrate to log4j2 and I'm getting an java.lang.IllegalStateException: "Pattern does not contain a date."</p>
  
  <p>I have a filePattern setup for each RollingFile so I'm unsure what I'm doing wrong.  FYI, I'm running through Tomcat on Eclipse (Kepler).</p>
  
  <p>Here is my log4j2.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;Configuration status="WARN"&gt;
  
      &lt;Appenders&gt;
          &lt;Console name="Console" target="SYSTEM_OUT"&gt;
              &lt;PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} [%-5p] - %m%n" /&gt;
          &lt;/Console&gt;
  
          &lt;RollingFile name="RootFile" fileName="injunction.log" immediateFlush="false" append="false"
              filePattern="injunction.log.%d{yyyy-MM-dd}"&gt;
              &lt;PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} [%-5p] - %m%n"/&gt;
              &lt;Policies&gt;
                  &lt;!--  Roll over the file to the next day --&gt;
                  &lt;TimeBasedTriggeringPolicy /&gt;
              &lt;/Policies&gt;
              &lt;!--  Only keep up to 30 archived log files --&gt;
              &lt;DefaultRolloverStrategy max="30"/&gt;
          &lt;/RollingFile&gt;
  
          &lt;RollingFile name="DBFile" fileName="db.log" immediateFlush="false" append="false"
              filePattern="db.log.%d{yyyy-MM-dd}"&gt;&gt;
              &lt;PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} [%-5p] - %m%n"/&gt;
              &lt;Policies&gt;
                  &lt;!--  Roll over the file to the next day --&gt;
                  &lt;TimeBasedTriggeringPolicy /&gt;
              &lt;/Policies&gt;
              &lt;!--  Only keep up to 30 archived log files --&gt;
              &lt;DefaultRolloverStrategy max="30"/&gt;
          &lt;/RollingFile&gt;
  
      &lt;/Appenders&gt;
  
      &lt;Loggers&gt;
          &lt;Root level="debug"&gt;
              &lt;AppenderRef ref="Console" /&gt;
              &lt;AppenderRef ref="RootFile" /&gt;
          &lt;/Root&gt;
  
          &lt;Logger name="DBLogger" level="debug" additivity="false"&gt;
              &lt;AppenderRef ref="Console" /&gt;
              &lt;AppenderRef ref="DBFile" /&gt;
          &lt;/Logger&gt;
      &lt;/Loggers&gt;
  
  &lt;/Configuration&gt;
  </code></pre>