Examples of InvalidConfigurationException


Examples of org.jboss.bootstrap.spi.config.InvalidConfigurationException

      if (direct == null)
      {
         // Ensure we may construct this via home+name
         if (home == null || (name == null || name.length() == 0))
         {
            throw new InvalidConfigurationException(
                  "If the bootstrap URL is not specified, both the bootstrap home and name must be.");
         }
      }

      // If no conf
      if (conf == null)
      {
         // Ensure we may construct this from home
         if (home == null)
         {
            throw new InvalidConfigurationException("Bootstrap configuration location must be specified explicity, "
                  + "or a home must be provided such that it may be constructed");
         }
      }

      // Log
View Full Code Here

Examples of org.jboss.bootstrap.spi.config.InvalidConfigurationException

         {
            newBootstrapUrl = new URL(home, name);
         }
         catch (MalformedURLException e)
         {
            throw new IllegalArgumentException(new InvalidConfigurationException(
                  "Cannot construct bootstrapURL from home and name", e));
         }

         // Log
         log.debug("New bootstrap URL: " + newBootstrapUrl.toExternalForm());
View Full Code Here

Examples of org.jboss.remoting.InvalidConfigurationException

        String[] remotePojosDefs = remotePojosPropStr.split("\\s*,\\s*");

        for (int i = 0; i < remotePojosDefs.length; i++) {
            String[] classAndInterfaceNames = remotePojosDefs[i].split("\\s*:\\s*");
            if (classAndInterfaceNames.length != 2) {
                throw new InvalidConfigurationException(LOG.getMsgString(
                    CommI18NResourceKeys.SERVICE_CONTAINER_REMOTE_POJO_CONFIG_INVALID,
                    ServiceContainerConfigurationConstants.REMOTE_POJOS, remotePojosDefs[i], remotePojosPropStr));
            }

            String pojo_class_name = classAndInterfaceNames[0];
View Full Code Here

Examples of org.jclouds.karaf.services.InvalidConfigurationException

     * @param properties
     * @throws InvalidConfigurationException
     */
    public static void validate(ApiMetadata apiMetadata, Dictionary properties) throws InvalidConfigurationException {
        if (Strings.isNullOrEmpty((String) properties.get(ChefConstants.CLIENT_NAME))) {
            throw new InvalidConfigurationException("No client name specified.");
        }

        if (Strings.isNullOrEmpty((String) properties.get(ChefConstants.VALIDATOR_NAME))) {
            throw new InvalidConfigurationException("No validator name specified.");
        }

        if (Strings.isNullOrEmpty((String) properties.get(ChefConstants.ENDPOINT)) && !apiMetadata.getDefaultEndpoint().isPresent()) {
            throw new InvalidConfigurationException("No endpoint specified specified.");
        }
    }
View Full Code Here

Examples of org.mybatis.generator.exception.InvalidConfigurationException

        context.validate(errors);
      }
    }

    if (errors.size() > 0) {
      throw new InvalidConfigurationException(errors);
    }
  }
View Full Code Here

Examples of org.sonatype.configuration.validation.InvalidConfigurationException

    try {
      repo.defaultLocalStorageUrl = defaultStorageFile.toURI().toURL().toString();
    }
    catch (MalformedURLException e) {
      // will not happen, not user settable
      throw new InvalidConfigurationException("Malformed URL for LocalRepositoryStorage!", e);
    }

    String localUrl;
    boolean usingDefaultLocalUrl;

    if (repo.getLocalStorage() != null && !Strings.isNullOrEmpty(repo.getLocalStorage().getUrl())) {
      localUrl = repo.getLocalStorage().getUrl();
      usingDefaultLocalUrl = false;
    }
    else {
      localUrl = repo.defaultLocalStorageUrl;
      usingDefaultLocalUrl = true;
    }

    if (repo.getLocalStorage() == null) {
      repo.setLocalStorage(new CLocalStorage());

      repo.getLocalStorage().setProvider("file");
    }

    LocalRepositoryStorage ls = getLocalRepositoryStorage(repo.getId(), repo.getLocalStorage().getProvider());

    try {
      ls.validateStorageUrl(localUrl);

      if (!usingDefaultLocalUrl) {
        repo.getLocalStorage().setUrl(localUrl);
      }

      repository.setLocalStorage(ls);
      // mark local storage context dirty, if applicable
      final LocalStorageContext ctx = repository.getLocalStorageContext();
      if (ctx != null) {
        ctx.incrementGeneration();
      }
    }
    catch (LocalStorageException e) {
      ValidationResponse response = new ApplicationValidationResponse();

      ValidationMessage error =
          new ValidationMessage("overrideLocalStorageUrl", "Repository has an invalid local storage URL '"
              + localUrl, "Invalid file location");

      response.addValidationError(error);

      throw new InvalidConfigurationException(response);
    }

    // clear the NotFoundCache
    if (repository.getNotFoundCache() != null) {
      repository.getNotFoundCache().purge();
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.