简体   繁体   English

为什么JasperReports尝试加载org.springframework.core.io.Resource类?

[英]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.

相关问题 如何处理Swagger Codegen的org.springframework.core.io.Resource - How to handle org.springframework.core.io.Resource for Swagger Codegen 如何模拟 org.springframework.core.io.Resource object? - How to mock org.springframework.core.io.Resource object? java.lang.ClassNotFoundException: org.springframework.core.io.Resource - java.lang.ClassNotFoundException: org.springframework.core.io.Resource 为 org.springframework.core.io.Resource 对象分配名称 - Assigning name to a org.springframework.core.io.Resource object org.springframework.web.multipart.MultipartFile 和 org.springframework.core.io.Resource 之间的转换 - Conversion between org.springframework.web.multipart.MultipartFile and org.springframework.core.io.Resource 如何记录将返回ResponseEntity的表格规范 <Resource> 其中Resource是org.springframework.core.io.Resource - How to document swagger specification which returns ResponseEntity<Resource> where Resource is org.springframework.core.io.Resource ClassNotFoundException:IntelliJ IDEA在tomcat7上部署Maven Spring MVC Web项目时出现org.springframework.core.io.Resource - ClassNotFoundException: org.springframework.core.io.Resource when intellij idea deploy maven spring mvc web project on tomcat7 Spring MVC“找不到能够将java.lang.String类型转换为org.springframework.core.io.Resource类型的转换器” - Spring MVC “No converter found capable of converting from type java.lang.String to type org.springframework.core.io.Resource” java.lang.NoClassDefFoundError: org/springframework/core/io/Resource 异常 - java.lang.NoClassDefFoundError: org/springframework/core/io/Resource Exception spring org.springframework.core.io.UrlResource不支持https资源 - spring org.springframework.core.io.UrlResource not support https resource
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM