4 Replies Latest reply on Oct 6, 2006 4:04 AM by lara khoury

    Problem with ResourceBundle using Seam

    lara khoury Newbie

      I have a method inside a java class which looks as follows:

      protected static String readProperty(String propertyName, String bundleName) {
      String value = ResourceBundle.getBundle(bundleName).getString(propertyName);
      if (value == null) {
      throw new MissingResourceException("Property not found", bundleName,
      propertyName);
      }
      return value;
      }

      I am getting an exception:

      Caused by: java.util.MissingResourceException: Can't find bundle for base name af_delegate, locale en_US

      where af_delegate is the bundleName

      Where should the af_delagte.properties file be located and how can I point to it?

      The hierarchy of my project in Eclipse looks as follows (I'm using Seam):
      ProjectName/af/core/src => java class including the method
      ProjectName/resources/af/af_delagate.properties

      Please help!
      Regards,
      Lara