This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
kool smart
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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....
 
Tim Holloway
Bartender
Posts: 18705
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!