diff --git a/harvesters/src/main/java/org/fao/geonet/kernel/harvest/harvester/simpleurl/RDFUtils.java b/harvesters/src/main/java/org/fao/geonet/kernel/harvest/harvester/simpleurl/RDFUtils.java index 9995652e4d1..6694bf047f8 100644 --- a/harvesters/src/main/java/org/fao/geonet/kernel/harvest/harvester/simpleurl/RDFUtils.java +++ b/harvesters/src/main/java/org/fao/geonet/kernel/harvest/harvester/simpleurl/RDFUtils.java @@ -7,6 +7,7 @@ import org.apache.jena.riot.Lang; import org.apache.jena.riot.RDFDataMgr; import org.fao.geonet.Constants; +import org.fao.geonet.constants.Geonet; import org.fao.geonet.domain.ISODate; import org.fao.geonet.domain.Pair; import org.fao.geonet.utils.Log; @@ -81,6 +82,9 @@ public static HashMap getAllUuids(String feedUrl) throws Except public static HashMap getAllUuids(Element feed) throws Exception { Element rdfDocument = checkForMissingRdfAbout(feed); + // if xsi:schemaLocation is present on the rdf:RDF element Jena fails to parse the Element. + rdfDocument.removeAttribute("schemaLocation", Geonet.Namespaces.XSI); + Model model = ModelFactory.createMemModelMaker().createDefaultModel(); RDFDataMgr.read(model, IOUtils.toInputStream(Xml.getString(rdfDocument), StandardCharsets.UTF_8),