Stream: IG creation
Topic: NPE in IG build validation services
John Moehrke (Jan 13 2021 at 02:40):
I have added some bundle profiles and examples to my MHD IG.. and now get an NPE
Stack Dump (for debugging): (01:02.0184)
java.lang.NullPointerException
at org.hl7.fhir.igtools.publisher.ValidationServices.fetch(ValidationServices.java:142)
at org.hl7.fhir.validation.instance.InstanceValidator.checkReference(InstanceValidator.java:2556)
at org.hl7.fhir.validation.instance.InstanceValidator.checkChildByDefinition(InstanceValidator.java:4428)
at org.hl7.fhir.validation.instance.InstanceValidator.checkChild(InstanceValidator.java:4293)
at org.hl7.fhir.validation.instance.InstanceValidator.validateElement(InstanceValidator.java:4245)
at org.hl7.fhir.validation.instance.InstanceValidator.startInner(InstanceValidator.java:3979)
at org.hl7.fhir.validation.instance.InstanceValidator.start(InstanceValidator.java:3847)
at org.hl7.fhir.validation.instance.InstanceValidator.validateResource(InstanceValidator.java:5013)
at org.hl7.fhir.validation.instance.InstanceValidator.validateContains(InstanceValidator.java:4138)
at org.hl7.fhir.validation.instance.InstanceValidator.checkChildByDefinition(InstanceValidator.java:4442)
at org.hl7.fhir.validation.instance.InstanceValidator.checkChild(InstanceValidator.java:4293)
at org.hl7.fhir.validation.instance.InstanceValidator.validateElement(InstanceValidator.java:4245)
at org.hl7.fhir.validation.instance.InstanceValidator.checkChildByDefinition(InstanceValidator.java:4459)
at org.hl7.fhir.validation.instance.InstanceValidator.checkChild(InstanceValidator.java:4293)
at org.hl7.fhir.validation.instance.InstanceValidator.validateElement(InstanceValidator.java:4245)
at org.hl7.fhir.validation.instance.InstanceValidator.startInner(InstanceValidator.java:3979)
at org.hl7.fhir.validation.instance.InstanceValidator.start(InstanceValidator.java:3847)
at org.hl7.fhir.validation.instance.InstanceValidator.validateResource(InstanceValidator.java:5013)
at org.hl7.fhir.validation.instance.InstanceValidator.validate(InstanceValidator.java:702)
at org.hl7.fhir.validation.instance.InstanceValidator.validate(InstanceValidator.java:675)
at org.hl7.fhir.igtools.publisher.Publisher.validate(Publisher.java:4872)
at org.hl7.fhir.igtools.publisher.Publisher.validate(Publisher.java:4741)
at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:880)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:732)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:8414)
John Moehrke (Jan 13 2021 at 02:40):
build log http://build.fhir.org/ig/IHE/ITI.MHD/branches/master/failure/build.log
John Moehrke (Jan 13 2021 at 02:41):
github repo https://github.com/IHE/ITI.MHD
Grahame Grieve (Jan 14 2021 at 06:50):
I can't reproduce this
John Moehrke (Jan 14 2021 at 13:12):
I think I got over that, but still get late IG build NPEs. Example from current build (see log https://build.fhir.org/ig/IHE/ITI.MHD/branches/master/build.log)
onGenerate:
Exception generating resource /scratch/ig-build-temp-I2BH8Y/repo/fsh-generated/resources/List-ex-b-minimalSubmissionSet::List/ex-b-minimalSubmissionSet: null (01:51.0472)
java.lang.NullPointerException
at java.base/java.lang.String.replace(String.java:2143)
at org.hl7.fhir.igtools.publisher.Publisher.genListView(Publisher.java:6907)
at org.hl7.fhir.igtools.publisher.Publisher.genListViews(Publisher.java:6892)
at org.hl7.fhir.igtools.publisher.Publisher.generateOutputsList(Publisher.java:6848)
at org.hl7.fhir.igtools.publisher.Publisher.generateResourceHtml(Publisher.java:6702)
at org.hl7.fhir.igtools.publisher.Publisher.generateHtmlOutputs(Publisher.java:6653)
at org.hl7.fhir.igtools.publisher.Publisher.generate(Publisher.java:4906)
at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:888)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:732)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:8414)
java.base/java.lang.String.replace(String.java:2143) (01:51.0473)
org.hl7.fhir.igtools.publisher.Publisher.genListView(Publisher.java:6907) (01:51.0474)
org.hl7.fhir.igtools.publisher.Publisher.genListViews(Publisher.java:6892) (01:51.0474)
org.hl7.fhir.igtools.publisher.Publisher.generateOutputsList(Publisher.java:6848) (01:51.0474)
org.hl7.fhir.igtools.publisher.Publisher.generateResourceHtml(Publisher.java:6702) (01:51.0474)
org.hl7.fhir.igtools.publisher.Publisher.generateHtmlOutputs(Publisher.java:6653) (01:51.0474)
org.hl7.fhir.igtools.publisher.Publisher.generate(Publisher.java:4906) (01:51.0474)
org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:888) (01:51.0474)
org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:732) (01:51.0474)
org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:8414) (01:51.0474)
Generating Summary Outputs (01:59.0687)
John Moehrke (Jan 14 2021 at 14:19):
I think Mr Moehrke (@ryan moehrke ) may have determined that this is caused by my profile. When I tried profile in sushi a bundle with slices by #profile, it entered the wrong thing where I specified a core resource (Bundle and Patient)...
David Pyke (Jan 14 2021 at 14:37):
It's a good thing the Moehrke team was working together on this.
John Moehrke (Jan 14 2021 at 15:49):
so my thoughts on solution are not working... My thought is that I will have one profile restrict the "type" of resources, and a second layer profile that restricts the "profile"... That fails in the IG builder due to conflicting constraints????
Caused by: org.hl7.fhir.exceptions.DefinitionException: Slicing rules on differential (profile:resource (/open) "Slicing based on the profile conformance of the entry") do not match those on base (type:resource (/open) "Slicing based on the resource type of the entry") - disciminator @ Bundle.entry (http://ihe.net/fhir/ihe.mhd.fhir/StructureDefinition/IHE.MHD.Dummy.ProvideBundle)
John Moehrke (Jan 14 2021 at 15:50):
so, I need to either be able to profile by #profile including FHIR core resources.... or be able to cascade profiles...
John Moehrke (Jan 14 2021 at 15:54):
https://github.com/IHE/ITI.MHD
specifically this FSH file
https://github.com/IHE/ITI.MHD/blob/master/input/fsh/provideBundle.fsh
which sushi does create this structureDefinition that the build is failing on
http://build.fhir.org/ig/IHE/ITI.MHD/branches/master/failure/fsh-generated/resources/StructureDefinition-IHE.MHD.Comprehensive.ProvideBundle.json
John Moehrke (Jan 14 2021 at 16:38):
It appears Moehrke-Research has come thru with a workaround... in my profile slice using #profile. I just explicitly point at the FHIR structureDefinition for the resources I mean...
* entry[Documents].resource only http://hl7.org/fhir/StructureDefinition/Binary
Last updated: Apr 12 2022 at 19:14 UTC