title: Get ClassCastException when generating report with Struts2
body: <p>I put <em>.jasper</em> file in my web content folder of my project and in my action class there is only execute method and my <em>struts.xml</em> has following code:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;action name="myJasperTest" class="com.acme.test.action.JasperAction"&gt;
      &lt;result name="success" type="jasper"&gt;
          &lt;param name="location"&gt;/our_jasper_template.jasper&lt;/param&gt;
          &lt;param name="dataSource"&gt;myList&lt;/param&gt;
          &lt;param name="reportParameters"&gt;reportParams&lt;/param&gt;
          &lt;param name="format"&gt;PDF&lt;/param&gt;
      &lt;/result&gt;
      &lt;result name="error"&gt;/Error.jsp&lt;/result&gt;
  &lt;/action&gt;
  </code></pre>
  
  <p>And while running this program it gives me error: </p>
  
  <pre><code>java.lang.ClassCastException: cannot assign instance of
  net.sf.jasperreports.engine.base.JRBaseStyle to field
  net.sf.jasperreports.engine.base.JRBaseParagraph.paragraphContainer of type
  net.sf.jasperreports.engine.JRParagraphContainer in instance of
  net.sf.jasperreports.engine.base.JRBaseParagraph
  </code></pre>
  
  <p>Can anybody help me how to resolve this problem?</p>