public void loadPropertiesFiles(String propertiesLocationString, String rootPath) { String[] propertiesLocation = StringUtils.split(propertiesLocationString, ','); boolean found = false; // attempt to load each properties file at the given locations in reverse order: first files in the list // override the later ones for (int j = propertiesLocation.length - 1; j >= 0; j--) { String location = StringUtils.trim(propertiesLocation[j]); if (loadPropertiesFile(rootPath, location)) { found = true; } } if (!found) { final String msg = MessageFormat.format("No configuration found using location list {0}. Base path is [{1}]", ArrayUtils.toString(propertiesLocation), rootPath); log.error(msg); throw new ConfigurationException(msg); } }
log.error("A module error occurred during initialization: {}", e.getMessage(), e); } catch (ConfigurationException e) { log.error("A configuration error occurred during initialization: {}", e.getMessage(), e); } catch (Throwable e) { log.error("An unspecified error occurred during initialization: {}", e.getMessage(), e);