2 Replies Latest reply on Nov 14, 2008 3:01 AM by oho17

    Classloading Issue with BeanValidator

    oho17

      Hi,
      I've got a classloading issue with BeanValidator and the a resource bundle defined in the faces-config.xml.

      The problem is within the following code in the org.richfaces.validator.BeanValidator class.

      private ResourceBundle getCurrentResourceBundle(Locale locale) {
       if (null == FacesContext.getCurrentInstance()
       || null == FacesContext.getCurrentInstance().getApplication()) {
       throw new FacesException(FACES_CONTEXT_IS_NULL);
       }
       String appBundle = FacesContext.getCurrentInstance().getApplication()
       .getMessageBundle();
       if (null == appBundle || null == locale) {
       return null;
       }
       ResourceBundle bundle = ResourceBundle.getBundle(appBundle, locale);
       return bundle;
       }
      
      


      This code doesn't use the TCCL which causes problems under OSGi deployment.
      Is it possible to change the instance of the BeanValidator that is used?

      Any hint to solve the problem would be most welcome

      Thx Otto