title: Log4J throws a stackoverflow error upon war deployment
body: <p>We recently moved my app to a multi-module maven architecture and it now throws a <strong>stackoverflow error upon deployment in Tomcat.</strong></p>
  
  <p><em><strong>Stack trace is included below:</em></strong></p>
  
  <pre><code>GRAVE: Error waiting for multi-thread deployment of WAR files to complete
  java.util.concurrent.ExecutionException: java.lang.StackOverflowError
      at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
      at java.util.concurrent.FutureTask.get(FutureTask.java:83)
      at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:757)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:477)
      at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1393)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:318)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
      at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401)
      at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:346)
      at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1140)
      at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)
  Caused by: java.lang.StackOverflowError
      at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
      at java.lang.StringBuffer.append(StringBuffer.java:224)
      at org.apache.log4j.helpers.OptionConverter.getSystemProperty(OptionConverter.java:105)
      at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:417)
      at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
      at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
      at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
      at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
      at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
      at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
      at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
      at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
      at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
      at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
      at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
      at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
      at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
      at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
      at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
      at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
      at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
  </code></pre>
  
  <p>Can anyone please let me know how to sort this issue?</p>