Closed pvncoder closed 4 months ago
The exception is not about report files, but rather about style template files (.jrtx). Please note that in version 7, both .jrxml and .jrtx files have changed their syntax and you need to use Jaspersoft Studio 7 to convert them to the new syntax. Compiled report files (.jasper) need to be recompiled using version 7 of the library.
I hope this helps. Teodor
It seems that JasperReports 7.0.0 is unable to locate the .jasper file in the resources directory. This issue did not occur in version
I agree with teodord : unable to load template because there is a parsing problem due to syntax incompatibility since v7. You can detect the problematic file by adding a breakpoint to JRXmlTemplateLoader.loadTemplate(), line 115 and reading the parameter named location.
Thank you guys. The issue was with my .jrtx
file. I opened it in Jasper Studio 7.0, made a fake change, and saved it to get the new syntax. It worked perfectly.
I recently migrated my
Spring Boot
application fromJasperReports
version6.21.3
to7.0.0
. The following code snippet, responsible for loading my compiledjasper file (.jasper)
and generating aJasperPrint
, worked fine in the previous version but now throws an error in the new version:In
JasperReports 7.0.0
, I am encountering the following error:It seems that
JasperReports 7.0.0
is unable to locate the.jasper
file in the resources directory. This issue did not occur in version6.21.3
. I have verified that the path to the.jasper
file is correct and that the file exists in the resources directory. Here is a screenshot of the code causing the issue: Please let me know if you need any further information or if there are any potential workarounds.