1

I'm getting this error during the filling report:

Setting net.sf.jasperreports.engine.query.JRJdbcQueryExecuterFactory as Query Executer Factory for language: sql
  Filling report...
  Locale: English (United States)
  Time zone: Default
Error filling print... java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.runtime.InvokerHelper null 
java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.runtime.InvokerHelper     
 at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.initMetaClass(ScriptBytecodeAdapter.java:782)      
at null_1335588078591_507644.$getStaticMetaClass(calculator_null_1335588078591_507644)      
at null_1335588078591_507644.<init>(calculator_null_1335588078591_507644:18)      
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)      
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)      
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)      
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)      
at java.lang.Class.newInstance0(Class.java:372)      
at java.lang.Class.newInstance(Class.java:325)      
at net.sf.jasperreports.engine.design.JRAbstractJavaCompiler.loadEvaluator(JRAbstractJavaCompiler.java:98)      
at net.sf.jasperreports.engine.design.JRAbstractCompiler.loadEvaluator(JRAbstractCompiler.java:320)      
at net.sf.jasperreports.engine.JasperCompileManager.loadEvaluator(JasperCompileManager.java:237)      
at net.sf.jasperreports.engine.fill.JRFillDataset.createCalculator(JRFillDataset.java:427)      
at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:363)      
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:77)      
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:87)      
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:57)      
at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:142)      
at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:78)      
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:624)      
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:540)      
at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:916)      
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1411)      
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1991)  
Print not filled. Try to use an EmptyDataSource...
Alex K
  • 22,315
  • 19
  • 108
  • 236
user1362513
  • 11
  • 1
  • 2
  • 1
    have u added the required libraries for it... – Addicted Apr 28 '12 at 07:09
  • 1
    @user1362513 As Abhinav mentioned you should add the groovy library to classpath – Alex K Apr 28 '12 at 07:47
  • i have added the ireport plugin to net beans. is there any need for adding groovy library to classpath?? – user1362513 Apr 28 '12 at 07:52
  • 1
    Possible duplicate: http://stackoverflow.com/questions/8935925/jasperreports-compile-error & http://stackoverflow.com/questions/1576532/netbeansjasperreport-exception & http://stackoverflow.com/questions/4233310/jasper-report-working-fine-in-netbeans-but-gives-exception-when-deployed-as-jar – Alex K Apr 28 '12 at 07:52

1 Answers1

0

As indicated by Alex K you can see this post:

JasperReports compilation error

That worked for me.

You could also add the jar libraries to iReport classpath. That can be done through Window-> Options -> iReport -> Classpath tab.

Adding the libraries to the project will not solve this issue.

Community
  • 1
  • 1
Christian Vielma
  • 15,263
  • 12
  • 53
  • 60