Package javax.validation

Examples of javax.validation.ValidationException


    boolean failFast = programmaticConfiguredFailFast;
    String failFastPropValue = configurationState.getProperties().get( HibernateValidatorConfiguration.FAIL_FAST );
    if ( failFastPropValue != null ) {
      boolean tmpFailFast = Boolean.valueOf( failFastPropValue );
      if ( programmaticConfiguredFailFast && !tmpFailFast ) {
        throw new ValidationException(
            "Inconsistent fail fast configuration. Fail fast enabled via programmatic API, " +
                "but explicitly disabled via properties"
        );
      }
      failFast = tmpFailFast;
View Full Code Here


      ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
      if ( contextClassLoader != null ) {
        return contextClassLoader.loadClass( className );
      }
      else {
        throw new ValidationException( "Unable to load class: " + className );
      }
    }
    catch ( ClassNotFoundException e ) {
      throw new ValidationException( "Unable to load class: " + className, e );
    }
  }
View Full Code Here

    }
    try {
      return Class.forName( className, true, caller.getClassLoader() );
    }
    catch ( ClassNotFoundException e ) {
      throw new ValidationException( "Unable to load class: " + className, e );
    }
  }
View Full Code Here

            )
        );
        log.info( "Using {} as constraint factory.", constraintFactoryClass );
      }
      catch ( ValidationException e ) {
        throw new ValidationException(
            "Unable to instantiate constraint factory class " + constraintFactoryClass + ".", e
        );
      }
    }
  }
View Full Code Here

            "Trying to open input stream for {}.", mappingFileName
        );
      }
      InputStream in = getInputStreamForPath( mappingFileName );
      if ( in == null ) {
        throw new ValidationException( "Unable to open input stream for mapping file " + mappingFileName + "." );
      }
      xmlParameters.addMapping( in );
    }
  }
View Full Code Here

        );
        xmlParameters.setMessageInterpolator( clazz.newInstance() );
        log.info( "Using {} as message interpolator.", messageInterpolatorClass );
      }
      catch ( ValidationException e ) {
        throw new ValidationException(
            "Unable to instantiate message interpolator class " + messageInterpolatorClass + ".", e
        );
      }
      catch ( InstantiationException e ) {
        throw new ValidationException(
            "Unable to instantiate message interpolator class " + messageInterpolatorClass + ".", e
        );
      }
      catch ( IllegalAccessException e ) {
        throw new ValidationException(
            "Unable to instantiate message interpolator class " + messageInterpolatorClass + ".", e
        );
      }
    }
  }
View Full Code Here

        );
        xmlParameters.setTraversableResolver( clazz.newInstance() );
        log.info( "Using {} as traversable resolver.", traversableResolverClass );
      }
      catch ( ValidationException e ) {
        throw new ValidationException(
            "Unable to instantiate traversable resolver class " + traversableResolverClass + ".", e
        );
      }
      catch ( InstantiationException e ) {
        throw new ValidationException(
            "Unable to instantiate traversable resolver class " + traversableResolverClass + ".", e
        );
      }
      catch ( IllegalAccessException e ) {
        throw new ValidationException(
            "Unable to instantiate traversable resolver class " + traversableResolverClass + ".", e
        );
      }
    }
  }
View Full Code Here

            )
        );
        log.info( "Using {} as validation provider.", providerClassName );
      }
      catch ( Exception e ) {
        throw new ValidationException(
            "Unable to instantiate validation provider class " + providerClassName + ".", e
        );
      }
    }
  }
View Full Code Here

      JAXBElement<ValidationConfigType> root = unmarshaller.unmarshal( stream, ValidationConfigType.class );
      validationConfig = root.getValue();
    }
    catch ( JAXBException e ) {
      log.error( "Error parsing {}: {}", VALIDATION_XML_FILE, e.getMessage() );
      throw new ValidationException( "Unable to parse " + VALIDATION_XML_FILE, e );
    }
    finally {
      try {
        inputStream.close();
      }
View Full Code Here

    validationBootstrapParameters = new ValidationBootstrapParameters();
  }

  public ConfigurationImpl(ValidationProvider<?> provider) {
    if ( provider == null ) {
      throw new ValidationException( "Assertion error: inconsistent ConfigurationImpl construction" );
    }
    this.providerResolver = null;
    validationBootstrapParameters = new ValidationBootstrapParameters();
    validationBootstrapParameters.setProvider( provider );
  }
View Full Code Here

TOP

Related Classes of javax.validation.ValidationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.