title: Jasper with Spring -- so many logs from org.apache.commons.digester
body: <p>I have a thread <a href="https://stackoverflow.com/questions/12943030/outofmemoryerror-permgen-space-jasper-report-with-spring-running-on-tomcat">here</a> to demonstrate current issue in Spring with Jasper report. I have sorted out most of the issue with help from all geniuses from SO but still stuck on solving the memories spent on <code>org.apache.commons.digester</code>. </p>
  
  <p>The situation is quite common when wired the jasper report bean and if we turn on debug log mode, there are tons of log info from <code>org.apache.commons.digester.Digiester.sax</code>, <code>EVEN CURRENT PAGE HAS NOTHING TO DO WITH JASPER REPORT</code>. so seems to me that the jasper bean is not well wired so when the application is running, the container is trying to help the bean get wired at all time.</p>
  
  <p>Here are some normal logs during runtime(happens when there is no jasper report on the view), telling about tld jar confusion, but application can still keep running.</p>
  
  <pre><code>Oct 17, 2012 3:42:27 PM org.apache.jasper.compiler.TldLocationsCache tldScanJar
  INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
  </code></pre>
  
  <p>Here is the bean in applicationContext config file, which is a very common bean</p>
  
  <pre><code>&lt;bean id="pdfStandard" class="org.springframework.web.servlet.view.jasperreports.JasperReportsPdfView"&gt;
      &lt;property name="url" value="classpath:/META-INF/jasperReports/pdf_stardard.jrxml" /&gt;
      &lt;property name="reportDataKey" value="datasource" /&gt;
      &lt;property name="headers"&gt;
          &lt;props&gt;
              &lt;prop key="Content-Disposition"&gt;attachment; filename=standard.pdf&lt;/prop&gt;
          &lt;/props&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>And here is a small cut from the gigabytes log file on debug level, <code>looks like it is parsing the template all the time without a rest</code>, or trying to parse XML from jasper library? </p>
  
  <pre><code>    2012-10-17 15:29:12,025 -- DEBUG -- org.apache.commons.digester.Digester.sax -- startElement(http://jasperreports.sourceforge.net/jasperreports,textElement,textElement)
      2012-10-17 15:29:12,025 -- DEBUG -- org.apache.commons.digester.Digester --   Pushing body text ''
      2012-10-17 15:29:12,025 -- DEBUG -- org.apache.commons.digester.Digester --   New match='jasperReport/summary/band/textField/textElement'
      2012-10-17 15:29:12,025 -- DEBUG -- org.apache.commons.digester.Digester --   Fire begin() for FactoryCreateRule[className=net.sf.jasperreports.engine.xml.JRTextElementFactory, attributeName=null, creationFactory=net.sf.jasperreports.engine.xml.JRTextElementFactory@12dc6007]
      2012-10-17 15:29:12,025 -- DEBUG -- org.apache.commons.digester.Digester -- [FactoryCreateRule]{jasperReport/summary/band/textField/textElement} New net.sf.jasperreports.engine.design.JRDesignTextField
      2012-10-17 15:29:12,025 -- DEBUG -- org.apache.commons.digester.Digester.sax -- ignorableWhitespace()
  </code></pre>
  
  <p>Now the question are:</p>
  
  <ol>
  <li><p>Why the <code>org.apache.commons.digester</code> keeping "digest" jasper report component, even current view has nothing to do with Jasper report?</p></li>
  <li><p>Still very confused about whether it is the jasper bean not well wired or something wrong with the <code>digester</code> so that keep the jasper report bean/template so active. I try to save some unnecessary memory consumption but I guess only turn off the log from <code>digester</code> may not be a solution as they probably still running on the background.</p></li>
  <li><p>I am very confident about when start application on tomcat/vfabbric, jasper report get compile at compile-time instead of load-time. So why it still looks like the 'digester' is working hard on parsing the jasper template?</p></li>
  </ol>
  
  <p>Many thanks in advance.</p>