- JAXBContext context = JAXBContext.newInstance(Chain.class);
- Unmarshaller unmarshaller = context.createUnmarshaller();
- logger.debug(String.format("Reading %s...", xmlFile.getPath()));
- return (Chain) unmarshaller.unmarshal(xmlFile);
- } catch (JAXBException e) {
- e.printStackTrace();
- return null;
+ return objectMapper.readValue(configurationFile, Chain.class);
+ } catch (JsonParseException jpe1) {
+ logger.warn(String.format("Could not parse %s.", configurationFile), jpe1);
+ } catch (JsonMappingException jme1) {
+ logger.warn(String.format("Could not parse %s.", configurationFile), jme1);
+ } catch (IOException ioe1) {
+ logger.info(String.format("Could not read %s.", configurationFile));