Why do I get Exception java.lang.NoClassDefFoundError org/codehaus/groovy/? -
i've try jasper report, i'm following tutorial this site
also downloaded sample source run , got no error. when create own report using ireport
, compile it, , add .jasper
file project. there exception
when run program:
exception in thread "awt-eventqueue-0" java.lang.noclassdeffounderror: org/codehaus/groovy/runtime/callsite/callsitearray @ report2_1343895135169_749208.$createcallsitearray(calculator_report2_1343895135169_749208) @ report2_1343895135169_749208.$getcallsitearray(calculator_report2_1343895135169_749208) @ report2_1343895135169_749208.<init>(calculator_report2_1343895135169_749208) @ sun.reflect.nativeconstructoraccessorimpl.newinstance0(native method) @ sun.reflect.nativeconstructoraccessorimpl.newinstance(nativeconstructoraccessorimpl.java:39) @ sun.reflect.delegatingconstructoraccessorimpl.newinstance(delegatingconstructoraccessorimpl.java:27) @ java.lang.reflect.constructor.newinstance(constructor.java:513) @ java.lang.class.newinstance0(class.java:355) @ java.lang.class.newinstance(class.java:308) @ net.sf.jasperreports.engine.design.jrabstractjavacompiler.loadevaluator(jrabstractjavacompiler.java:112) @ net.sf.jasperreports.engine.design.jrabstractcompiler.loadevaluator(jrabstractcompiler.java:333) @ net.sf.jasperreports.engine.jaspercompilemanager.getevaluator(jaspercompilemanager.java:265) @ net.sf.jasperreports.engine.fill.jrfilldataset.createcalculator(jrfilldataset.java:457) @ net.sf.jasperreports.engine.fill.jrbasefiller.<init>(jrbasefiller.java:379) @ net.sf.jasperreports.engine.fill.jrverticalfiller.<init>(jrverticalfiller.java:88) @ net.sf.jasperreports.engine.fill.jrverticalfiller.<init>(jrverticalfiller.java:103) @ net.sf.jasperreports.engine.fill.jrverticalfiller.<init>(jrverticalfiller.java:61) @ net.sf.jasperreports.engine.fill.jrfiller.createfiller(jrfiller.java:153) @ net.sf.jasperreports.engine.fill.jrfiller.fill(jrfiller.java:82) @ net.sf.jasperreports.engine.jasperfillmanager.fill(jasperfillmanager.java:653) @ net.sf.jasperreports.engine.jasperfillmanager.fill(jasperfillmanager.java:634) @ net.sf.jasperreports.engine.jasperfillmanager.fillreport(jasperfillmanager.java:956) @ view.maingui.btnexportactionperformed(maingui.java:871) @ view.maingui.access$800(maingui.java:50) @ view.maingui$10.actionperformed(maingui.java:541) @ javax.swing.abstractbutton.fireactionperformed(abstractbutton.java:1995) @ javax.swing.abstractbutton$handler.actionperformed(abstractbutton.java:2318) @ javax.swing.defaultbuttonmodel.fireactionperformed(defaultbuttonmodel.java:387) @ javax.swing.defaultbuttonmodel.setpressed(defaultbuttonmodel.java:242) @ javax.swing.plaf.basic.basicbuttonlistener.mousereleased(basicbuttonlistener.java:236) @ java.awt.component.processmouseevent(component.java:6267) @ javax.swing.jcomponent.processmouseevent(jcomponent.java:3267) @ java.awt.component.processevent(component.java:6032) @ java.awt.container.processevent(container.java:2041) @ java.awt.component.dispatcheventimpl(component.java:4630) @ java.awt.container.dispatcheventimpl(container.java:2099) @ java.awt.component.dispatchevent(component.java:4460) @ java.awt.lightweightdispatcher.retargetmouseevent(container.java:4577) @ java.awt.lightweightdispatcher.processmouseevent(container.java:4238) @ java.awt.lightweightdispatcher.dispatchevent(container.java:4168) @ java.awt.container.dispatcheventimpl(container.java:2085) @ java.awt.window.dispatcheventimpl(window.java:2478) @ java.awt.component.dispatchevent(component.java:4460) @ java.awt.eventqueue.dispatchevent(eventqueue.java:599) @ java.awt.eventdispatchthread.pumponeeventforfilters(eventdispatchthread.java:269) @ java.awt.eventdispatchthread.pumpeventsforfilter(eventdispatchthread.java:184) @ java.awt.eventdispatchthread.pumpeventsforhierarchy(eventdispatchthread.java:174) @ java.awt.eventdispatchthread.pumpevents(eventdispatchthread.java:169) @ java.awt.eventdispatchthread.pumpevents(eventdispatchthread.java:161) @ java.awt.eventdispatchthread.run(eventdispatchthread.java:122) caused by: java.lang.classnotfoundexception: org.codehaus.groovy.runtime.callsite.callsitearray @ java.lang.classloader.findclass(classloader.java:359) @ java.lang.classloader.loadclass(classloader.java:307) @ java.lang.classloader.loadclass(classloader.java:248) ... 50 more
here button action displaying report (this sample, report contain 1 text parameter: outputtext):
map params = new hashmap(); params.put("outputtext", "hello world"); try { jasperprint printer = jasperfillmanager.fillreport(getclass().getresourceasstream("report2.jasper"), params, new jremptydatasource()); jasperviewer jv = new jasperviewer(printer); jv.show(); } catch (jrexception ex) { ex.printstacktrace(); }
if it's dependency
problem, i've imported required jar project, when use .jasper
file tutorial there no problem, because of different version of ireport
or else?
you need additional jar package using callsitearray class.
Comments
Post a Comment