FHIR Chat · Publisher fails with NullPointer · IG creation

Stream: IG creation

Topic: Publisher fails with NullPointer


view this post on Zulip Niklas Haldorn (Sep 04 2020 at 13:27):

Hi everyone,
the publishing process of my IG fails with the following message:

onGenerate:
Publishing Content Failed: null (00:15.0482)
(00:15.0486)
Use -? to get command line help (00:15.0489)
(00:15.0493)
Stack Dump (for debugging): (00:15.0496)
java.lang.NullPointerException
at org.hl7.fhir.utilities.xhtml.XhtmlNode.addTag(XhtmlNode.java:144)
at org.hl7.fhir.utilities.xhtml.XhtmlNode.para(XhtmlNode.java:527)
at org.hl7.fhir.r5.renderers.BundleRenderer.render(BundleRenderer.java:299)
at org.hl7.fhir.igtools.publisher.Publisher.getXhtml(Publisher.java:7517)
at org.hl7.fhir.igtools.publisher.Publisher.saveDirectResourceOutputs(Publisher.java:7008)
at org.hl7.fhir.igtools.publisher.Publisher.generateHtmlOutputs(Publisher.java:6470)
at org.hl7.fhir.igtools.publisher.Publisher.generate(Publisher.java:4775)
at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:837)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:683)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:8022)

The cause appears to be the result attribute in the DiagnosticReport example IEHR_REPORT_SINGLE_IMAGE__RES_RadObservation.json
Because when the following lines are removed from the example, the publisher works without issues.

  "result": [ 
  {
    "reference": "Observation/11"
  } 
  ],

Does anyone know how to fix this?

Thanks for your attention,
Niklas
Edit: changed the Observation ID to fit the reference

view this post on Zulip Lloyd McKenzie (Sep 04 2020 at 13:30):

Does Observation/11 exist and resolve? (If it doesn't, it shouldn't blow up the publisher, but that might be the issue.)

view this post on Zulip Niklas Haldorn (Sep 04 2020 at 13:38):

I mixed up the ids in the example, but I still get the error after changing the id to fit the reference

view this post on Zulip Lloyd McKenzie (Sep 04 2020 at 14:03):

@Grahame Grieve

view this post on Zulip Grahame Grieve (Sep 04 2020 at 20:15):

that's an error in my error handling code. I fixed that but I can't tell what the underlying problem is

view this post on Zulip Daniel Karlsson (Dec 16 2020 at 13:01):

I get a NullPointerException with FHIR IG Publisher Version 1.1.53 (Git# bc0c1360906c).

...
Final .zip built (06:28.0405)
Finished. Times: loading: 00:01.0772, generate: 05:42.0577, narrative generation: 00:23.0253, realm-rules: 00:00.0000, previous-ver
sion: 00:00.0000, jekyll: 03:17.0874, validation: 00:07.0983 (#34), template: 00:03.0448 (#3) (06:28.0840)
Publishing Content Failed: null (06:29.0058)
(06:29.0059)
java.lang.NullPointerException
at org.hl7.fhir.igtools.renderers.ValidationPresenter.genHeader(ValidationPresenter.java:563)
at org.hl7.fhir.igtools.renderers.ValidationPresenter.genQAHtml(ValidationPresenter.java:245)
at org.hl7.fhir.igtools.renderers.ValidationPresenter.generate(ValidationPresenter.java:183)
at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:901)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:732)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:8413)

I see that others are publishing IGs fine, so I'm doing something wrong, but there is no error before the exception is thrown. Anyone else seen this problem?

view this post on Zulip Michaela Ziegler (Dec 16 2020 at 13:03):

Yes, we have the same problem (local and ci build)

view this post on Zulip Daniel Karlsson (Dec 16 2020 at 13:06):

Sorry about that (but at least we're not alone).
Seems to be failing while generating QA HTML (as per the stack trace)...

view this post on Zulip Rob Hausam (Dec 16 2020 at 15:12):

I didn't see this one last night when I built the latest LIVD IG content after updating to the 1.1.53 publisher.

view this post on Zulip Lloyd McKenzie (Dec 16 2020 at 17:35):

@Mark Iantorno Happening for me too. No changes to the IG and ran with the previous publisher

view this post on Zulip Grahame Grieve (Dec 16 2020 at 17:52):

this means that there's no realm for the IG. I will fix it next release, but there should be a stated realm or region

view this post on Zulip Lloyd McKenzie (Dec 16 2020 at 18:07):

Even for non-HL7-published IGs?

view this post on Zulip Lloyd McKenzie (Dec 16 2020 at 18:08):

My IG does declare a jurisdiction.

view this post on Zulip Grahame Grieve (Dec 16 2020 at 18:20):

they should, yes. Don't have to

view this post on Zulip Daniel Karlsson (Dec 16 2020 at 18:32):

Thanks, is realm = jursidiction

view this post on Zulip Grahame Grieve (Dec 16 2020 at 18:33):

yes

view this post on Zulip Lloyd McKenzie (Dec 16 2020 at 18:39):

Ok, but my IG has a jurisdiction and is still blowing up...

view this post on Zulip Grahame Grieve (Dec 16 2020 at 18:42):

oh. right. No, it's just a bug, and it'll never work for non-hl7 guides until I release a fix

view this post on Zulip John Moehrke (Dec 16 2020 at 22:27):

I think I am now in this camp too, with an outside IG... still renders okay, just no QA report

view this post on Zulip John Moehrke (Dec 16 2020 at 22:37):

I tried and it failed to add universal realm to my IG

  <jurisdiction>
    <coding>
      <!-- This is the code for universal -->
      <system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
      <code value="001"/>
    </coding>
  </jurisdiction>

view this post on Zulip John Moehrke (Dec 17 2020 at 01:47):

what else can I try?

view this post on Zulip Grahame Grieve (Dec 17 2020 at 02:04):

nothing

view this post on Zulip Chetan Jain (Dec 17 2020 at 09:19):

Version 1.1.54 and 1.1.53 are throwing this null pointer exception. But able to publish using version 1.1.52.

view this post on Zulip John Moehrke (Dec 17 2020 at 12:35):

new IG publisher works!

view this post on Zulip Roeland Luykx (Nov 22 2021 at 09:26):

Hi all
i get a NullPointerException building an IG but i can not see where it is failing (v1.1.88):
....
Generating Narratives (00:09.0568)
Publishing Content Failed: Cannot invoke "org.hl7.fhir.r5.renderers.utils.BaseWrappers$PropertyWrapper.hasValues()" because the return value of "org.hl7.fhir.r5.renderers.utils.BaseWrappers$BaseWrapper.getChildByName(String)" is null (00:09.0591)
(00:09.0592)
Use -? to get command line help (00:09.0592)
(00:09.0592)
Stack Dump (for debugging): (00:09.0592)
java.lang.NullPointerException: Cannot invoke "org.hl7.fhir.r5.renderers.utils.BaseWrappers$PropertyWrapper.hasValues()" because the return value of "org.hl7.fhir.r5.renderers.utils.BaseWrappers$BaseWrapper.getChildByName(String)" is null
at org.hl7.fhir.r5.renderers.ResourceRenderer.getPrimitiveValue(ResourceRenderer.java:476)
at org.hl7.fhir.r5.renderers.ResourceRenderer.renderResourceHeader(ResourceRenderer.java:402)
at org.hl7.fhir.r5.renderers.ProfileDrivenRenderer.render(ProfileDrivenRenderer.java:110)
at org.hl7.fhir.r5.renderers.ResourceRenderer.render(ResourceRenderer.java:86)
at org.hl7.fhir.igtools.publisher.Publisher.generateNarratives(Publisher.java:1302)
at org.hl7.fhir.igtools.publisher.Publisher.loadConformance(Publisher.java:4087)
at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:941)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:793)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:8927)
....

view this post on Zulip Grahame Grieve (Nov 22 2021 at 09:44):

can I reproduce this?

view this post on Zulip Roeland Luykx (Nov 22 2021 at 09:57):

@Grahame Grieve i'am looking for which file it is doing this... but on the error message i can not figure it out. the IG is not public. can i assume that it has something to do with narrative texxt?

view this post on Zulip Grahame Grieve (Nov 22 2021 at 10:01):

oh. whoops. An R3 guide?

view this post on Zulip Roeland Luykx (Nov 22 2021 at 10:02):

:see_no_evil: :hear_no_evil: yes... its customer decision to have still STU3..

view this post on Zulip Grahame Grieve (Nov 22 2021 at 10:05):

hmm I don't have a test case set up for that combination. so I'll issue a fix and cross my fingers, though what's wrong in the code is pretty obvious. Should be about 2 hours

view this post on Zulip Roeland Luykx (Nov 22 2021 at 10:06):

@Grahame Grieve good point. with publisher v1.1.84 its working. since 1.1.85 its failing.


Last updated: Apr 12 2022 at 19:14 UTC