Using instead of

If you get the following error on using getMessages method:-
.getMessage(“”, null, locale); 

org.springframework.context.NoSuchMessageException: No message found under code ‘’ for locale ‘en_US’.
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

You need to change the following line in servlet-contxt.xml file

<beans:bean id="messageSource" class="">    
        <beans:property name="basename" value="classpath:com.mycompany.util.messages" />    


<beans:bean id="messageSource" class="">    
        <beans:property name="basename" value="com/mycompany/util/messages" />  

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your 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