Stream: IG creation
Topic: Build failing
Rob Hausam (Jul 28 2019 at 18:46):
I've run into what seems to be a rather weird issue. I have a CodeSystem resource instance (a LOINC code system fragment) that I'm trying to use in the livd IG. This CodeSystem resource instance is valid against the http://hl7.org/fhir/uv/livd/StructureDefinition/codesystem-loinc-frag-uv-livd profile that is included in the IG (and livd package). The resource instance has a meta.profile element that specifies that profile. When I validate the resource instance separately against the ig and that profile with the latest validator, it's gives all "Success...", with zero errors, warnings and info. But when I include it in the IG as a vocabulary resource and attempt to build the IG (using the latest 0.9.43-SNAPSHOT IG Publisher), if the meta profile declaration is present the build errors out with:
[java] Stack Dump (for debugging): (19.0984sec) [java] java.lang.Exception: Error parsing /Users/rhausam/git-repo/livd/src/vocabulary/codesystem-loinc-fragment-livd: com.google.gson.JsonPrimitive cannot be cast to com.google.gson.JsonArray [java] at org.hl7.fhir.igtools.publisher.Publisher.load(Publisher.java:3294) [java] at org.hl7.fhir.igtools.publisher.Publisher.loadConformance(Publisher.java:2905) [java] at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:723) [java] at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:612) [java] at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:6208) [java] Caused by: java.lang.ClassCastException: com.google.gson.JsonPrimitive cannot be cast to com.google.gson.JsonArray [java] at com.google.gson.JsonObject.getAsJsonArray(JsonObject.java:195) [java] at org.hl7.fhir.r4.formats.JsonParser.parseMetaProperties(JsonParser.java:260) [java] at org.hl7.fhir.r4.formats.JsonParser.parseMeta(JsonParser.java:241) [java] at org.hl7.fhir.r4.formats.JsonParser.parseResourceProperties(JsonParser.java:1988) [java] at org.hl7.fhir.r4.formats.JsonParser.parseDomainResourceProperties(JsonParser.java:1918) [java] at org.hl7.fhir.r4.formats.JsonParser.parseCodeSystemProperties(JsonParser.java:6057) [java] at org.hl7.fhir.r4.formats.JsonParser.parseCodeSystem(JsonParser.java:6052) [java] at org.hl7.fhir.r4.formats.JsonParser.parseResource(JsonParser.java:27446) [java] at org.hl7.fhir.r4.formats.JsonParserBase.parse(JsonParserBase.java:113) [java] at org.hl7.fhir.r4.formats.ParserBase.parse(ParserBase.java:79) [java] at org.hl7.fhir.igtools.publisher.Publisher.parseContent(Publisher.java:3569) [java] at org.hl7.fhir.igtools.publisher.Publisher.parse(Publisher.java:3620) [java] at org.hl7.fhir.igtools.publisher.Publisher.load(Publisher.java:3291) [java] ... 4 more [java] Exception in thread "main" java.lang.NullPointerException [java] at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:6218)
But if I remove the meta element and profile declaration in the CodeSystem instance and don't make any other changes, then the IG builds just fine. I don't see anything anywhere that seems like it would relate to an "array vs primitive" discrepancy, and I expect that's not really the issue since the the resource validates fine independently. Do any of you have thoughts or solutions for this?
Grahame Grieve (Jul 28 2019 at 18:48):
paste the meta here:
Rob Hausam (Jul 28 2019 at 18:49):
It's just this:
"meta": { "profile": "http://hl7.org/fhir/uv/livd/StructureDefinition/codesystem-loinc-frag-uv-livd" },
Rob Hausam (Jul 28 2019 at 18:52):
oh, I see it now - I thought I had the array there but I don't
Grahame Grieve (Jul 28 2019 at 18:52):
well, that's wrong...
Grahame Grieve (Jul 28 2019 at 18:54):
"meta": { ["profile": "http://hl7.org/fhir/uv/livd/StructureDefinition/codesystem-loinc-frag-uv-livd"] },
Rob Hausam (Jul 28 2019 at 18:57):
I know - I thought I looked that over multiple times, but guess I wasn't looking carefully enough!
Grahame Grieve (Jul 28 2019 at 18:57):
shouldn't have validated correctly though
Rob Hausam (Jul 28 2019 at 19:10):
yeah, it shouldn't have, but it did
the issue itself is fixed now - I just wasn't seeing it, partly I think because it was validating ok
Richard Kavanagh (Dec 07 2019 at 11:19):
Currently getting this error using the latest version of the tool - any ideas what the issue might be?
pasted image
Grahame Grieve (Dec 07 2019 at 12:25):
if you are using the latest version of the ig publisher - empty your FHIR package cache
Richard Kavanagh (Dec 07 2019 at 12:32):
Thanks @Grahame Grieve - i did that and got the following results. I'm suspecting I have security issues, not sure why though.
pasted image
Grahame Grieve (Dec 07 2019 at 19:09):
if you are using the latest version of the ig publisher
You are using quite an old version of the IG publisher
Last updated: Apr 12 2022 at 19:14 UTC