Announcement Announcement Module
Collapse
No announcement yet.
Can't find bundle for base name classpath:message Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can't find bundle for base name classpath:message

    Hi

    I am having trouble in getting the resource bundle getting picked up by my app.

    Here are the configs setting:
    *-servlet.xml

    <!-- Message Source -->
    <bean id="messageSource"
    class="org.springframework.context.support.Resourc eBundleMessageSource">
    <property name="basename" value="classpath:message"></property>
    </bean>


    And I have the corresponding message.properties in my classpath and when i build , I can see the file under /classes/message.properties.

    But when I run myapp ( tomcat 6 ) , I get the following error:

    [org.springframework.context.support.ResourceBundle MessageSource] - <ResourceBundle [classpath:message] not found for MessageSource: Can't find bundle for base name classpath:message, locale en_US>

    - I have tried different things ( after googling around )
    like : changing the value specified in the basename to /WEB-INF/message and then keeping the massage.properties under the directory /WEB-INF/messsage.properties

    Also i tried to change the name of the file to mymessage.properties and ofcourse change the basename to mymessage.properties. But no luck.
    but I cant get this simple thing to work.
    Any help is much appreciated.
    Last edited by tdhaayushverma; Jun 10th, 2008, 04:51 PM.

  • #2
    Its been a while and i am still stuck on this. Any help plz.

    Comment


    • #3
      Did you try removing the "classpath:" and just try with "message" ? You dont need to prefix it with "classpath:" and you also dont need to suffix with ".properties"

      Comment


      • #4
        removing the classpath did the trick.

        I was trying this for a long time. tried so many things but didnt remove that stupid classpath.
        This forum is great.

        Thank you very much.

        Although why would the classpath option not work. \I have a similar setting in my web.xml and that works fine.
        Example:
        <init-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath*ollcentral-servlet.xml</param-value>
        </init-param>

        Comment

        Working...
        X