Reputation: 979
I have downloaded JasperReports jars (jasperreports-5.6.0-project.zip from here) and toke all the jars in the dist folder. These are the files I added to my project:
jasperreports-5.6.0.jar
jasperreports-applet-5.6.0.jar
jasperreports-fonts-5.6.0.jar
jasperreports-javaflow-5.6.0.jar
But when I try my code I always get this error:
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
UPDATE 1
I solved that error and I have a lot of more missing jars. Please tell me all the additional jars needed to use JasperReports.
Upvotes: 6
Views: 15494
Reputation: 52
these are gradle dependencies i needed to make Jasper Report work in Spring Boot:
// https://mvnrepository.com/artifact/net.sf.jasperreports/jasperreports
compile group: 'net.sf.jasperreports', name: 'jasperreports', version: '5.0.1'
// https://mvnrepository.com/artifact/commons-logging/commons-logging
compile group: 'commons-logging', name: 'commons-logging', version: '1.1.2'
// https://mvnrepository.com/artifact/com.lowagie/itext
compile group: 'com.lowagie', name: 'itext', version: '2.1.7'
Hope it helps someone.
Upvotes: 1
Reputation: 979
Ok, as I said I added the jars in the dist folder of the downloaded zip (as showed in the question) to my project and to resolve all the problems I had, I added the next jars from the lib folder to my project:
JasperReports 5.6.0 - ...
...poi-3.7-20101029.jar
...commons-beanutils-1.8.0.jar
...commons-collections-3.2.1.jar
...commons-digester-2.1.jar
...commons-javaflow-20060411.jar
...commons-logging-1.1.1.jar
...groovy-all-2.0.1.jar
...iText-2.1.7.js2.jar
...jcommon-1.0.15.jar
...jfreechart-1.0.12.jar
Hope this helps someone!
Upvotes: 7