diff --git a/annotation/src/main/java/lcsb/mapviewer/annotation/services/ChemicalParser.java b/annotation/src/main/java/lcsb/mapviewer/annotation/services/ChemicalParser.java index 74e38ec3bfe6defa7e5fe0c90198a253b4d56a3c..df03d1175cb14e1d072df7f3eb0649473bf1d2b6 100644 --- a/annotation/src/main/java/lcsb/mapviewer/annotation/services/ChemicalParser.java +++ b/annotation/src/main/java/lcsb/mapviewer/annotation/services/ChemicalParser.java @@ -12,6 +12,7 @@ import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.apache.commons.lang3.SerializationException; import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.w3c.dom.Node; @@ -353,8 +354,12 @@ public class ChemicalParser extends CachableInterface implements IExternalServic // look for chemical in the cache Node chemicalNode = super.getCacheNode(getIdentifier(diseaseID, chemicalId)); if (chemicalNode != null && chemicalNode.hasChildNodes()) { - result = chemicalSerializer.xmlToObject(chemicalNode); - return result; + try { + result = chemicalSerializer.xmlToObject(chemicalNode); + return result; + } catch (SerializationException e) { + logger.error(e, e); + } } try { String diseaseQuery = DISEASE_URL + diseaseID.getResource();