简体   繁体   English

无法将我的 Java 类与 Jasper Reports 一起使用:ClassNotFoundException

[英]Cannot use my Java classes working with Jasper Reports: ClassNotFoundException

I have installed JasperReports Studio 6.17 in order to generate reports with Jasper Reports.我已经安装了 JasperReports Studio 6.17 以便使用 Jasper Reports 生成报告。 Everything is ok, i can define my templates (jrxml files), filled them with jdbc or cvs remote data, and export them correctly to several formats.一切正常,我可以定义我的模板(jrxml 文件),用 jdbc 或 cvs 远程数据填充它们,并将它们正确导出为多种格式。

The problem is when i try to use one my own Java classes such as Scritplett or as functions expressions.问题是当我尝试使用我自己的 Java 类(例如 Scritplet)或作为函数表达式时。 There is no way to recognize my classes.无法识别我的课程。 ClassNotFoundException is thrown each time.每次都会抛出 ClassNotFoundException。

Build path seems to be ok.构建路径似乎没问题。 All depedencies seems to be correct also, but i am not able to extend the functionality interacting with my Java classes.所有依赖似乎也是正确的,但我无法扩展与我的 Java 类交互的功能。 Any idea?任何的想法? Thanks in advance.提前致谢。

pd: I am not generating reports on the fly, just from the template, declaratively. pd:我不是动态生成报告,只是从模板中声明性地生成报告。

在此处输入图片说明

After asking to the Jasper Community, they have given me a solution.在向 Jasper 社区询问后,他们给了我一个解决方案。

Its a bug in the 6.17 version.它是 6.17 版本中的一个错误。 In order to solved it, just add an extra jar to the plugin installation folder, relaunch Jasper with -clean option and done.为了解决它,只需在插件安装文件夹中添加一个额外的 jar,使用 -clean 选项重新启动 Jasper 并完成。 Now I can refer and use my own classes within the report.现在我可以在报告中引用和使用我自己的类。

Details here: https://community.jaspersoft.com/jaspersoft-studio/issues/13616#comment-873711详情请见: https : //community.jaspersoft.com/jaspersoft-studio/issues/13616#comment-873711

Also told me that a new release is comming and will fix this issue.还告诉我新版本即将发布并将解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM