Example usage for org.apache.commons.configuration ConfigurationException getMessage

List of usage examples for org.apache.commons.configuration ConfigurationException getMessage

Introduction

In this page you can find the example usage for org.apache.commons.configuration ConfigurationException getMessage.

Prototype

public String getMessage() 

Source Link

Document

Returns the detail message string of this throwable.

Usage

From source file:net.orpiske.dcd.main.Main.java

private static void initConfiguration() {
    try {/*from   w w  w  .j a v  a2 s. c  o m*/
        ConfigurationWrapper.initConfiguration(Constants.DCD_CONFIG_DIR, Constants.CONFIG_FILE_NAME);
    } catch (ConfigurationException e) {
        System.err.println("Unable to load configuration file " + "'dcd.properties': " + e.getMessage());

        System.exit(-1);
    } catch (FileNotFoundException e) {
        System.err.println("Unable to find configuration file " + "'dcd.properties': " + e.getMessage());

        System.exit(-1);
    }
}

From source file:net.orpiske.dcd.main.Main.java

private static void initDomainConfiguration() {
    try {// www  . j  a  va2s  . c  o m
        DomainConfigurationWrapper.initConfiguration(Constants.DCD_CONFIG_DIR, "domain.properties");
    } catch (ConfigurationException e) {
        System.err.println("Unable to load configuration file " + "'domain.properties': " + e.getMessage());

        System.exit(-1);
    } catch (FileNotFoundException e) {
        System.err.println("Unable to find configuration file " + "'domain.properties': " + e.getMessage());

        System.exit(-1);
    }
}

From source file:eu.optimis.sm.gui.utils.ConfigManager.java

public static PropertiesConfiguration getPropertiesConfiguration(String configFile) {
    String filePath = null;// ww w . j av a2s  .  co  m
    PropertiesConfiguration config = null;

    try {
        filePath = getFilePath(configFile);
        config = new PropertiesConfiguration(filePath);
    } catch (ConfigurationException ex) {
        log.error("Error reading " + filePath + " configuration file: " + ex.getMessage());
        log.error(ex.getMessage());
    }
    return config;
}

From source file:iaj.linkit.App.java

private static void handlePlist(final File f) {
    try {//from  ww w. j  a v  a 2s  .  com
        final XMLPropertyListConfiguration plist = new XMLPropertyListConfiguration(f);
        print(plist.getString(EXTENSION_URL));
    } catch (final ConfigurationException e) {
        System.err.println("Failed to read " + f.getAbsolutePath() + " - " + e.getMessage());
    }
}

From source file:eu.optimis.ip.gui.client.resources.ConfigManager.java

public static PropertiesConfiguration getPropertiesConfiguration(String configFile) {
    String filePath = null;//from w ww . j a va2s.  c o  m
    PropertiesConfiguration config = null;

    try {
        filePath = getFilePath(configFile);
        config = new PropertiesConfiguration(filePath);
    } catch (ConfigurationException ex) {
        log.error("Error reading " + filePath + " configuration file: " + ex.getMessage());
        log.error(ex.getMessage());
    }

    return config;
}

From source file:net.emotivecloud.scheduler.drp4one.ConfigManager.java

public static PropertiesConfiguration getPropertiesConfiguration(String configFile) {
    String filePath = null;//ww  w  .j av a2s  . c  o  m
    PropertiesConfiguration config = null;

    try {
        filePath = getConfigFilePath(configFile);
        config = new PropertiesConfiguration(filePath);
    } catch (ConfigurationException ex) {
        log.error("Error reading " + filePath + " configuration file: " + ex.getMessage());
        log.error(ex.getMessage());
    }

    return config;
}

From source file:eu.optimis.ecoefficiencytool.core.tools.ConfigManager.java

public static PropertiesConfiguration getPropertiesConfiguration(String configFile) {
    String filePath = null;/*from   w w  w  . ja  v  a 2 s  . c om*/
    PropertiesConfiguration config = null;

    try {
        filePath = getConfigFilePath(configFile);
        config = new PropertiesConfiguration(filePath);
    } catch (ConfigurationException ex) {
        log.error("ECO: Error reading " + filePath + " configuration file: " + ex.getMessage());
        ex.printStackTrace();
    }

    return config;
}

From source file:eu.optimis.infrastructureproviderriskassessmenttool.core.configration.ConfigManager.java

public static PropertiesConfiguration getPropertiesConfiguration(String configFile) {
    String filePath = null;/*from www  . j  a  v  a  2  s.  co  m*/
    PropertiesConfiguration config = null;

    try {
        filePath = getConfigFilePath(configFile);
        config = new PropertiesConfiguration(filePath);
    } catch (ConfigurationException ex) {
        log.error("IPRA: Error reading " + filePath + " configuration file: " + ex.getMessage());
        ex.printStackTrace();
    }

    return config;
}

From source file:eu.optimis.serviceproviderriskassessmenttool.core.configration.ConfigManager.java

public static PropertiesConfiguration getPropertiesConfiguration(String configFile) {
    String filePath = null;//from   w w  w . ja  va2s. co  m
    PropertiesConfiguration config = null;

    try {
        filePath = getConfigFilePath(configFile);
        config = new PropertiesConfiguration(filePath);
    } catch (ConfigurationException ex) {
        log.error("SPRA: Error reading " + filePath + " configuration file: " + ex.getMessage());
        ex.printStackTrace();
    }

    return config;
}

From source file:com.sm.store.cluster.Utils.java

public static NodeConfig getNodeConfig(String filename) {
    try {//from  www. j a  v a 2s  . com
        PropertiesConfiguration properties = new PropertiesConfiguration(filename);
        String host = properties.getString("host", "");
        int port = properties.getInt("port", 0);
        return new NodeConfig(host, port);

    } catch (ConfigurationException ex) {
        throw new RuntimeException(ex.getMessage(), ex);
    }
}