title: retrieving data from jasper file
body: <p>Hi I am very new to jasper reports. Just have a requirement where i need to retrieve the info from a .jasper file. I am using the below code for that.</p>
  
  <p>But issue is compileReport does not take up the file i have in my local machine and i get a error like</p>
  
  <blockquote>
    <p>Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester
        at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:150)
        at jasper.test(jasper.java:28)
        at jasper.main(jasper.java:40)</p>
  </blockquote>
  
  <p>I am not sure what is wrong.Is it not able to get my .jasper file? which class is missing?
  I am absolutely clueless.</p>
  
  <h1>My code is:</h1>
  
  <pre><code>import java.io.File;
  import java.io.FileNotFoundException;
  import java.io.FileOutputStream;
  import java.io.InputStream;
  import java.io.OutputStream;
  import java.util.Collection;
  import java.util.HashMap;
  import java.util.Map;
  
  import dori.jasper.engine.JRException;
  import net.sf.jasperreports.engine.JRDataSource;
  import net.sf.jasperreports.engine.JasperCompileManager;
  import net.sf.jasperreports.engine.JasperFillManager;
  import net.sf.jasperreports.engine.JasperPrint;
  import net.sf.jasperreports.engine.JasperReport;
  import net.sf.jasperreports.engine.JasperExportManager;
  import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
  import net.sf.jasperreports.view.JasperViewer;
  
  
  public class jasper  {
  
      public static void test() throws FileNotFoundException, net.sf.jasperreports.engine.JRException{
  
      JasperReport report = JasperCompileManager.compileReport("C:\\Users\\Mandakini\\Downloads\\testReport.jasper");
  
      JasperPrint print = JasperFillManager.fillReport(report, new HashMap&lt;String, String&gt;());
      // export it!
      //File pdf = File.createTempFile("output.", ".pdf");
  
      OutputStream output= new FileOutputStream(new File("F:/catalog.pdf"));
      JasperExportManager.exportReportToPdfStream(print,output);
  
      }
  
      public static void main(String args[]) throws FileNotFoundException, net.sf.jasperreports.engine.JRException{
          test();
      }
  }
  </code></pre>
  
  <p>Thanks</p>