I'm experiencing a strange issue with Ubuntu 10.04.1 LTS x86_64 where everything seems to work fine when the system locale is en_US. However, when the system locale is en_GB Spring tries to look for the default resource bundle as en_us rather than en_US.
The exception:
06-Oct-2010 23:35:12 org.springframework.context.support.ResourceBundleMessageSource getResourceBundle
WARNING: ResourceBundle [messages] not found for MessageSource: Can't find bundle for base name messages, locale en_us
System Locale:
taylor@taylor-laptop:~$ locale
LANG=en_GB.utf8
LC_CTYPE="en_GB.utf8"
LC_NUMERIC="en_GB.utf8"
LC_TIME="en_GB.utf8"
LC_COLLATE="en_GB.utf8"
LC_MONETARY="en_GB.utf8"
LC_MESSAGES="en_GB.utf8"
LC_PAPER="en_GB.utf8"
LC_NAME="en_GB.utf8"
LC_ADDRESS="en_GB.utf8"
LC_TELEPHONE="en_GB.utf8"
LC_MEASUREMENT="en_GB.utf8"
LC_IDENTIFICATION="en_GB.utf8"
LC_ALL=
taylor@taylor-laptop:~$
The default Spring locale is setup like below:
<bean id="localeResolver" class="org.springframework.web.servlet.i18n.CookieLocaleResolver">
<property name="cookieName" value="USER_LOCALE" />
<property name="cookieMaxAge" value="1209600" />
<property name="defaultLocale" value="en_US" />
</bean>