Announcement Announcement Module
Collapse
No announcement yet.
Message Bundle - No Message Found exception Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Finally solved . Thanks, anyway.

    Comment


    • #17
      Hi yagt,

      I have the problem as yours. Can you post the solution for your issue, please.

      Thanks in advance.

      Comment


      • #18
        I meet this issue now.

        Comment


        • #19
          Hi,

          I've come across this problem with properties files for spring at various times.

          I had the default set up for resolving error messages with the message.properties file in my /WEB-INF/classes directory.

          In my application-servlet.xml file I declared the resource bundle like so -

          Code:
          <bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
                   <property name="basename" value="messages"/> 
                </bean>
          However, I still got the exception - org.springframework.context.NoSuchMessageException : No message found under code......

          It seems that because I have other properties files in the same base classpath spring is confusing them and reading the wrong file. When I change the path in which my message.properties file lives, and change the basename property accordingly like so -

          Code:
          <bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
                   <property name="basename" value="/WEB-INF/messages/messages"/> 
                </bean>
          It works fine.

          So, it seems that when you have multiple properties files with different names ensure you explicitly define the path to that props' file. Don't rely on the default spring convention finding the file.

          Comment

          Working...
          X