[英]Why does JasperReports try to load org.springframework.core.io.Resource class?
Recently we integrated JasperReports to our enterprise application. 最近我们将JasperReports集成到我们的企业应用程序中。 Some of our users get java.lang.NoClassDefFoundError: org/springframework/core/io/Resource
at client side which is a Swing application. 我们的一些用户在客户端获得了java.lang.NoClassDefFoundError: org/springframework/core/io/Resource
,这是一个Swing应用程序。 The jnlp
file contains jasperreports.jar
and no import of this class occurs in our code. jnlp
文件包含jasperreports.jar
,我们的代码中没有导入此类。 Why does JasperReports try to load this class ? 为什么JasperReports会尝试加载这个类?
The spring-core.jar
is an optional jasper report dependency spring-core.jar
是一个可选的jasper报告依赖项
Why is it trying to load it?, 为什么要加载它?
I would check the jrxml files and the jasperreports_extension.properties
. 我会检查jrxml文件和jasperreports_extension.properties
。
I recreate the error on my pc and relaize that jasperreports-chart-themes.jar
uses spring-core.jar
and jasperreports-functions.jar
uses jodatime api. 我在我的电脑上重新创建错误并重新启动jasperreports jasperreports-chart-themes.jar
使用spring-core.jar
和jasperreports jasperreports-functions.jar
使用jodatime api。 so remove these jar if you really do not need otherwise add the depended jars. 所以如果你真的不需要,请删除这些jar,否则添加依赖的罐子。
I got the same issue with jasperreports-fonts-3.7.1 我在jasperreports-fonts-3.7.1中遇到了同样的问题
I'm using this jar with jasperreports-3.7.1 to display UTF8 character (using DejaVu Sans font) 我正在使用这个jar和jasperreports-3.7.1来显示UTF8字符(使用DejaVu Sans字体)
The spring dependency is used in jasperreports_extension.properties of jasperreports-fonts- spring依赖项用于jasperreports-fonts-的jasperreports_extension.properties中。
I added the spring-core and spring-beans 2.5 to the classpath and the problem is solved 我将spring-core和spring-beans 2.5添加到类路径中,问题就解决了
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.