FHIR Chat · NPE in Build · committers

Stream: committers

Topic: NPE in Build


view this post on Zulip Bryn Rhodes (Apr 07 2021 at 14:48):

I'm getting a NullPointerException in the build that I don't get locally:

This was a Full Build                                                      2.722  52sec  862MB
FHIR build failure @ Wed, Apr 7, 2021 14:09+0000                           0.109  52sec  862MB
Error: null
java.lang.NullPointerException
    at org.hl7.fhir.definitions.validation.ResourceValidator.noExternals(ResourceValidator.java:1199)
    at org.hl7.fhir.definitions.validation.ResourceValidator.check(ResourceValidator.java:1155)
    at org.hl7.fhir.definitions.validation.ResourceValidator.checkElement(ResourceValidator.java:728)
    at org.hl7.fhir.definitions.validation.ResourceValidator.checkElement(ResourceValidator.java:779)
    at org.hl7.fhir.definitions.validation.ResourceValidator.check(ResourceValidator.java:184)
    at org.hl7.fhir.definitions.validation.ResourceValidator.check(ResourceValidator.java:594)
    at org.hl7.fhir.tools.publisher.Publisher.validate(Publisher.java:1786)
    at org.hl7.fhir.tools.publisher.Publisher.execute(Publisher.java:608)
    at org.hl7.fhir.tools.publisher.Publisher.main(Publisher.java:473)

Anyone seen this/have any ideas where to check?

view this post on Zulip Lloyd McKenzie (Apr 07 2021 at 15:46):

Looks like you've got a binding with no ValueSet declared and it's not handling that gracefully. No clue why it would be different locally vs. in the build... If you can share the branch, @Mark Iantorno might be able to dig and fix.

view this post on Zulip Bryn Rhodes (Apr 07 2021 at 16:52):

Thank you for the hint, that helped track down that I missed committing the value set, I think that was it

view this post on Zulip Sean McIlvenna (Nov 05 2021 at 13:52):

I'm also getting an NPE, but for a different reason:

Candidate for CodeableReference: [ClinicalImpression.prognosis]
This was a Full Build                                                      0.742  26sec 1536MB
FHIR build failure @ Fri, Nov 5, 2021 06:43-0700                           0.965  27sec 1536MB
Error: null
java.lang.NullPointerException
        at java.base/java.util.ResourceBundle.containsKey(ResourceBundle.java:2302)
        at org.hl7.fhir.utilities.i18n.I18nBase.messageExistsForLocale(I18nBase.java:50)
        at org.hl7.fhir.utilities.i18n.I18nBase.formatMessage(I18nBase.java:67)
        at org.hl7.fhir.validation.BaseValidator.ruleHtml(BaseValidator.java:425)
        at org.hl7.fhir.definitions.validation.ResourceValidator.rule(ResourceValidator.java:124)
        at org.hl7.fhir.definitions.validation.ResourceValidator.checkSearchParams(ResourceValidator.java:383)
        at org.hl7.fhir.definitions.validation.ResourceValidator.check(ResourceValidator.java:217)
        at org.hl7.fhir.definitions.validation.ResourceValidator.check(ResourceValidator.java:594)
        at org.hl7.fhir.tools.publisher.Publisher.validate(Publisher.java:1791)
        at org.hl7.fhir.tools.publisher.Publisher.execute(Publisher.java:613)
        at org.hl7.fhir.tools.publisher.Publisher.main(Publisher.java:478)

Can someone help me figure this out. It is demonstrated by this PR: https://github.com/HL7/fhir/pull/1478
I made changes to Composition's StructureDefinition and examples. I didn't touch ClinicalImpression. I've also looked at ClinicalImpression and don't see .prognosisCodeableReference... There is no CodeableReference within the ClinicalImpression profile, so I'm not sure why it's talking about a "candidate for CodeableReference" in the error.

view this post on Zulip Grahame Grieve (Nov 05 2021 at 20:21):

the pattern of definitions suggests to the build that prognosis should be a CodeableReference. So it won't be - wouldn't say that if it was. But that's nothing to do with your build error

view this post on Zulip Sean McIlvenna (Nov 11 2021 at 15:26):

@Grahame Grieve so what do I do here? the main build doesn't seem to be failing... Only my branch. But, I haven't touched ClinicalImpression! I don't know how to get this dang PR to build!

view this post on Zulip John Moehrke (Nov 11 2021 at 15:27):

I was told , and it worked, to clone FHIR core fresh. make the changes you need to THAT clone.. and it will work fine. It seems old clones get somehow out-of-sync.

view this post on Zulip Sean McIlvenna (Nov 11 2021 at 15:34):

ugh. that's a timely solution when I already don't have any time.

view this post on Zulip Sean McIlvenna (Nov 11 2021 at 15:34):

sigh

view this post on Zulip John Moehrke (Nov 11 2021 at 16:55):

you already have your changes.. so just copy those files to the new clone. bingo, done

view this post on Zulip John Moehrke (Nov 11 2021 at 16:56):

the problem is not with what you edited.

view this post on Zulip Jean Duteau (Nov 11 2021 at 17:01):

and the ClinicalImpression is not the error. That was just an information message that was printed out before the build failed. This error is in the publisher code and @Mark Iantorno or @Grahame Grieve need to find it and squash it. You can do what John suggests and copy your changes over, but I suspect that whatever you did has caused some error but when it goes to spit out the error, it can't find the appropriate message and that is failing.

view this post on Zulip John Moehrke (Nov 11 2021 at 17:15):

my experience was that I was getting dozens of errors in other resources. I cloned new, copied my edited changes to that clone, and built. zero errors.

view this post on Zulip John Moehrke (Nov 11 2021 at 17:15):

I thank @David Pyke for that recommendation.

view this post on Zulip Sean McIlvenna (Nov 17 2021 at 18:10):

Trying your suggesting now @John Moehrke...
Re-cloned the repository, doing a fresh (no changes) publish, and getting errors:

FHIR build failure @ Wed, Nov 17, 2021 09:16-0800                           0.96 2258sec 1740MB
Error: Resource Examples failed instance validation
org.hl7.fhir.tools.publisher.ExampleInspector$EValidationFailed: Resource Examples failed instance validation
        at org.hl7.fhir.tools.publisher.ExampleInspector.summarise(ExampleInspector.java:421)
        at org.hl7.fhir.tools.publisher.Publisher.validationProcess(Publisher.java:5821)
        at org.hl7.fhir.tools.publisher.Publisher.execute(Publisher.java:703)
        at org.hl7.fhir.tools.publisher.Publisher.main(Publisher.java:487)

view this post on Zulip John Moehrke (Nov 17 2021 at 18:13):

well, last updates by Grahame are failing. so, yes #committers/notification is important to follow

view this post on Zulip Sean McIlvenna (Nov 17 2021 at 18:37):

yah, glanced. missed it

view this post on Zulip Grahame Grieve (Nov 17 2021 at 21:58):

should be building OK for me by the end of the day

view this post on Zulip Sean McIlvenna (Nov 18 2021 at 15:39):

Looking through #committers/notification can't see anything about the build being fixed... @Grahame Grieve did you ever get it working again? I just tried cleaning and re-publishing the core fhir spec, and it failed with the same issue as above. Something more I need to do? Or it just isn't fixed yet?

view this post on Zulip Grahame Grieve (Nov 18 2021 at 18:24):

I spent all day wrangling with the build pipeline

view this post on Zulip Grahame Grieve (Nov 18 2021 at 20:52):

ok, in , and updated


Last updated: Apr 12 2022 at 19:14 UTC