FHIR Chat · nullPointerException on Extension · IG creation

Stream: IG creation

Topic: nullPointerException on Extension


view this post on Zulip Rick Geimer (Mar 01 2019 at 21:47):

Anybody run into this before?

Unable to generate snapshot for http://hl7.org/fhir/us/davinci-cdex/StructureDefinition/cdex-payload-type-code because null
Publishing Content Failed: null (38.0125sec)

                                                                             (38.0126sec)

Use -? to get command line help (38.0126sec)
(38.0126sec)
Stack Dump (for debugging): (38.0126sec)
java.lang.NullPointerException
at org.hl7.fhir.r4.conformance.ProfileUtilities.sortDifferential(ProfileUtilities.java:3130)
at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshot(Publisher.java:2619)
at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshots(Publisher.java:2591)
at org.hl7.fhir.igtools.publisher.Publisher.loadConformance(Publisher.java:2172)
at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:587)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:527)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:4933)
Exception in thread "main" java.lang.NullPointerException
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:4943)
IG Publisher finished with code 1

view this post on Zulip Eric Haas (Mar 01 2019 at 23:00):

In my experience Nulls usually are ig json or ig xml issues. Look at the resource ids.

view this post on Zulip Rick Geimer (Mar 01 2019 at 23:26):

Thanks Eric.
Found it. It was an extension with the following:

<element id="Extension.value[x]">
<path value="Extension.value[x]"/>
<min value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<patternCodeableConcept>
<coding>
<system value="http://loinc.org"/>
</coding>
</patternCodeableConcept>
</element>

Once I removed patternCodeableConcept it worked. Will need to work out another way to bind to all of LOINC, but for now I can make progress in other areas of the IG and come back to that one later.

view this post on Zulip Lloyd McKenzie (Mar 02 2019 at 02:47):

Submit a tracker because that shouldn't NPE

view this post on Zulip Lloyd McKenzie (Mar 02 2019 at 03:09):

No clue how that change fixed your problem unless there was an issue with the source spec. The NPE is on diff.getDifferential().getElement().get(0).getPath().contains(".")

view this post on Zulip Lloyd McKenzie (Mar 02 2019 at 03:10):

It's failing because either there are no elements in the diff or the first element doesn't have a path.


Last updated: Apr 12 2022 at 19:14 UTC