[英]Exception “java.lang.AbstractMethodError: org.codehaus.groovy.control.CompilationUnit$ClassgenCallback.call(Lorg/objectweb/asm/ClassVisitor;)V"
I am using Jasper Reports and am using following libraries in my class path 我正在使用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-3.1.jar
antlr-3.3.1.1.jar
jtds-1.2.5.jar
I got the following exception 我有以下异常
Exception in thread "AWT-EventQueue-0" java.lang.AbstractMethodError: org.codehaus.groovy.control.CompilationUnit$ClassgenCallback.call(Lorg/objectweb/asm/ClassVisitor;Lorg/codehaus/groovy/ast/ClassNode;)V
at org.codehaus.groovy.control.CompilationUnit$14.call(CompilationUnit.java:776) org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:501)
at net.sf.jasperreports.compilers.JRGroovyCompiler.compileUnits
at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport
at net.sf.jasperreports.engine.JasperCompileManager.compileReport)
at Utilities.ReportDriver.runReport(ReportDriver.java:81)
at jewelleryerpapplication.GUI.MainReports.jbtnViewReportActionPerformed
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
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2713)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)
at java.awt.EventQueue.access$000(EventQueue.java:101)
at java.awt.EventQueue$3.run(EventQueue.java:666)
at java.awt.EventQueue$3.run(EventQueue.java:664)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege
at java.security.ProtectionDomain$1.doIntersectionPrivilege
at java.awt.EventQueue$4.run(EventQueue.java:680)
at java.awt.EventQueue$4.run(EventQueue.java:678)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege
at java.awt.EventQueue.dispatchEvent(EventQueue.java:677)
at java.awt.EventDispatchThread.pumpOneEventForFilters
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.awt.EventDispatchThread.pumpEventsForHierarchy
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
on executing the following code: 在执行以下代码时:
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, param, jdbcConnection); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,param,jdbcConnection); JasperViewer.viewReport(jasperPrint); JasperViewer.viewReport(jasperPrint);
What have I done wrong? 我做错了什么? How can I fix this or debug it further? 如何解决此问题或进一步调试它?
I had a similar error message. 我有类似的错误消息。
It wasn't depending on the ASM, but on the used groovy library groovy-xxxjar
. 它不取决于ASM,而是取决于所使用的groovy库groovy-xxxjar
。
Beware - You have to use the groovy-all-xxxjar
in order to get this work. 当心 -您必须使用groovy-all-xxxjar
才能完成这项工作。
It's exactly the same thing as in your other question here: Exception "java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter" on Viewing Jasper Report 与您在此处的其他问题完全相同:查看Jasper报告时出现异常“ java.lang.NoSuchMethodError:org.objectweb.asm.ClassWriter”
The answer is the same. 答案是一样的。 You need to find the right ASM version that will satisfy all your dependencies on it, which may involve changing the versions of some of your other libraries, too. 您需要找到可以满足您对它的所有依赖关系的正确ASM版本,这可能还涉及更改某些其他库的版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.