title: Why do I get Exception java.lang.NoClassDefFoundError org/codehaus/groovy/?
body: <p>I've just try Jasper Report, I'm following tutorial from <a href="http://mdsaputra.wordpress.com/2010/10/21/step-by-step-jasper-report-tutorial/">this site</a> </p>
  
  <p>Also I downloaded the sample source then run it and got no error. But when I create my own report using <code>iReport</code>, compile it, and add the <code>.jasper</code> file to my project. There is <code>exception</code> when I run my program:</p>
  
  <pre><code>Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/callsite/CallSiteArray
      at report2_1343895135169_749208.$createCallSiteArray(calculator_report2_1343895135169_749208)
      at report2_1343895135169_749208.$getCallSiteArray(calculator_report2_1343895135169_749208)
      at report2_1343895135169_749208.&lt;init&gt;(calculator_report2_1343895135169_749208)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at java.lang.Class.newInstance0(Class.java:355)
      at java.lang.Class.newInstance(Class.java:308)
      at net.sf.jasperreports.engine.design.JRAbstractJavaCompiler.loadEvaluator(JRAbstractJavaCompiler.java:112)
      at net.sf.jasperreports.engine.design.JRAbstractCompiler.loadEvaluator(JRAbstractCompiler.java:333)
      at net.sf.jasperreports.engine.JasperCompileManager.getEvaluator(JasperCompileManager.java:265)
      at net.sf.jasperreports.engine.fill.JRFillDataset.createCalculator(JRFillDataset.java:457)
      at net.sf.jasperreports.engine.fill.JRBaseFiller.&lt;init&gt;(JRBaseFiller.java:379)
      at net.sf.jasperreports.engine.fill.JRVerticalFiller.&lt;init&gt;(JRVerticalFiller.java:88)
      at net.sf.jasperreports.engine.fill.JRVerticalFiller.&lt;init&gt;(JRVerticalFiller.java:103)
      at net.sf.jasperreports.engine.fill.JRVerticalFiller.&lt;init&gt;(JRVerticalFiller.java:61)
      at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:153)
      at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:82)
      at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:653)
      at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:634)
      at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:956)
      at View.MainGUI.btnExportActionPerformed(MainGUI.java:871)
      at View.MainGUI.access$800(MainGUI.java:50)
      at View.MainGUI$10.actionPerformed(MainGUI.java:541)
      at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
      at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
      at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
      at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
      at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
      at java.awt.Component.processMouseEvent(Component.java:6267)
      at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
      at java.awt.Component.processEvent(Component.java:6032)
      at java.awt.Container.processEvent(Container.java:2041)
      at java.awt.Component.dispatchEventImpl(Component.java:4630)
      at java.awt.Container.dispatchEventImpl(Container.java:2099)
      at java.awt.Component.dispatchEvent(Component.java:4460)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
      at java.awt.Container.dispatchEventImpl(Container.java:2085)
      at java.awt.Window.dispatchEventImpl(Window.java:2478)
      at java.awt.Component.dispatchEvent(Component.java:4460)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
  Caused by: java.lang.ClassNotFoundException: org.codehaus.groovy.runtime.callsite.CallSiteArray
      at java.lang.ClassLoader.findClass(ClassLoader.java:359)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
      ... 50 more
  </code></pre>
  
  <p>Here my button action for displaying the report (this is just sample, the report just contain one text with parameter: outputText):</p>
  
  <pre><code>Map params = new HashMap();
  params.put("outputText", "Hello world");
  try {
          JasperPrint printer = JasperFillManager.fillReport(getClass().getResourceAsStream("report2.jasper"), params, new JREmptyDataSource());
          JasperViewer jv = new JasperViewer(printer);
          jv.show();
      } catch (JRException ex) {
          ex.printStackTrace();
      }
  </code></pre>
  
  <p>If it's <code>dependency</code> problem, I've imported all the required jar to my project, when I use <code>.jasper</code> file from that tutorial there is no problem, is it because of the different version of <code>iReport</code> or else? </p>