Stream: IG creation
Topic: getting error on all my IGs with latest ig-pub
Eric Haas (Jul 08 2019 at 19:10):
after updating the ig-pub to the latest version as of now am getting the following error on all my builds...
this occurs after the packages are loaded and right after many lines of like those shown below:
Eric Haas (Jul 08 2019 at 19:10):
Check Generate /Users/ehaas/Documents/FHIR/Davinci-Alerts/generated_output/temp/tbl_bck15140.png (46.0811sec) Check Generate /Users/ehaas/Documents/FHIR/Davinci-Alerts/generated_output/qa/modifier.png (46.0812sec) Check Generate /Users/ehaas/Documents/FHIR/Davinci-Alerts/generated_output/temp/modifier.png (46.0815sec) Check Generate /Users/ehaas/Documents/FHIR/Davinci-Alerts/generated_output/qa/tbl_bck1050.png (46.0816sec) Check Generate /Users/ehaas/Documents/FHIR/Davinci-Alerts/generated_output/temp/tbl_bck1050.png (46.0818sec) Check Generate /Users/ehaas/Documents/FHIR/Davinci-Alerts/generated_output/qa/tbl_bck01101.png (46.0820sec) Check Generate /Users/ehaas/Documents/FHIR/Davinci-Alerts/generated_output/temp/tbl_bck01101.png (46.0822sec) Check Generate /Users/ehaas/Documents/FHIR/Davinci-Alerts/generated_output/qa/tbl_spacer.png (46.0824sec) Check Generate /Users/ehaas/Documents/FHIR/Davinci-Alerts/generated_output/temp/tbl_spacer.png (46.0826sec) Publishing Content Failed: com.google.gson.JsonPrimitive cannot be cast to com.google.gson.JsonArray (44.0781sec) (44.0781sec) Use -? to get command line help (44.0781sec) (44.0781sec) Stack Dump (for debugging): (44.0781sec) java.lang.ClassCastException: com.google.gson.JsonPrimitive cannot be cast to com.google.gson.JsonArray at com.google.gson.JsonObject.getAsJsonArray(JsonObject.java:195) at org.hl7.fhir.igtools.publisher.Publisher.initializeFromJson(Publisher.java:1769) at org.hl7.fhir.igtools.publisher.Publisher.initialize(Publisher.java:1122) at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:605) at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:6207) Exception in thread "main" java.lang.NullPointerException at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:6217) Erics-Air-2:IG-Template2 ehaas$
Eric Haas (Jul 08 2019 at 19:11):
I don't know where to start looking as the error is not very specific to where
Grahame Grieve (Jul 08 2019 at 19:59):
you have a json primitive "mappings"
Grahame Grieve (Jul 08 2019 at 19:59):
why?
Eric Haas (Jul 08 2019 at 20:01):
from ig.json
... "extraTemplates": ["mappings"], "mappings": "false",
Grahame Grieve (Jul 08 2019 at 20:03):
does mappings do anything there? the code is hard to follow and Lloyd wrote it - but I don't think it does anything
Eric Haas (Jul 08 2019 at 20:03):
I added a few name value pairs in the control file for my scripts - do I need to get rid of them?
Eric Haas (Jul 08 2019 at 20:05):
So mappings is my custom stuff. I'll remove it and see
Grahame Grieve (Jul 08 2019 at 20:05):
in principle no, but there's a name re-use problem which is what is happening here
Eric Haas (Jul 08 2019 at 20:05):
OK thanks
Lloyd McKenzie (Jul 08 2019 at 21:12):
Can someone @ me to follow up when I have my computer? Apparently I can't do it to myself
David Pyke (Jul 08 2019 at 21:15):
done
Chris Moesel (Jul 09 2019 at 02:04):
It seems this may not be an issue w/ just Eric's build, as @Douglas Denney has reported this on the cdsic-lab
IG as well. See: https://chat.fhir.org/#narrow/stream/179165-committers/topic/JsonPrimitive.20cannot.20be.20cast.20to.20JsonArray/near/170415343
Eric Haas (Jul 09 2019 at 17:06):
I fixed by removing the line:
"mappings": "false",
if you are using one of my (Healthedata1) templates that line may be lurking in your ig.json file.
Douglas Denney (Jul 10 2019 at 02:05):
@Eric Haas , I modified my ig.json file to also remove that line and now I can get it to build. Thanks for this fix!
Last updated: Apr 12 2022 at 19:14 UTC