title: How do I fix StackOverflowError in org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry in Tomcat 7.0.35
body: <p>We are running an old version of Tomcat, and a new web application has caused a stack trace like this</p>
  
  <pre><code>Caused by: java.lang.StackOverflowError
      at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2269)
      at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2269)
      at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2269)
  </code></pre>
  
  <p>This has been mentioned at <a href="https://bz.apache.org/bugzilla/show_bug.cgi?id=53871" rel="noreferrer">https://bz.apache.org/bugzilla/show_bug.cgi?id=53871</a>, and later versions (like Tomcat 8) don't seem to be affected.</p>
  
  <p>How can I fix this?</p>