我正在使用 Jasper Reports 并在我的类路径中使用以下库
jasperreports-4.5.1.jar
common-digester3-3.2.jar
common-digester2.1.jar
castor-1.2.jar
commons-beanutils-1.8..0.jar
commons-collections-2.1.1.jar
commons-logging-1.1.1.jar
groovy-1.2.6.jar
asm-2.2.3.jar
asm-3.1.jar
asm-all-3.1.jar
antlr-3.3.1.1.jar
jtds-1.2.5.jar
我得到了以下异常
Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(I)V
at org.codehaus.groovy.control.CompilationUnit.createClassVisitor(CompilationUnit.java:791)
at org.codehaus.groovy.control.CompilationUnit$14.call(CompilationUnit.java:755)
at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:967)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:546)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:524)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:501)
at net.sf.jasperreports.compilers.JRGroovyCompiler.compileUnits(JRGroovyCompiler.java:96)
at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:188)
at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:212)
at Utilities.ReportDriver.runReport(ReportDriver.java:81)
at jewelleryerpapplication.GUI.MainReports.jbtnViewReportActionPerformed(MainReports.java:544)
at jewelleryerpapplication.GUI.MainReports.access$100(MainReports.java:18)
at jewelleryerpapplication.GUI.MainReports$2.actionPerformed(MainReports.java:210)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6505)
在执行以下代码时:
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, param, jdbcConnection);
JasperViewer.viewReport(jasperPrint);
我做错了什么?我该如何解决这个问题或进一步调试它?