title: NoClassDefFoundError: org/apache/commons/logging/LogFactory
body: <p>I'm new in <em>JasperReports</em> and I want to integrate a <em>JasperReports</em> into my Java program,
  so when I click print button the program will show the report. But I get a <em>NoClassDefFoundError</em> when I click the button. </p>
  
  <h2>Code</h2>
  
  <pre><code>JButton btnReport= new JButton("Report");
  btnReport.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0) { 
          try{
              String fileName= "src/learnReport/Leaf_Grey.jasper";
              Connection con = connect.getConnect();
              File file = new File(NameFile);
              JasperReport jasperReport = (JasperReport) JRLoader.loadObject(file);
              JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, null,con);
              JasperViewer.viewReport(jasperPrint,false);
          } catch(Exception ex){
              System.out.println(ex);
          }
      }   
  });
  </code></pre>
  
  <h2>Runtime error</h2>
  
  <pre><code>Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
      at net.sf.jasperreports.engine.util.JRLoader.&lt;clinit&gt;(JRLoader.java:81)
      at learnReport.Learning$6.actionPerformed(Learning.java:195)
      at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
      at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
      at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
      at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
      at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
      at java.awt.Component.processMouseEvent(Unknown Source)
  </code></pre>