SPW-DIG / metawal-core-geonetwork

Metawal - Catalogue pour l'information géographique de Wallonie
http://metawal.wallonie.be
GNU General Public License v2.0
3 stars 1 forks source link

Moissonnage - problème avec le moissonnage de fiches mélangées ISO 19115-3 et ISO19139 #657

Closed vbombaerts closed 2 years ago

vbombaerts commented 2 years ago

Environnement de test. Point de moissonnage Prod http fiches privées. Seulement 100 fiches moissonnées au lieu de 256.

Log :

2021-09-16T08:29:03,568+0200 INFO  [Prod_http_fiche_privees] - Starting harvesting of Prod http - fiche privees
2021-09-16T08:29:03,654+0200 INFO  [Prod_http_fiche_privees] - Started harvesting from node : Prod http - fiche privees (CswHarvester)
2021-09-16T08:29:07,538+0200 WARN  [Prod_http_fiche_privees] - Raised exception when searching : org.fao.geonet.csw.common.exceptions.NoApplicableCodeEx: code=NoApplicableCode, locator=null, message=java.lang.RuntimeException: org.fao.geonet.csw.common.exceptions.InvalidParameterValueEx: code=InvalidParameterValue, locator=OutputSchema, message=OutputSchema 'mdb' not supported for metadata with '51119' (iso19139).
Corresponding XSL transformation 'mdb-summary.xsl' does not exist for this schema.
The record will not be returned in response.
2021-09-16T08:29:07,538+0200 WARN  [Prod_http_fiche_privees] - Url: metawal.wallonie.be
2021-09-16T08:29:07,538+0200 WARN  [Prod_http_fiche_privees] - Method: POST
2021-09-16T08:29:07,538+0200 WARN  [Prod_http_fiche_privees] - Sent request POST /geonetwork/Metawal-private/fre/csw

<?xml version="1.0" encoding="UTF-8"?>
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:gmd="http://www.isotc211.org/2005/gmd" service="CSW" version="2.0.2" resultType="results" outputFormat="application/xml" outputSchema="http://standards.iso.org/iso/19115/-3/mdb/2.0" startPosition="101" maxRecords="20">
  <csw:Query typeNames="csw:Record">
    <csw:ElementSetName>summary</csw:ElementSetName>
    <ogc:SortBy xmlns:ogc="http://www.opengis.net/ogc">
      <ogc:SortProperty>
        <ogc:PropertyName>identifier</ogc:PropertyName>
        <ogc:SortOrder>ASC</ogc:SortOrder>
      </ogc:SortProperty>
    </ogc:SortBy>
  </csw:Query>
</csw:GetRecords>

2021-09-16T08:29:07,539+0200 ERROR [Prod_http_fiche_privees] - Unknown error trying to harvest
2021-09-16T08:29:07,539+0200 ERROR [Prod_http_fiche_privees] - Raised exception when searching: java.lang.RuntimeException: org.fao.geonet.csw.common.exceptions.InvalidParameterValueEx: code=InvalidParameterValue, locator=OutputSchema, message=OutputSchema 'mdb' not supported for metadata with '51119' (iso19139).
Corresponding XSL transformation 'mdb-summary.xsl' does not exist for this schema.
The record will not be returned in response.
2021-09-16T08:29:07,539+0200 ERROR [Prod_http_fiche_privees] - Raised exception when searching: java.lang.RuntimeException: org.fao.geonet.csw.common.exceptions.InvalidParameterValueEx: code=InvalidParameterValue, locator=OutputSchema, message=OutputSchema 'mdb' not supported for metadata with '51119' (iso19139).
Corresponding XSL transformation 'mdb-summary.xsl' does not exist for this schema.
The record will not be returned in response.
OperationAbortedEx : Raised exception when searching: java.lang.RuntimeException: org.fao.geonet.csw.common.exceptions.InvalidParameterValueEx: code=InvalidParameterValue, locator=OutputSchema, message=OutputSchema 'mdb' not supported for metadata with '51119' (iso19139).
Corresponding XSL transformation 'mdb-summary.xsl' does not exist for this schema.
The record will not be returned in response.
    at org.fao.geonet.kernel.harvest.harvester.csw.Harvester.doSearch(Harvester.java:670)
    at org.fao.geonet.kernel.harvest.harvester.csw.Harvester.searchAndAlign(Harvester.java:259)
    at org.fao.geonet.kernel.harvest.harvester.csw.Harvester.harvest(Harvester.java:116)
    at org.fao.geonet.kernel.harvest.harvester.csw.CswHarvester.doHarvest(CswHarvester.java:95)
    at org.fao.geonet.kernel.harvest.harvester.AbstractHarvester$HarvestWithIndexProcessor.process(AbstractHarvester.java:605)
    at org.fao.geonet.kernel.harvest.harvester.AbstractHarvester.harvest(AbstractHarvester.java:676)
    at org.fao.geonet.kernel.harvest.harvester.HarvesterJob.execute(HarvesterJob.java:69)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: org.fao.geonet.csw.common.exceptions.NoApplicableCodeEx: code=NoApplicableCode, locator=null, message=java.lang.RuntimeException: org.fao.geonet.csw.common.exceptions.InvalidParameterValueEx: code=InvalidParameterValue, locator=OutputSchema, message=OutputSchema 'mdb' not supported for metadata with '51119' (iso19139).
Corresponding XSL transformation 'mdb-summary.xsl' does not exist for this schema.
The record will not be returned in response.
    at org.fao.geonet.csw.common.exceptions.CatalogException.createException(CatalogException.java:159)
    at org.fao.geonet.csw.common.exceptions.CatalogException.unmarshal(CatalogException.java:124)
    at org.fao.geonet.csw.common.requests.CatalogRequest.execute(CatalogRequest.java:172)
    at org.fao.geonet.kernel.harvest.harvester.csw.Harvester.doSearch(Harvester.java:657)
    ... 8 more
2021-09-16T08:29:07,539+0200 INFO  [Prod_http_fiche_privees] - Total records processed in all searches :100
2021-09-16T08:29:07,539+0200 WARN  [Prod_http_fiche_privees] - Due to previous errors the align process has not been called
2021-09-16T08:29:07,539+0200 INFO  [Prod_http_fiche_privees] - Ended harvesting from node : Prod http - fiche privees (CswHarvester)
fxprunayre commented 2 years ago

Action: Ajouter les conversions ISO19139 > 19115-3 dans le plugin 19139 pour le CSW pour les modes brief/summary/full

vbombaerts commented 2 years ago

Ca pourrait être bien dans le rapport sur le moissonnage d'indiquer que certaines fiches n'ont pas pu être récupérées parce qu'elles sont dans un standard différent que celui demandé. Parce que du coup on aurait l'idée de configurer un deuxième point de moissonnage dans le deuxième standard pour tout récupérer.

fxprunayre commented 2 years ago

A déployer.

Pour tester, GetRecordById avec un UUID d'une fiche en ISO19139

<csw:GetRecordById xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
                   service="CSW" version="2.0.2"
                   outputSchema="http://standards.iso.org/iso/19115/-3/mdb/2.0">
    <csw:ElementSetName>summary</csw:ElementSetName>
  <csw:Id>da165110-88fd-11da-a88f-000d939bc5d8</csw:Id>
</csw:GetRecordById>
fxprunayre commented 2 years ago

Ca pourrait être bien dans le rapport sur le moissonnage d'indiquer que certaines fiches n'ont pas pu être récupérées parce qu'elles sont dans un standard différent que celui demandé. Parce que du coup on aurait l'idée de configurer un deuxième point de moissonnage dans le deuxième standard pour tout récupérer.

Actuellement on retourne null. On pourrait lever une erreur - mais ce n'est pas bien précisé dans la spec CSW.

vbombaerts commented 2 years ago

Pas réussi à tester à cause de #660

vbombaerts commented 2 years ago

Pas réussi à moissonner l'instance de test à cause d'un problème de certificat
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
cf. https://github.com/SPW-DIG/metawal-core-geonetwork/issues/565#issuecomment-886457384

vbombaerts commented 2 years ago

Le moissonnage renvoie bien le nombre de fiches attendu, indifféremment du fait qu'elles soient en 19139 ou 19115. Par contre, il semble y avoir une erreur d'indexation. Je ne sais pas si elle est due au contenu de la fiche (j'ai importé une fiche multilingue du catalogue geo.be), à la traduction de ISO 19139 vers ISO 19115-3 ou à autre chose. image

vbombaerts commented 2 years ago

J'ai eu précédemment une erreur d'indexation sur une fiche multilingue importée du catalogue geo.be et traduite en 19115-3. L'erreur venait de la déclaration des langues.

vbombaerts commented 2 years ago

Le moissonnage des fiches mélangées est OK en prod. J'ai testé avec une fiche 19139 unilingue et une multilingue. L'unilingue est bien indexée, la multilingue pas. image