Examples of ValidationException


Examples of com.googlecode.jmxtrans.model.ValidationException

      } else {
        try {
          logger = initLogger("/dev/null");
          loggers.put("/dev/null", logger);
        } catch (IOException e) {
          throw new ValidationException("Failed to setup log4j", query);
        }
      }

      if (loggers.containsKey(outputFile.getAbsolutePath())) {
        loggers.remove(outputFile.getAbsolutePath());
      }
      return;
    } else if (loggers.containsKey(outputFile.getAbsolutePath())) {
      logger = loggers.get(outputFile.getAbsolutePath());
      return;
    }

    try {
      logger = initLogger(outputFile.getAbsolutePath());
      loggers.put(outputFile.getAbsolutePath(), logger);
    } catch (IOException e) {
      throw new ValidationException("Failed to setup log4j", query);

    }
  }
View Full Code Here

Examples of com.googlecode.jmxtrans.util.ValidationException

        try {
            templateFile = (String) getSettings().get("templateFile");
            outputPath = (String) getSettings().get("outputPath");
        }
        catch(Exception e) {
            throw new ValidationException(e.getMessage(), q);
        }
    }
View Full Code Here

Examples of com.im.imjutil.exception.ValidationException

    if (unitProperties != null) {
      this.unitProperties = unitProperties;
    }
   
    if (clazz == null) {
      throw new ValidationException("Parametro clazz e nulo");
    }
    this.clazz = clazz;
   
    if (em == null) {
      // Inicializa a unidade de persistencia
View Full Code Here

Examples of com.intel.mountwilson.as.common.ValidationException

    @GET
    @Consumes(MediaType.TEXT_PLAIN)
    @Produces(MediaType.APPLICATION_XML)
    @Path("/trust")
    public JAXBElement<HostsTrustReportType> getTrustReport(@QueryParam("hostNames")String hostNamesCSV) {
        if( hostNamesCSV == null || hostNamesCSV.isEmpty() ) { throw new ValidationException("Missing hostNames parameter"); }
        return new JAXBElement<HostsTrustReportType>(new QName("hosts_trust_report"),HostsTrustReportType.class, reportsBO.getTrustReport(hostnameListFromCSV(hostNamesCSV))); // datatype.Hostname           
    }
View Full Code Here

Examples of com.mes.sdk.exception.ValidationException

        }
        sum += n;
        alternate = !alternate;
      }
    } catch(NumberFormatException e) {
      throw new ValidationException(e.getMessage());
    }
    return (sum % 10 == 0);
  }
View Full Code Here

Examples of com.netflix.config.validation.ValidationException

   
    @Test
    public void testValidation() {
        DynamicStringProperty prop = new DynamicStringProperty("abc", "default") {
            public void validate(String newValue) {
                throw new ValidationException("failed");
            }
        };
        try {
            ConfigurationManager.getConfigInstance().setProperty("abc", "new");
            fail("ValidationException expected");
View Full Code Here

Examples of com.opensymphony.xwork2.validator.ValidationException

        // happen
        // This is a critical exception, so we better throw a
        // ValidationException
        // no need to continue
        logger.error(e);
        throw new ValidationException("Could not open inputstream for "
            + i);
      }
      imageSize = (int) i.length();
    } else {
      // it's .. uhm, something else. A football ? A hot blonde's address
      // ? Fourty Two ? We'll never know ..
      throw new ValidationException(
          "Invalid object. Expect either a String or File object. Object is "
              + image.getClass().getName());
    }
    if (!ii.check()) {
      setMessageKey(getMessageKey() + ".invalid");
View Full Code Here

Examples of com.porterhead.rest.exception.ValidationException

    }

    protected void validate(Object request) {
        Set<? extends ConstraintViolation<?>> constraintViolations = validator.validate(request);
        if (constraintViolations.size() > 0) {
            throw new ValidationException(constraintViolations);
        }
    }
View Full Code Here

Examples of com.psddev.dari.db.ValidationException

                        first();
            }

            if (schedule != null || publishDate != null) {
                if (!state.validate()) {
                    throw new ValidationException(Arrays.asList(state));
                }

                if (draft == null || param(boolean.class, "newSchedule")) {
                    draft = new Draft();
                    draft.setOwner(user);
View Full Code Here

Examples of com.pugh.sockso.ValidationException

    private void validateInputFields() throws ValidationException {
   
        final Validater v = new Validater( db );
       
        if ( !v.checkRequiredFields( new JTextComponent[] { txtName, txtPass1, txtEmail }) )
            throw new ValidationException( locale.getString("gui.error.missingField") );
       
        if ( !v.isValidEmail(txtEmail.getText()) )
            throw new ValidationException( locale.getString("gui.error.invalidEmail") );

        String pass1 = new String( txtPass1.getPassword() );
        String pass2 = new String( txtPass2.getPassword() );
        if ( !pass1.equals(pass2) )
            throw new ValidationException( locale.getString("gui.error.passwordsDontMatch") );

        if ( v.usernameExists(txtName.getText()) )
            throw new ValidationException( locale.getString("gui.error.duplicateUsername") );

        if ( v.emailExists(txtEmail.getText()) )
            throw new ValidationException( locale.getString("gui.error.duplicateEmail") );

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.