java JasperReports 需要罐子吗?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25069522/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-02 07:15:45  来源:igfitidea点击:

Jars needed for JasperReports?

javajasper-reports

提问by Kaz Miller

I have downloaded JasperReportsjars (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:

我已经下载了JasperReportsjars(jasperreports-5.6.0-project.zip from here)并把所有的 jars 放在 dist 文件夹中。这些是我添加到我的项目中的文件:

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

但是当我尝试我的代码时,我总是收到这个错误: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

UPDATE 1

更新 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.

我解决了这个错误,我还有很多丢失的罐子。请告诉我使用JasperReports所需的所有其他 jars 。

回答by Kaz Miller

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:

好的,正如我所说,我将下载的 zip 的 dist 文件夹中的 jar(如问题所示)添加到我的项目中并解决我遇到的所有问题,我将 lib 文件夹中的下一个 jar 添加到我的项目中:

JasperReports 5.6.0 - ...

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!

希望这对某人有帮助!

回答by Nemanja Rajkovic

these are gradle dependencies i needed to make Jasper Report work in Spring Boot:

这些是使 Jasper Report 在 Spring Boot 中工作所需的 gradle 依赖项:

// 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.

希望它可以帮助某人。