I always use JasperReport for my java projects, but sometimes i found some weird java.lang.NoClassDefFoundError: org/codehaus/groovy/control/CompilationFailedException when im trying to get reports from jasper files. This is my full stack trace exception.
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/codehaus/groovy/control/CompilationFailedException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructor0(Class.java:2699) at java.lang.Class.newInstance0(Class.java:326) at java.lang.Class.newInstance(Class.java:308) at net.sf.jasperreports.engine.JasperCompileManager.getCompiler(JasperCompileManager.java:472) at net.sf.jasperreports.engine.JasperCompileManager.loadEvaluator(JasperCompileManager.java:238) at net.sf.jasperreports.engine.fill.JRFillDataset.createCalculator(JRFillDataset.java:416) at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:408) 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)
Actually it happens because im still using Groovy as my report language, instead of Java. All i have to do is change reporting language to java, as you can see below.
Or adding groovy*.jar to your project’s classpath.
Have fun, cheers. (B)
Thank you. It really helped me to solve the problem.
anytime nis, glad it can help ๐
thx,it really helped
hi Warrior,
glad it could helped you.
muchas gracias por ese aporte, estaba desesperado y ya lo pude corregir…..
eres amigo de bienvenida,
gr8, it really helped
Hi Mangesh,
glad it can help ๐
Gracias Me ayudo tremendamente, realmente gracias…. te pasaste…! ๐
Hi Walter, glad it can help ๐
Works!!! thanks a lot ๐
Hi Moro,
glad it can help
Thanks this worked for me. Just switching to Java solve my problem.
I also noticed that I can integrate it with Javascript, so I am happier because I am a Web Developer.
wow cool, i never tought that jasper able to use javascript.
thank you ๐ (Y)
where can I find groovy*.jar
you can find it on your jasper or ireport installation folder
Merci pour cet article, il m’a permis de bouger sur mon projet aprรจs quelques heures de recherches.
je vous en prie