java.util.MissingResourceException: Can't find bundle for base name localemsgs_en_US, locale en_US

Hi Everybody,

please help me out in resolving the below issue:

java.util.MissingResourceException: Can't find bundle for base name localemsgs_en_US, locale en_US
java.util.ResourceBundle.throwMissingResourceException
java.util.ResourceBundle.getBundleImpl
java.util.ResourceBundle.getBundle
net.sf.jasperreports.engine.util.JRResourcesUtil.loadResourceBundle
net.sf.jasperreports.engine.util.JRResourcesUtil.loadResourceBundle
 

I'm getting this error when I run the report in jasperserver 5.5. Thanks In Advance, Mayo

mayora's picture
3
Joined: Jan 6 2014 - 9:29pm
Last seen: 9 years 1 month ago

2 Answers:

Hello,

This error means that your report uses a resource bundle named localemsgs_en_US, but it is not included as a resource on the server.  In the report properties in the JRXML, you will have a bundle name.  This will be inside the jasperReport element as "resourceBundle=localemsgs_en_US."  You need to add this as a resource of the report in the edit report menu and name it localemsgs_en_US.properties.

Regards,

-Kris

kcollins's picture
12351
Joined: Aug 30 2011 - 12:22pm
Last seen: 2 years 7 months ago

Adding resourse bundles and external jar files:

This may not be the same version as the asker, but in Jaspersoft Studio 6.0.3 I solved the same problem I was having by creating a folder names resources in the My Reports folder. I put all my message_*.properties files and *.jpg files in it. In Jaspersoft, in the Project Explorer:

--> right click resources --> Build Path --> Use as Source

I also create a folder named lib and put a util.jar file in there that contained some util classes. Then, in a similar way

--> right click util.jar --> Build Path --> Add to Build Path

you can get to the general build/source configuration menus by right clicking pretty much any element in the explorer and picking --> Build Path --> Configure Build Path...

after that EXIT and RESTART the Jaspersoft Studio!!

PMSD's picture
198
Joined: Feb 26 2015 - 8:11am
Last seen: 7 years 1 week ago
Feedback