properties problem

hello i have a repport with .properties .
under ireport no problem to use the properties.
but under java and jasperreport it does not find me the file properties

“Can't find bundle for base name liste_anniversaire, locale fr_CH"

my files .jasper and .properties are in the same file

thank you in advance
lazzer's picture
Joined: Aug 2 2006 - 5:12pm
Last seen: 16 years 7 months ago

3 Answers:


I am facing the same issue described above, i can get it to work from iReport but when i try to do the same at runtime from the web application i get that "Can't find bundle for base name..." error

The .properties files are in the same location as the .jrxml

I am setting the locale by passing the REPORT_LOCALE parameter, i tried by passing the resource bundle directly without any luck.

i also tried by setting the report classpath pointing to the source folder.


I'm completly lost in this point. 

Can anybody help me.

Thanks in advance.




zeva's picture
Joined: Dec 9 2009 - 12:17pm
Last seen: 13 years 3 months ago

The Web Application is looking for the ResourceBundle in it's CLASSPATH;

The CLASSPATH of a WebApplication is relative to the WEB-INF folder. So you may try to place your properties file(s)  in the WEB-INF folder.

Or you could pass a custom classloader to the JasperFillManager. You can do this from any Java Application (not necessarily a web application).This way it doesn't matter where you keep your properties files as long as you let the fill manager know where to look for them on disk.

Hope that helps

            URL[] url = {new File("D:/propertiesFolder/").toURL()};
            URLClassLoader loader = new URLClassLoader(url);
            JasperPrint print = JasperFillManager.fillReport(is,params,connection);
spera's picture
Joined: Jul 23 2009 - 3:31am
Last seen: 13 years 8 months ago

Perfect!!! That's what i needed. It works!

Thanks for your quick reply spera!!

zeva's picture
Joined: Dec 9 2009 - 12:17pm
Last seen: 13 years 3 months ago