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

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

Introduction

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

Prototype

public void printStackTrace() 

Source Link

Usage

From source file:de.textmining.nerdle.database.DBSingleton.java

public DBSingleton() {
    try {//from  w w w  .j a  va  2 s .co  m
        config(Paths.get(getClass().getResource("/nerdle_config.properties").toURI()).toFile().getPath());
    } catch (ConfigurationException e) {
        e.printStackTrace();
    } catch (URISyntaxException e) {
        e.printStackTrace();
    }
}

From source file:com.parallax.server.blocklyprop.config.SetupConfig.java

private void readConfiguration() {
    try {//from w  w  w  .j  av  a 2  s  .c om
        System.out.println("Looking for blocklyprop.properties in: " + System.getProperty("user.home"));
        DefaultConfigurationBuilder configurationBuilder = new DefaultConfigurationBuilder(
                getClass().getResource("/config.xml"));
        configuration = configurationBuilder.getConfiguration();
    } catch (ConfigurationException ce) {
        ce.printStackTrace();
    } catch (Throwable t) {
        t.printStackTrace();
    }
}

From source file:com.shadwelldacunha.byteswipe.core.ConfigHandler.java

private void setup(String file) {
    this.file = file;
    try {/*from   w  w  w.j  a va 2s  .c om*/
        config = new PropertiesConfiguration("byteswipe.properties");
    } catch (ConfigurationException e) {
        e.printStackTrace();
    }
}

From source file:de.textmining.nerdle.database.MVSingleton.java

public MVSingleton(String path) {
    try {//from  w w w  .  ja v a 2s  .  co  m
        config(path);

    } catch (ConfigurationException e) {
        e.printStackTrace();
    }
}

From source file:de.textmining.nerdle.database.MVSingleton.java

public MVSingleton() {
    try {/*ww w  .  j av a 2s.  c o  m*/
        config(Paths.get(getClass().getResource("/nerdle_config.properties").toURI()).toFile().getPath());
    } catch (ConfigurationException e) {
        e.printStackTrace();
    } catch (URISyntaxException e) {
        e.printStackTrace();
    }
}

From source file:eu.impact_project.wsclient.ConfigTest.java

@Test
public void testConfig() {
    try {/*from   w ww  . j  a  va 2  s .  c o  m*/
        ServiceProvider sp = new FileServiceProvider("src/main/resources/services.xml");
        List<Service> services = sp.getServiceList();
        for (Service s : services) {
            System.out.println(s.getDescription());
        }
    } catch (ConfigurationException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (MalformedURLException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

}

From source file:es.udc.gii.common.eaf.config.EAFConfiguration.java

public void loadConfiguration(InputStream stream) {

    if (!this.isEmpty()) {
        this.clear();
    }/* w w w. j  a  va  2 s. c o  m*/
    try {

        this.load(stream);

    } catch (ConfigurationException ex) {
        ex.printStackTrace();
    }

}

From source file:es.udc.gii.common.eaf.config.EAFConfiguration.java

public void loadConfiguration(File config_file) {

    if (!this.isEmpty()) {
        this.clear();
    }//from w  w w . j  a v a  2  s .  co  m
    try {

        this.load(config_file);

    } catch (ConfigurationException ex) {
        ex.printStackTrace();
    }

}

From source file:io.nuun.plugin.configuration.common.NuunCommonConfigurationPlugin.java

/**
 * reach properties file from classpath.
 * //from   w w w.  j  a va2  s.c  o  m
 * @param filePathInClasspath
 * @return return an Apache Configuration interface
 */
private Configuration configuration(String filePathInClasspath) {
    try {
        return new PropertiesConfiguration(filePathInClasspath);
    } catch (ConfigurationException e) {
        e.printStackTrace();
        throw new IllegalStateException("Error in module initialization : Properties can not be initialized");
    }

}

From source file:de.textmining.nerdle.question.answering.MatchFactQuestionAnswerer.java

@Override
public Answer answer(Question question) {

    EtmPoint point = etmMonitor.createPoint("MatchFactQuestionAnswerer:answer");

    Answer finalAnswer = new Answer();
    try {//from w w  w  .  ja  va2 s .  com

        // The question parser interprets the question as a list of
        // NerdleFacts
        List<NerdleFact> questionDesciption = questionParser.analyzeQuestion(question);

        // The questionFactMatcher then matches this question against a data
        // source as given by the factProvider
        SortedSet<Map.Entry<String, Float>> answers = questionFactMatcher.getAnswers(factProvider,
                questionDesciption);

        for (Map.Entry<String, Float> answer : answers) {
            finalAnswer.add(answer.getKey());
        }

    } catch (ConfigurationException e) {
        e.printStackTrace();
    } catch (InterruptedException e) {
        e.printStackTrace();
    } finally {
        point.collect();
    }

    // Final answer contains the string results sorted by score
    return finalAnswer;
}