FHIR Chat · R4 IG Build Errors · IG creation

Stream: IG creation

Topic: R4 IG Build Errors


view this post on Zulip Eric Haas (Oct 24 2018 at 15:34):

my diagnosticreport examples are failing in the latest ig-pub

e.g..urinalysis json example passes $validate and even tried as xml example whichpasses r4 schema.

Stack Dump (for debugging):                                                      (00:01:14.0423sec)
java.lang.Exception: Unable to determine type for  /Users/ehaas/Documents/FHIR/US-Core-R4/source/examples/urinalysis: com.google.gson.JsonArray cannot be cast to com.google.gson.JsonObject
    at org.hl7.fhir.igtools.publisher.Publisher.loadAsElementModel(Publisher.java:2394)
    at org.hl7.fhir.igtools.publisher.Publisher.load(Publisher.java:1778)
    at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:582)
    at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:526)
    at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:4925)
Caused by: java.lang.ClassCastException: com.google.gson.JsonArray cannot be cast to com.google.gson.JsonObject
    at com.google.gson.JsonObject.getAsJsonObject(JsonObject.java:182)
    at org.hl7.fhir.r4.formats.JsonParser.parseDiagnosticReportProperties(JsonParser.java:9539)
    at org.hl7.fhir.r4.formats.JsonParser.parseDiagnosticReport(JsonParser.java:9516)
    at org.hl7.fhir.r4.formats.JsonParser.parseResource(JsonParser.java:27504)
    at org.hl7.fhir.r4.formats.JsonParserBase.parse(JsonParserBase.java:92)
    at org.hl7.fhir.r4.formats.ParserBase.parse(ParserBase.java:58)
    at org.hl7.fhir.r4.elementmodel.ObjectConverter.convert(ObjectConverter.java:90)
    at org.hl7.fhir.igtools.publisher.Publisher.loadAsElementModel(Publisher.java:2387)
    ... 4 more
Exception in thread "main" java.lang.NullPointerException
    at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:4935)
Erics-Air-2:US-Core-R4 ehaas$

I know that I've recently updated category to 0..* but that is not the issue.

Can see the examples from the last good build here... http://build.fhir.org/ig/HL7/US-Core-R4/

view this post on Zulip Lloyd McKenzie (Oct 25 2018 at 03:48):

I've seen this before. I think it was fixed by wiping the temp and output folders, but don't remember for sure...

view this post on Zulip Kevin Power (Oct 25 2018 at 16:52):

@Eric Haas @Lloyd McKenzie I am seeing this same error. Locally I tried Lloyds suggestion of wiping temp and output, but still fails. Also fails with the same error http://build.fhir.org/ig/HL7/genomics-reporting/build.log

view this post on Zulip Lloyd McKenzie (Oct 25 2018 at 16:57):

Ok. This might be a substantive change to DiagnosticReport that requires @Grahame Grieve to update the code again :(

view this post on Zulip Kevin Power (Oct 25 2018 at 18:27):

For now, I just took out DiagnosticReport.category from our examples and it builds OK. Not a great long term fix but OK for now.

view this post on Zulip Eric Haas (Oct 25 2018 at 18:39):

I have done the same ( removed the example for now) .. I have not tried a DR from the build however - in case my examples are incorrect. FYI DR has several pending changes including .context 0.1 --> .encounter 0..*

view this post on Zulip Lloyd McKenzie (Oct 25 2018 at 20:25):

I think you meant context 0..* -> encounter 0..1? (Shouldn't be part of multiple encounters...)

view this post on Zulip Eric Haas (Oct 25 2018 at 20:32):

yes

view this post on Zulip Eric Haas (Oct 29 2018 at 21:01):

Also finding:

view this post on Zulip Eric Haas (Oct 29 2018 at 21:01):

10/29/2018 build notes:

HealthCareService examples not working

fixed example to pass latest R4 schema
updated ig-publisher

commented out eligibility as workaround

Stack Dump (for debugging):                                                      (38.0855sec)
java.lang.Exception: Unable to determine type for  /Users/ehaas/Documents/FHIR/VhDir/source/examples/healthcareservice-example-independencerehab1: com.google.gson.JsonArray cannot be cast to com.google.gson.JsonObject
    at org.hl7.fhir.igtools.publisher.Publisher.loadAsElementModel(Publisher.java:2394)
    at org.hl7.fhir.igtools.publisher.Publisher.load(Publisher.java:1778)
    at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:582)
    at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:526)
    at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:4925)
Caused by: java.lang.ClassCastException: com.google.gson.JsonArray cannot be cast to com.google.gson.JsonObject
    at com.google.gson.JsonObject.getAsJsonObject(JsonObject.java:182)
    at org.hl7.fhir.r4.formats.JsonParser.parseHealthcareServiceProperties(JsonParser.java:13100)
    at org.hl7.fhir.r4.formats.JsonParser.parseHealthcareService(JsonParser.java:13025)
    at org.hl7.fhir.r4.formats.JsonParser.parseResource(JsonParser.java:27544)
    at org.hl7.fhir.r4.formats.JsonParserBase.parse(JsonParserBase.java:92)
    at org.hl7.fhir.r4.formats.ParserBase.parse(ParserBase.java:58)
    at org.hl7.fhir.r4.elementmodel.ObjectConverter.convert(ObjectConverter.java:90)
    at org.hl7.fhir.igtools.publisher.Publisher.loadAsElementModel(Publisher.java:2387)
    ... 4 more
Exception in thread "main" java.lang.NullPointerException
    at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:4935)

view this post on Zulip Brian Postlethwaite (Oct 30 2018 at 08:16):

Is that for the VhDir Eric?

view this post on Zulip Brian Postlethwaite (Oct 30 2018 at 08:17):

I would leave it a bit, as I'm about to put in the other core changes for it too.

view this post on Zulip Eric Haas (Oct 30 2018 at 15:12):

Ye, but it is not a big deal - I have it up and running updating with ballot comments and logged these build issues on GitHub so can keep track.

view this post on Zulip Brian Postlethwaite (Oct 30 2018 at 15:18):

I'm looking forward to getting that guide up and running in a few days once the dust clears from R4 core

view this post on Zulip Grahame Grieve (Nov 09 2018 at 06:13):

is this still a problem?

view this post on Zulip Eric Haas (Nov 09 2018 at 12:24):

I am still getting errors with DiagnosticReport examples in R4. The issue arrises in US-Core R4. The example files are parked in the 'draft resources' folder.


Last updated: Apr 12 2022 at 19:14 UTC