log.error("Error while clearing master server list: " + e.getMessage(), e);
throw new LifecycleException(e);
}
for (File jsonFile : getJsonFiles()) {
JmxProcess process;
try {
process = JsonUtils.getJmxProcess(jsonFile);
if (log.isDebugEnabled()) {
log.debug("Loaded file: " + jsonFile.getAbsolutePath());
}
this.masterServersList = mergeServerLists(this.masterServersList, process.getServers());
} catch (Exception ex) {
if (configuration.isContinueOnJsonError()) {
throw new LifecycleException("Error parsing json: " + jsonFile, ex);
} else {
// error parsing one file should not prevent the startup of JMXTrans