TIBCOSoftware / jasperreports

JasperReports® - Free Java Reporting Library
https://community.jaspersoft.com/downloads/community-edition/
GNU Lesser General Public License v3.0
1.04k stars 401 forks source link

jasperreports.properties being ignored #120

Closed Canos closed 3 years ago

Canos commented 4 years ago

I deploy an ear application in multiple servers, without any logic behind, some of them are ignoring jasperreports.properties but others are working as expected (taking the configuration from jasperreports.properties).

Is there a way to use a more precise programatic way to config the tool?

Versions: Ubuntu 18.04 Java 8 Jasper: 6.11 The application is running on a Glassfish 5

Canos commented 4 years ago

Well I ended up configuring programatically and it seems to be more predictible.

JasperReportsContext jasperReportsContext = DefaultJasperReportsContext.getInstance();

jasperReportsContext.setProperty("net.sf.jasperreports.components.qrcode.character.encoding", "");
jasperReportsContext.setProperty("net.sf.jasperreports.components.barcode4j.image.producer", "svg");
jasperReportsContext.setProperty("net.sf.jasperreports.components.barcode4j.qrcode.producer.svg", "my.package.QRCodeSVGImageProducer");
teodord commented 3 years ago

This seems to be some deployment classpath related issue. I don't think it is related to JasperReports Library itself but rather to the way the server is dealing with class loading.