Examples of ConfigurationException


Examples of com.adahas.tools.jmxeval.exception.ConfigurationException

   */
  public ElementBuilder() throws ConfigurationException {
    try {
      mappings.load(ElementBuilder.class.getResourceAsStream("/mapping.properties"));
    } catch (IOException e) {
      throw new ConfigurationException("Error reading mapping.properties", e);
    }
  }
View Full Code Here

Examples of com.atlassian.connect.play.java.ConfigurationException

            final byte[] sigBytes = sign(signature, privateKey, message);
            final boolean verify = verify(signature, publicKey, message, sigBytes);

            if (!verify)
            {
                throw new ConfigurationException("Checking key pair failed. It seems the public and private key don't" +
                        " belong to the same key pair. Please check your configuration. We're using the following keys," +
                        " is that what you expected?\n" +
                        AC.publicKey.get() + "\n" +
                        AC.privateKey.get());
            }
        }
        catch (InvalidKeyException | SignatureException e)
        {
            throw new ConfigurationException("Couldn't check key pair because of the following exception.", e);
        }
    }
View Full Code Here

Examples of com.baasbox.exception.ConfigurationException

      for (Object v : values) {
          try {
        if ( ((String)en.getMethod("getKey").invoke(v)).equalsIgnoreCase(iKey)  )
          return v;
      } catch (Exception e) {
        throw new ConfigurationException ("Is it " + en.getCanonicalName() + " an Enum that implements the IProperties interface?",e );
      }
        }
    return null;
  //findByKey
View Full Code Here

Examples of com.basistech.m2e.code.quality.shared.ConfigurationException

        log.debug("entering copyUrlResourceToProject");
        Preconditions.checkNotNull(resc);
        Preconditions.checkNotNull(newLocation);
        final URL urlResc = this.resourceResolver.resolveLocation(resc);
        if (urlResc == null) {
            throw new ConfigurationException(String.format("[%s]: could not locate resource [%s]", LOG_PREFIX, resc));
        }
        // copy the file to new location
        final File newLocationFile = new File(this.project.getLocationURI().getPath(), newLocation);
        try {
            FileUtils.copyStreamToFile(new URLInputStreamFacade(urlResc), newLocationFile);
        } catch (IOException ex) {
            throw new ConfigurationException(String.format("[%s]: could not copy resource [%s] to [%s], reason [%s]",
                LOG_PREFIX, resc, newLocationFile, ex.getLocalizedMessage()));
        }
    }
View Full Code Here

Examples of com.caucho.config.ConfigurationException

    throws ConfigurationException
  {
    super(service);

    if (_mode != Service.Mode.MESSAGE)
      throw new ConfigurationException(L.l("{0} implements Provider<SOAPMessage> must have @ServiceMode annotation with value Service.Mode == MESSAGE", _class.getName()));

    try {
      BindingType bindingType
        = (BindingType) _class.getAnnotation(BindingType.class);

      if (bindingType != null &&
          bindingType.value().equals(SOAPBinding.SOAP12HTTP_BINDING))
        _factory = MessageFactory.newInstance(SOAP_1_2_PROTOCOL);
      else
        _factory = MessageFactory.newInstance(SOAP_1_1_PROTOCOL);
    }
    catch (SOAPException e) {
      throw new ConfigurationException(e);
    }
  }
View Full Code Here

Examples of com.cloud.bridge.service.exception.ConfigurationException

            --numIPs;
        } catch (NumberFormatException nfe) {
            // okay, it's an ip address, not a port number
        }
        if (numIPs <= 0) {
            throw new ConfigurationException("No CAStor nodes specified in '" + mountedRoot + "'");
        }
        HashSet<String> ips = new HashSet<String>();
        String clusterName = null;
        for ( int i = 0; i < numIPs; ++i ) {
            String option = cfg[i+1]; // ip address or zeroconf=mycluster.example.com or domain=mydomain.example.com
            if (option.toLowerCase().startsWith("zeroconf=")) {
                String[] confStr = option.split("=");
                if (confStr.length != 2) {
                    throw new ConfigurationException("Could not parse cluster name from '" + option + "'");
                }
                clusterName = confStr[1];
            } else if (option.toLowerCase().startsWith("domain=")) {
                String[] confStr = option.split("=");
                if (confStr.length != 2) {
                    throw new ConfigurationException("Could not parse domain name from '" + option + "'");
                }
                _domain = confStr[1];
            } else {
                ips.add(option);
            }
        }
        if (clusterName == null && ips.isEmpty()) {
            throw new ConfigurationException("No CAStor nodes specified in '" + mountedRoot + "'");
        }
        String[] castorNodes = ips.toArray(new String[0])// list of configured nodes
        if (clusterName == null) {
            try {
                _locator = new StaticLocator(castorNodes, castorPort, LOCATOR_RETRY_TIMEOUT);
                _locator.start();
            } catch (IOException e) {
                throw new ConfigurationException("Could not create CAStor static locator for '" +
                                                 Arrays.toString(castorNodes) + "'");
            }
        } else {
            try {
                clusterName = clusterName.replace(".", "_"); // workaround needed for CAStorSDK 1.3.1
                _locator = new ZeroconfLocator(clusterName);
                _locator.start();
            } catch (IOException e) {
                throw new ConfigurationException("Could not create CAStor zeroconf locator for '" + clusterName + "'");
            }
        }
        try {
            s_logger.info("CAStor client starting: " + (_domain==null ? "default domain" : "domain " + _domain) + " " + (clusterName==null ? Arrays.toString(castorNodes) : clusterName) + " :" + castorPort);
            _scspClient = new ScspClient(_locator, castorPort, DEFAULT_MAX_POOL_SIZE, DEFAULT_MAX_RETRIES, CONNECTION_TIMEOUT, CM_IDLE_TIMEOUT);
            _scspClient.start();
        } catch (Exception e) {
            s_logger.error("Unable to create CAStor client for '" + mountedRoot + "': " + e.getMessage(), e);
            throw new ConfigurationException("Unable to create CAStor client for '" + mountedRoot + "': " + e);
        }
        return _scspClient;
    }
View Full Code Here

Examples of com.codeforces.graygoose.exception.ConfigurationException

        getTemplateEngineConfiguration().setEncoding(ApplicationContext.getInstance().getLocale(), "UTF-8");

        try {
            getRequest().setCharacterEncoding("UTF-8");
        } catch (UnsupportedEncodingException e) {
            throw new ConfigurationException("Can't find UTF-8.", e);
        }
        getResponse().setCharacterEncoding("UTF-8");
        getResponse().setContentType("text/html");
    }
View Full Code Here

Examples of com.couchbase.client.core.config.ConfigurationException

    @Override
    protected Observable<String> discoverConfig(final String bucket, final String password, final InetAddress hostname) {
        if (!env().bootstrapCarrierEnabled()) {
            LOGGER.info("Carrier Bootstrap manually disabled.");
            return Observable.error(new ConfigurationException("Carrier Bootstrap disabled through configuration."));
        }
        return cluster()
            .<GetBucketConfigResponse>send(new GetBucketConfigRequest(bucket, hostname))
            .map(new Func1<GetBucketConfigResponse, String>() {
                @Override
View Full Code Here

Examples of com.couchbase.client.vbucket.ConfigurationException

  }

  public Config getVBucketConfig() {
    Bucket config = configurationProvider.getBucketConfiguration(bucket);
    if(config == null) {
      throw new ConfigurationException("Could not fetch valid configuration "
        + "from provided nodes. Stopping.");
    } else if (config.isNotUpdating()) {
      LOGGER.warning("Noticed bucket configuration to be disconnected, "
        + "will attempt to reconnect");
      setConfigurationProvider(new ConfigurationProviderHTTP(storedBaseList,
View Full Code Here

Examples of com.dbxml.labrador.configuration.ConfigurationException

               client.setProperty(name, value);
            }
         });
      }
      catch ( ClassNotFoundException e ) {
         throw new ConfigurationException(e.getMessage());
      }
      catch ( InstantiationException e ) {
         throw new ConfigurationException(e.getMessage());
      }
      catch ( IllegalAccessException e ) {
         throw new ConfigurationException(e.getMessage());
      }
   }
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.