Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse - Jasper report not compiling (java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester)

I am trying to generate a jasper report via the Eclipse ide, however when I execute the following line of code:

jasperReport = JasperCompileManager.compileReport("reports/samplereport.jrxml");

I get the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester
    at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:146)

I have added the apache common digester jar as a project library but it does not seem to make a difference. NOTE: I am from a java novice (i.e. Ive a .NET background,) so I am very likely doing something really obvious!

like image 232
bstack Avatar asked Jan 15 '23 16:01

bstack


1 Answers

you may be missing some jars. try to add these ones with any version.

jasperreports-.jar;
jasperreports-javaflow.jar;
commons-beanutils.jar;
commons-collections.jar;
commons-logging.jar;
commons-digester.jar

like image 85
erencan Avatar answered Jan 31 '23 00:01

erencan