“Message” or “message”, that is the question!

Hi,

I just found a strange behavior for JSF message resource configuration. My app runs fine on Windows, but fails in Unix box with this:

java.util.MissingResourceException: Can’t find bundle for base name Messages, locale en.

Checking my face-config.xml,  it has

<application>
<message-bundle>Messages</message-bundle>
….

My classpath has message.properties file.  It works on Windows because for Windows is not case sensitive, but Unix is. Thus, after changing it to:

<message-bundle>messages</message-bundle>

All works fine now.

The moral of the story is – mind your cases. I don’t Shakespeare would disagree either.

-Cheers!

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s