Examples of ConfigurationException


Examples of org.codehaus.activemq.ConfigurationException

        this.discoveryAgent = discoveryAgent;
    }

    public void start() throws JMSException {
        if (discoveryAgent == null) {
            throw new ConfigurationException("Must be configured with a discoveryAgent property");
        }

        // lets pass into the agent the broker name and connection details
        discoveryAgent.setDiscoveryListener(this);
        discoveryAgent.start();
View Full Code Here

Examples of org.codehaus.dna.ConfigurationException

            return m_value;
        }
        else
        {
            final String message = "No value specified";
            throw new ConfigurationException( message, getPath(), getLocation() );
        }
    }
View Full Code Here

Examples of org.codinjutsu.tools.jenkins.exception.ConfigurationException

            }
            if (isRedirection(statusCode)) {
                responseCollector.collect(statusCode, post.getResponseHeader("Location").getValue());
            }
        } catch (HttpException httpEx) {
            throw new ConfigurationException(String.format("HTTP Error during method execution '%s': %s", url, httpEx.getMessage()), httpEx);
        } catch (UnknownHostException uhEx) {
            throw new ConfigurationException(String.format("Unknown server: %s", uhEx.getMessage()), uhEx);
        } catch (IOException ioEx) {
            throw new ConfigurationException(String.format("IO Error during method execution '%s': %s", url, ioEx.getMessage()), ioEx);
        } finally {
            IOUtils.closeQuietly(inputStream);
            post.releaseConnection();
        }
    }
View Full Code Here

Examples of org.codinjutsu.tools.mongo.logic.ConfigurationException

    }

    private void validateUrls() {
        List<String> serverUrls = getServerUrls();
        if (serverUrls == null) {
            throw new ConfigurationException("URL(s) should be set");
        }
        for (String serverUrl : serverUrls) {
            String[] host_port = serverUrl.split(":");
            if (host_port.length < 2) {
                throw new ConfigurationException(String.format("URL '%s' format is incorrect. It should be 'host:port'", serverUrl));
            }

            try {
                Integer.valueOf(host_port[1]);
            } catch (NumberFormatException e) {
                throw new ConfigurationException(String.format("Port in the URL '%s' is incorrect. It should be a number", serverUrl));
            }
        }

    }
View Full Code Here

Examples of org.custommonkey.xmlunit.exceptions.ConfigurationException

            if (controlEntityResolver!=null) {
                builder.setEntityResolver(controlEntityResolver);
            }
            return builder;
        } catch (ParserConfigurationException ex) {
            throw new ConfigurationException(ex);
        }
    }
View Full Code Here

Examples of org.dayatang.configuration.ConfigurationException

  public Date getDate(String key, Date defaultValue) {
    String result = getString(key);
    try {
      return StringUtils.isBlank(result) ? defaultValue : new SimpleDateFormat(dateFormat).parse(result);
    } catch (ParseException e) {
      throw new ConfigurationException("日期解析错误!日期格式是:" + dateFormat + ", 日期:" + result, e);
    }
  }
View Full Code Here

Examples of org.dbpedia.spotlight.exceptions.ConfigurationException

    public TopicalClassificationConfiguration(String configFileName) throws ConfigurationException {
        //Read config properties:
        try {
            config.load(new FileInputStream(new File(configFileName)));
        } catch (IOException e) {
            throw new ConfigurationException("Cannot find configuration file "+configFileName,e);
        }

        if (config.getProperty(CLASSIFIER_TYPE) == null || config.getProperty(CLASSIFIER_PATH) == null)
            throw new ConfigurationException(String.format("Please validate your configuration in file %s for topical classification.",configFileName));

        File priors =  new File(config.getProperty(TOPICAL_PRIORS));
        if(!priors.exists())
            LOG.warn("Topical priors do not exist!");
View Full Code Here

Examples of org.dcm4che3.conf.api.ConfigurationException

                return null;
            try {
                Method method = field.getType().getMethod("valueOf", String.class);
                return (Enum<?>) method.invoke(null, serialized);
            } catch (Exception x) {
                throw new ConfigurationException("Deserialization of Enum failed! field:"+field, x);
            }
        }
View Full Code Here

Examples of org.dtk.resources.exceptions.ConfigurationException

       
        // Construct HTTP 201 response, containing text body.
        created = Response.created(new URI(packageLocation)).entity(htmlEncodedJsonPackageDetails).build();
      } catch (FileNotFoundException e) {
        logger.log(Level.SEVERE, String.format(errorCreatingPackageLogMsg, e.getMessage()));
        throw new ConfigurationException(fatalProcessingErrorMsg);
      } catch (IOException e) {
        logger.log(Level.SEVERE, String.format(errorCreatingPackageLogMsg, e.getMessage()));
        throw new IncorrectParameterException(invalidRequestErrorMsg);
      } catch (URISyntaxException e) {
        logger.log(Level.SEVERE, String.format(errorCreatingPackageLocationLogMsg, e.getMessage()));
        throw new ConfigurationException(fatalProcessingErrorMsg);
      }
    } else {
      throw new IncorrectParameterException(missingAppParameterErrorMsg);
    }
View Full Code Here

Examples of org.ejbca.extra.caservice.ConfigurationException

  public static Collection<Certificate> getCACertChain(Admin admin, String cAName, boolean checkRevokation, CAAdminSession caAdminSession) throws ConfigurationException{   
    try{
      CAInfo cainfo = caAdminSession.getCAInfo(admin, cAName);
      if(cainfo == null){
        log.error("Misconfigured CA Name in RAService");
        throw new ConfigurationException("Misconfigured CA Name in RAService");
      }
     
      if(checkRevokation){
        if(cainfo.getStatus()==SecConst.CA_REVOKED){
        throw new ConfigurationException("CA " + cainfo.getName() + " Have been revoked");
        }
     
        Iterator<Certificate> iter = cainfo.getCertificateChain().iterator();
        iter.next(); // Throw away the first one.
        while(iter.hasNext()){
        X509Certificate cacert = (X509Certificate) iter.next();
        CAInfo cainfo2 = caAdminSession.getCAInfo(admin,CertTools.stringToBCDNString(cacert.getSubjectDN().toString()).hashCode());
        // This CA may be an external CA, so we don't bother if we can not find it.
        if ((cainfo2 != null) && (cainfo2.getStatus()==SecConst.CA_REVOKED) ) {
          throw new ConfigurationException("CA " + cainfo2.getName() + " Have been revoked");
        }
        }
      } 
      return cainfo.getCertificateChain();
    }catch(Exception e){
      if (e instanceof ConfigurationException) {
        throw (ConfigurationException)e;
      }
      log.error("Exception getting CA cert chain: ", e);
      throw new ConfigurationException("Couldn't instantiate CAAdminSessionBean");
   
  }
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.