- Serializer serializer = new Persister();
- logger.debug(String.format("Reading %s...", xmlFile.getPath()));
- return serializer.read(Chain.class, xmlFile);
+ try {
+ 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;
+ }