Skip to content

NPE when converting ISO-19139 record with URN-like fileIdentifier to DCAT #9268

Description

@streino

Describe the bug

The following ISO-19139 record causes a "Connection refused" when converted to DCAT.

Log file

From 4.4.9 docker image:

2026-05-05 18:04:40.675:INFO:oejs.Server:main: Started @21723ms
Error at xsl:apply-templates on line 171 of dcat-core.xsl:
  Exception in extension function java.lang.RuntimeException: java.lang.NullPointerException
2026-05-05T18:05:44,394 ERROR [geonetwork] - Exception in extension function java.lang.RuntimeException: java.lang.NullPointerException
net.sf.saxon.trans.XPathException: Exception in extension function java.lang.RuntimeException: java.lang.NullPointerException
	at net.sf.saxon.functions.ExtensionFunctionCall.call(ExtensionFunctionCall.java:368) ~[saxon-9.1.0.8b-patch.jar:?]
        ...
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
	at org.fao.geonet.api.records.MetadataUtils.getAssociatedAsXml(MetadataUtils.java:183) ~[gn-services-4.4.9-0.jar:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]
	at net.sf.saxon.functions.ExtensionFunctionCall.invokeMethod(ExtensionFunctionCall.java:690) ~[saxon-9.1.0.8b-patch.jar:?]
	at net.sf.saxon.functions.ExtensionFunctionCall.call(ExtensionFunctionCall.java:343) ~[saxon-9.1.0.8b-patch.jar:?]
	... 161 more
Caused by: java.lang.NullPointerException
	at org.fao.geonet.api.records.MetadataUtils.getAssociated(MetadataUtils.java:205) ~[gn-services-4.4.9-0.jar:?]
	at org.fao.geonet.api.records.MetadataUtils.getAssociatedAsXml(MetadataUtils.java:158) ~[gn-services-4.4.9-0.jar:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]
	at net.sf.saxon.functions.ExtensionFunctionCall.invokeMethod(ExtensionFunctionCall.java:690) ~[saxon-9.1.0.8b-patch.jar:?]
	at net.sf.saxon.functions.ExtensionFunctionCall.call(ExtensionFunctionCall.java:343) ~[saxon-9.1.0.8b-patch.jar:?]
	... 161 more

Additional comments

I suspect the URN-like fileIdentifier "urn:isogeo:metadata:uuid:0e52938b-5200-4127-8e32-a39b34501f57" to cause this issue. Possibly related to #9170.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions