Examples of ConfigurationException


Examples of com.sun.faban.driver.ConfigurationException

                                                    RunInfo.DRIVERURI, "name");
            if (nl.getLength() > 1) {
                String msg = "Only one operation name allowed in each " +
                        "operation mix.";
                getLogger().severe(msg);
                ConfigurationException e = new ConfigurationException(msg);
                getLogger().throwing(className, "configure", e);
                throw e;
            }
            String name = nl.item(0).getFirstChild().getNodeValue();
            nl = opMix.getElementsByTagNameNS(RunInfo.DRIVERURI, "r");
            if (nl.getLength() > 1) {
                String msg = "Only one ratio allowed for @FlatMix";
                getLogger().severe(msg);
                ConfigurationException e = new ConfigurationException(msg);
                getLogger().throwing(className, "configure", e);
                throw e;
            }
            Double ratio = new Double(nl.item(0).getFirstChild().
                    getNodeValue());
            ratioMap.put(name, ratio);
        }

        if (ratioMap.size() <= 0) {
      return;
    }

        for (int i = 0; i < operations.length; i++) {
            Double value = ratioMap.remove(operations[i].name);
            if (value == null) {
                String msg = "Configured ratio for operation " +
                        operations[i].name + " not found";
                getLogger().severe(msg);
                ConfigurationException e = new ConfigurationException(msg);
                getLogger().throwing(className, "configure", e);
                throw e;
            }
            mix[i] = value.doubleValue();
        }

        // By now, the map should be empty
        if (ratioMap.size() > 0) {
            String msg = "";
            for (Iterator<String> i = ratioMap.keySet().iterator();
                 i.hasNext();) {
                if (msg.length() > 0) {
          msg += ", ";
        }
                msg += i.next();
            }
            msg = "Invalid operation name(s) in operationMix " +
                    "configuration: " + msg + '.';
            getLogger().severe(msg);
            ConfigurationException e = new ConfigurationException(msg);
            getLogger().throwing(className, "configure", e);
            throw e;
        }
    }
View Full Code Here

Examples of com.sun.faban.harness.ConfigurationException

     */
    @Configure public void configure() throws ConfigurationException {
        logger.fine("Configuring oracle service ");
        myServers = ctx.getUniqueHosts();
        if(myServers == null){
            throw new ConfigurationException("Oracle DB hostname is not provided");
        }
        oracleHome = ctx.getProperty("serverHome");
        if(oracleHome != null && oracleHome.trim().length() > 0) {
            if (!oracleHome.endsWith(File.separator))
            oracleHome = oracleHome + File.separator;
        }else{
            throw new ConfigurationException("Oracle DB serverHome is not provided");
        }
        oracleSid = ctx.getProperty("serverId");
        if(oracleSid == null || oracleSid.trim().length() <= 0){
            throw new ConfigurationException("Oracle DB serverId is not provided");
        }
        startupConf = ctx.getProperty("startupConf"); // What is this used for?
        if(startupConf == null || startupConf.trim().length() <= 0){
            throw new ConfigurationException("Oracle DB startupConf is not provided");
        }
        String includeListners = ctx.getProperty("includes");
        if(includeListners != null && includeListners.trim().length() > 0){
            StringTokenizer st = new StringTokenizer(includeListners,"; ,\n");
            while(st.hasMoreTokens()){
                listners.add(st.nextToken());
            }
        }else{
            throw new ConfigurationException("Oracle DB includes property is not provided");
        }
        oracleBin = oracleHome + "bin" + File.separator;
        oracleStartCmd = oracleBin + "sqlplus /nolog <<EOT\nconnect " +
                " / as sysdba \nstartup pfile=" + startupConf + "\nexit\nEOT";
        oracleStopCmd = oracleBin + "sqlplus /nolog <<EOT\nconnect " +
View Full Code Here

Examples of com.sun.faces.config.ConfigurationException

                                               .getName() : "ANY"),
                                         selInstance.getClass().getName()
                                   });
                    }
                } catch (ClassNotFoundException cnfe) {
                    throw new ConfigurationException(cnfe);
                }
            }
        }
    }
View Full Code Here

Examples of com.threepillar.labs.meeting.exception.ConfigurationException

  @Override
  public void validate() throws ConfigurationException {
    LOG.info("Validating configuration properties for email");
    if (properties == null) {
      throw new ConfigurationException("Properties can not be null");
    }
    if (properties.get(CLIENT_ID) == null) {
      throw new ConfigurationException(CLIENT_ID + "can not be null");
    }
    if (properties.get(CLIENT_SECRET) == null) {
      throw new ConfigurationException(CLIENT_SECRET + "can not be null");
    }
    if (properties.get(ACCESS_TOKEN) == null) {
      throw new ConfigurationException(ACCESS_TOKEN + "can not be null");
    }
    if (properties.get(REFRESH_TOKEN) == null) {
      throw new ConfigurationException(REFRESH_TOKEN + "can not be null");
    }
    if (properties.get(EXPIRY_TIME_IN_MILLIS) == null) {
      throw new ConfigurationException(EXPIRY_TIME_IN_MILLIS
          + "can not be null");
    }

  }
View Full Code Here

Examples of com.volantis.mcs.runtime.configuration.ConfigurationException

    public XMLConfigurationBuilder() throws ConfigurationException {

        try {
            digester = createDigester();
        } catch (SAXException e) {
            throw new ConfigurationException(
                        exceptionLocalizer.format("digester-creation-error"),
                        e);
        }

        MarinerRuleSet marinerSet = new MarinerRuleSet("");
View Full Code Here

Examples of com.volantis.vdp.configuration.exception.ConfigurationException

      this.timestamp = (new Date()).getTime();

    } catch (IOException e) {
      String msg = "IOException in configuration reading: "
          + e.getMessage();
      throw new ConfigurationException(msg, e);
    } catch (SAXException e) {
      String msg = "SAXException in configuration reading: "
          + e.getMessage();
      throw new ConfigurationException(msg, e);
    }

  }
View Full Code Here

Examples of cu.settings.ConfigurationException

    public void initialize(XMLSettings settings) throws ConfigurationException {
        switch(settings.getInt("/zipscript/type")) {
            case 4: // custom java class
                String classname = settings.get("/zipscript/custom/classname");
                if (classname == null || "".equals(classname)) {
                    throw new ConfigurationException("Please specify a classname for this tupe of zipscript");
                }
                try {
                    Class c = ServiceManager.getServices().getCustomClassLoader().loadClass(classname);
                    if (Zipscript.class.isAssignableFrom(c)) {
                        zipscript = (Zipscript)c.newInstance();
                    } else {
                        throw new ConfigurationException("Class " + c + " does not implement interface " + Zipscript.class.toString());
                    }
                } catch (ClassNotFoundException e) {
                    throw new ConfigurationException("Could not find custom zipscript class", e);
                } catch (IllegalAccessException e) {
                    throw new ConfigurationException("Could not create custom zipscript class", e);
                } catch (InstantiationException e) {
                    throw new ConfigurationException("Could not create custom zipscript class", e);
                }
                break;
            case 3: // shell
                zipscript = new ShellZipscript(settings.get("/zipscript/shell/rescan"), settings.get("/zipscript/shell/upload"), settings.get("/zipscript/shell/delete"));

            case 2: // pzs-ng
                String zipscriptPath = settings.get("/zipscript/pzs_ng/path");
                File f = new File(zipscriptPath);
                if (!f.exists() || !f.isDirectory()) {
                    throw new ConfigurationException("Must specify an existing directory for /zipscript/pzs_ng/path");
                }
                zipscript = new PzsNgZipscript(zipscriptPath);
                break;
            case 1: // internal
                zipscript = new CuftpdZipscript(settings.get("/zipscript/cuftpd/files"), new File(settings.get("/zipscript/cuftpd/template")), settings.get("/zipscript/cuftpd/short_name"));
View Full Code Here

Examples of de.fuberlin.wiwiss.pubby.ConfigurationException

  public void contextInitialized(ServletContextEvent sce) {
    ServletContext context = sce.getServletContext();
    try {
      String configFileName = context.getInitParameter("config-file");
      if (configFileName == null) {
        throw new ConfigurationException("Missing context parameter \"config-file\" in /WEB-INF/web.xml");
      }
      File configFile = new File(configFileName);
      if (!configFile.isAbsolute()) {
        configFile = new File(context.getRealPath("/") + "/WEB-INF/" + configFileName);
      }
      String url = configFile.getAbsoluteFile().toURI().toString();
      try {
        Model m = FileManager.get().loadModel(url);
        Configuration conf = Configuration.create(m);
        context.setAttribute(SERVER_CONFIGURATION, conf);
      } catch (JenaException ex) {
        throw new ConfigurationException(
            "Error parsing configuration file <" + url + ">: " +
            ex.getMessage());
      }
    } catch (ConfigurationException ex) {
      log(ex, context);
View Full Code Here

Examples of de.innovationgate.webgate.api.auth.ConfigurationException

        _dbkey = ((String) params.get(COPTION_DBKEY)).toLowerCase();
       
        configure(params);

        if (_dbkey == null) {
            throw new ConfigurationException("The dbkey of the authentication db is not specified");
        }

        if (_scriptCollect == null && _userRootDoc == null) {
            throw new ConfigurationException("Either a collection script or a root document for login documents must be specified");
        }

        // Try to fetch target db at this time. May get connected later
        registerWithTargetDatabase((WGDatabase) _core.getContentdbs().get(_dbkey));
View Full Code Here

Examples of de.laures.cewolf.ConfigurationException

      case ChartImage.IMG_TYPE_CHART :
        return renderChart(cd, chart);
      case ChartImage.IMG_TYPE_LEGEND :
        return renderLegend(cd, chart);
      default :
        throw new ConfigurationException(cd.getType() + " is not a supported image type");
    }
  }
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.