Jump to content
Changes to the Jaspersoft community edition download ×

properties problem


Recommended Posts

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

Link to comment
Share on other sites

  • 3 years later...
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic


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.  /tools/fckeditor/editor/images/smiley/msn/sad_smile.gif

Can anybody help me.

Thanks in advance.




Link to comment
Share on other sites

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);            params.put("REPORT_CLASS_LOADER",loader);            JasperPrint print = JasperFillManager.fillReport(is,params,connection);
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...