lazzer Posted August 3, 2006 Share Posted August 3, 2006 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 error:“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 More sharing options...
zeva Posted December 9, 2009 Share Posted December 9, 2009 Hi,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..." errorThe .properties files are in the same location as the .jrxmlI 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.gifCan anybody help me.Thanks in advance. Zeva. Link to comment Share on other sites More sharing options...
spera Posted December 10, 2009 Share Posted December 10, 2009 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 helpsCode: 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 More sharing options...
zeva Posted December 10, 2009 Share Posted December 10, 2009 Perfect!!! That's what i needed. It works!Thanks for your quick reply spera!!/tools/fckeditor/editor/images/smiley/msn/teeth_smile.gif Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now