当在程序中使用jasperreport加载模板时报class: groovy/runtime/metaclass/java/util/HashMapMetaCl

java.lang.VerifyError: (class: groovy/runtime/metaclass/java/util/HashMapMetaClass, method: super$2$invokeMethod signature: (Ljava/lang/Class;Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;ZZ)Ljava/lang/Object Illegal use of nonvirtual function call
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at groovy.lang.MetaClassRegistry$MetaClassCreationHandle.create(MetaClassRegistry.java:118)
at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:152)
at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:183)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:206)
at org.codehaus.groovy.runtime.InvokerHelper.getMetaClass(InvokerHelper.java:699)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.createPojoSite(CallSiteArray.java:107)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:148)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at SimpleTest_1254369426034_580176.initParams(calculator_SimpleTest_1254369426034_580176:68)
at SimpleTest_1254369426034_580176$initParams.callCurrent(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:143)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:151)
at SimpleTest_1254369426034_580176.customizedInit(calculator_SimpleTest_1254369426034_580176:57)
at net.sf.jasperreports.engine.fill.JREvaluator.init(JREvaluator.java:83)
at net.sf.jasperreports.engine.fill.JRCalculator.init(JRCalculator.java:95)
at net.sf.jasperreports.engine.fill.JRFillDataset.initCalculator(JRFillDataset.java:428)
at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:565)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:74)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:56)
at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:143)
at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:79)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:624)

ps. I don't know what issue type I have to tag, please forgive if this is not a bug.

找了好久没找到答案,老外网站有不能完全看明白,哎只能自己结合网上的提示摸索,最后中终于找到了,是因为json包的版本低了,原来是struts-lib-2.1-jdk15,后来换成struts-lib-2.2.2-jdk15,见附件中

你可能感兴趣的:(java,.net,json,struts,groovy)