我在填写报告中收到此错误:
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...
答案 0 :(得分:0)
正如Alex K所示,你可以看到这篇文章:
JasperReports compilation error
这对我有用。
您还可以将jar库添加到iReport类路径中。这可以通过 Window-&gt;来完成。选项 - &gt; iReport - &gt; Classpath 标签。
将库添加到项目中无法解决此问题。