You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Gabrielle Crawford (Created) (JIRA)" <de...@myfaces.apache.org> on 2012/01/24 23:14:41 UTC

[jira] [Created] (TRINIDAD-2207) log message when bean validation code throws exception

log message when bean validation code throws exception
------------------------------------------------------

                 Key: TRINIDAD-2207
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-2207
             Project: MyFaces Trinidad
          Issue Type: Bug
    Affects Versions: 2.0.2-core
            Reporter: Gabrielle Crawford


In UIXEditableValue ._isBeanValidationAvailable() there's this code: 

       couldLoadBeanValidationAPI = Boolean.valueOf(ClassLoaderUtils.loadClass("javax.validation.Validation") != null);

        if (couldLoadBeanValidationAPI)
        {
          try
          {
            // Trial-error approach to check for Bean Validation impl existence.
            Validation.buildDefaultValidatorFactory().getValidator();
          }
          catch (Exception validationException)
          {
            // SPEC section 3.5.6.2:
            // TODO do a i18n version of the error msg
            throw new FacesException("A ValidatorFactory can not be retrieved", validationException);


>From section 3.5.6.2 of the spec "If the BeanValidator is used an no ValidatorFactory can be retrieved, a FacesException is raised. "

However only BeanValidator needs to throw a FacesException, the trinidad code is more like the mojarra ApplicationConfigProcessor code, which just logs a message if there's an exception.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira