5 Replies Latest reply: Feb 6, 2013 4:24 PM by Obed Murillo RSS

    Where does the resources bundle files need to be

    Obed Murillo
      Hi All,

      Does any of you knows where all the custom resources bundle files that will be used on BCC need to be?

      I have something like this:

      BCC module /src/com/mycompany/resources/WebAppResources.properties

      But when I try to use it

      This happens

      javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "title" with value "${activity.description}": An error occurred while getting property "description" from an instance of class atg.bizui.activity.GenericActivity (java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key manageLoyaltyProgram.description)

      I am trying to use it on a activity that will be used in the ActivityManager:
      This is what I have
      <resource-bundle>com.mycompany.resources.WebAppResources</resource-bundle>


      Do you know if I am missing somehting or putting the files on a wrong location?

      Regards,
      Obed
        • 1. Re: Where does the resources bundle files need to be
          Nooruddin Shaik
          The location should be in the classpath.

          Can you check if you have resource bundle available in classpath or the module is added to the ear?
          To check if the class or resource available in server, use the utility jhtm page: localhost:7001/dyn/dyn/findclass.jhtml
          Give com.mycompany.resources.WebAppResources.properties file there and see if its avaialble in classpath.

          But from error it looks the properties file didn't make it to classpath of ear file.
          Or the keys are missing in the resource bundle file.

          Peace
          Shaik
          • 2. Re: Where does the resources bundle files need to be
            Obed Murillo
            Hi Shaik,

            It seems that is on the class path look, http://i.imgur.com/weXfnCV.png and the properties keys that I am trying to read does match with the ones on the properties file.

            Regards,
            Obed
            • 3. Re: Where does the resources bundle files need to be
              Obed Murillo
              Hi Shaik,

              The title of for the source is added http://i.imgur.com/a6WVxsW.png but when I click on it it throws this exception:
              javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "value" with value "${activity.displayName}": An error occurred while getting property "displayName" from an instance of class atg.bizui.activity.GenericActivity (java.util.MissingResourceException: Can't find resource for bundle j
              ava.util.PropertyResourceBundle, key emanageLoyaltyProgram.displayName)

              meaning that the properties file is on the classpath, but my genericActivities.xml file is not able to read the properties file.

              Any suggestion?

              Regards,
              Obed
              • 4. Re: Where does the resources bundle files need to be
                Nooruddin Shaik
                Can you share the genericActivities.xml and resourcebundle file?

                I think its not able to find the resource bundle.

                Can you view the genericActivities.xml from dyn/admin and see if you have the expected one?

                And also write a sample test JSP to read the resource bundle file from classpath and print few properties.
                This will explain if resource bundle or property which is missing.

                Peace
                Shaik
                • 5. Re: Where does the resources bundle files need to be
                  Obed Murillo
                  Thank you Shaik,

                  It was a typo that I was not seeing, that explained why I was able to see it in some places and not in the activityManager

                  Regards,
                  Obed