List of usage examples for org.apache.commons.configuration ConfigurationException fillInStackTrace
public synchronized Throwable fillInStackTrace()
From source file:edu.iw.mace.environment.Settings.java
/** * Constructor/*from w w w . j a v a 2 s. com*/ */ public Settings() throws FactoryException, MaceException { try { config = new PropertiesConfiguration(PROPERTIES_FILE); } catch (ConfigurationException e) { log.error(e.fillInStackTrace()); } config.setAutoSave(true); initProperties(); }
From source file:uk.nhs.cfh.dsp.snomed.converters.human.readable.impl.HeuristicBasedHumanReadableRenderImpl.java
/** * update human readable map./*from w ww .j a v a 2 s .c om*/ * */ private void updateHumanRenderingMap() { File file = new File(renderingFileLocation); logger.info("renderingFileLocation = " + renderingFileLocation); if (file.exists() && file.canRead()) { try { configuration.load(file); List fields = configuration.configurationsAt("//rendered_attribute"); // clear existing map humanRenderingMap.clear(); for (Object field : fields) { HierarchicalConfiguration sub = (HierarchicalConfiguration) field; // sub contains now all data about a single field String attributeId = sub.getString("id"); String attributeText = sub.getString("text"); // put values in map humanRenderingMap.put(attributeId, attributeText); } logger.debug("humanRenderingMap = " + humanRenderingMap); } catch (ConfigurationException e) { logger.warn("Error reading configuration file. Nested exception is : " + e.fillInStackTrace().getMessage()); } } else { logger.warn("Error reading file from provided URL."); throw new IllegalArgumentException("Error reading file from provided URL."); } }
From source file:uk.nhs.cfh.dsp.srth.query.transform.sql.impl.AbstractSQLQueryEngineService.java
protected synchronized void createTablesLogFile() { try {/* w w w.j a va2s. c o m*/ File tablesFile = new File(tablesConfigFileURL.toURI()); // create file if it doesn't exist if (!tablesFile.exists()) { Document doc = new Document(new Element("tables")); XMLOutputter outputter = new XMLOutputter(Format.getPrettyFormat()); FileWriter fw = new FileWriter(tablesFile); outputter.output(doc, fw); } tablesConfigFile = new XMLConfiguration(tablesFile); } catch (ConfigurationException e) { logger.warn("Configuration exception. Nested exception is : " + e.fillInStackTrace().getMessage()); } catch (IOException e) { logger.warn("IO exception. Nested exception is : " + e.fillInStackTrace().getMessage()); } catch (URISyntaxException e) { logger.warn("URI syntax exception. Nested exception is : " + e.fillInStackTrace().getMessage()); } }
From source file:uk.nhs.cfh.dsp.srth.query.transform.sql.impl.AbstractSQLQueryEngineService.java
protected void updateTablesConfigFile(String tableName) { // add table to temp tables file list tablesConfigFile.addProperty("tables.table", tableName); try {/* w w w .j av a 2 s.c o m*/ tablesConfigFile.save(); if (logger.isDebugEnabled()) { logger.debug("Updated config file with tableName : " + tableName); } } catch (ConfigurationException e) { logger.warn(e.fillInStackTrace()); } }