geonetwork / geonetwork/core-geonetwork

WFS harvester NullPointerException

Open
#7,541 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
521
Forks
515
Avg merge
6d 13h
Merged PRs (30d)
19

Description

**Describe the bug**
I tried to harvest from `https://geodienste.hamburg.de/HH_WFS_INSPIRE_ALKIS?` with `WFS 1.1.0` (when is WFS 2.0 support comming?).

**Expected behavior**
Do not fail.

**Log file**
```
2023-12-06T13:04:27,709+0000 INFO [https_geodienste_hamburg_de_HH_WFS_INSPIRE_ALKIS_] - Starting harvesting of https://geodienste.hamburg.de/HH_WFS_INSPIRE_ALKIS?
2023-12-06T13:04:27,718+0000 INFO [https_geodienste_hamburg_de_HH_WFS_INSPIRE_ALKIS_] - Started harvesting from node : https://geodienste.hamburg.de/HH_WFS_INSPIRE_ALKIS? (OgcWxSHarvester)
2023-12-06T13:04:27,718+0000 INFO [https_geodienste_hamburg_de_HH_WFS_INSPIRE_ALKIS_] - Retrieving remote metadata information for : https://geodienste.hamburg.de/HH_WFS_INSPIRE_ALKIS?
2023-12-06T13:04:27,971+0000 WARN [https_geodienste_hamburg_de_HH_WFS_INSPIRE_ALKIS_] - Raised exception while harvesting from : https://geodienste.hamburg.de/HH_WFS_INSPIRE_ALKIS? (OgcWxSHarvester)
2023-12-06T13:04:27,971+0000 WARN [https_geodienste_hamburg_de_HH_WFS_INSPIRE_ALKIS_] - (C) Class : NullPointerException
2023-12-06T13:04:27,971+0000 WARN [https_geodienste_hamburg_de_HH_WFS_INSPIRE_ALKIS_] - (C) Message : Failed to create a Document for [[Text: ???]]
2023-12-06T13:04:27,971+0000 ERROR [https_geodienste_hamburg_de_HH_WFS_INSPIRE_ALKIS_] - Failed to create a Document for [[Text: ???]]
java.lang.NullPointerException: Failed to create a Document for [[Text: ???]]
at org.fao.geonet.utils.Xml.transform(Xml.java:391)
at org.fao.geonet.kernel.harvest.harvester.ogcwxs.Harvester.buildServiceRecordFromCapabilities(Harvester.java:463)
at org.fao.geonet.kernel.harvest.harvester.ogcwxs.Harvester.addMetadata(Harvester.java:334)
at org.fao.geonet.kernel.harvest.harvester.ogcwxs.Harvester.harvest(Harvester.java:244)
at org.fao.geonet.kernel.harvest.harvester.ogcwxs.OgcWxSHarvester.doHarvest(OgcWxSHarvester.java:78)
at org.fao.geonet.kernel.harvest.harvester.AbstractHarvester$HarvestWithIndexProcessor.process(AbstractHarvester.java:647)
at org.fao.geonet.kernel.harvest.harvester.AbstractHarvester.harvest(AbstractHarvester.java:718)
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)
```

I replaced the actual text with question marks as it would be too verbose.

**Desktop (please complete the following information):**
- Browser Firefox
- GeoNetwork Version Docker (`geonetwork:3.12.11-postgres`)

Contributor guide

Open the contributing guide

Research direction

Reproduce the harvest against the provided WFS 1.1.0 URL, then inspect Xml.java:391 and the capability-processing path in Harvester.java:463, 334, and 244. Trace why the capabilities response cannot produce a Document; done means the service harvest no longer raises this NullPointerException.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.