• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

java.util.MissingResourceException: Can't find bundle for base name

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am trying to call from a JSF command button --> action to call a method on controller java class which in turns call a model java class.

The model java class has a to create an instance of a Final Framework UVW Class in which an object is passed the instance is created by getInstance() method which is public which gets a string from a resource bundle.

private static ResourceBundle resourceBundle = ResourceBundle.getBundle("com.xyz.abcd.properties.Messages");
private static final Logger logger = Logger
.getLogger(UVW.class.toString());
// in side a method

public static final UVW getInstance()
throws Exception {

logger.info(MessageFormat.format(
resourceBundle.getString("LMNOP01"), "getInstance"));


}

I get the following error on my UI JSP page

root cause

java.util.MissingResourceException: Can't find bundle for base name com.xyz.abcd.properties.Messages, locale en_US
java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1521)
java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1260)
java.util.ResourceBundle.getBundle(ResourceBundle.java:715)

Please suggest as i might be missing something....
 
Saloon Keeper
Posts: 27807
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're missing something all right. You're neither being "kool" nor "smart".

We're a very laid-back bunch around here, but the one thing we do insist on is that you use your real name and not some sort of "handle" or alias. If you missed the details, check here: http://www.javaranch.com/name.jsp . The sooner you fix your display name, the sooner you'll get your question answered.
reply
    Bookmark Topic Watch Topic
  • New Topic