Stream: IG creation
Topic: Publisher error in OperationDefinition
David Pyke (Jun 11 2020 at 15:38):
I've created an operation definition in fsh which is giving me this error:
Processing Conformance Resources (00:13.0913)
Publishing Content Failed: Error parsing /media/veracrypt1/ownCloud/Ready/Sequoia/CQPush/Profile/fsh/build/input/examples/OperationDefinition-ceqsubscribe: Not a JSON Object: null (00:13.0946)
(00:13.0946)
Use -? to get command line help (00:13.0946)
(00:13.0946)
Stack Dump (for debugging): (00:13.0947)
java.lang.Exception: Error parsing /media/veracrypt1/ownCloud/Ready/Sequoia/CQPush/Profile/fsh/build/input/examples/OperationDefinition-ceqsubscribe: Not a JSON Object: null
at org.hl7.fhir.igtools.publisher.Publisher.load(Publisher.java:4043)
at org.hl7.fhir.igtools.publisher.Publisher.loadConformance(Publisher.java:3604)
at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:836)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:698)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:7533)
Caused by: java.lang.IllegalStateException: Not a JSON Object: null
at com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:91)
at org.hl7.fhir.r4.formats.JsonParser.parseOperationDefinitionProperties(JsonParser.java:19326)
at org.hl7.fhir.r4.formats.JsonParser.parseOperationDefinition(JsonParser.java:19204)
at org.hl7.fhir.r4.formats.JsonParser.parseResource(JsonParser.java:27598)
at org.hl7.fhir.r4.formats.JsonParserBase.parse(JsonParserBase.java:124)
at org.hl7.fhir.r4.formats.ParserBase.parse(ParserBase.java:61)
at org.hl7.fhir.igtools.publisher.Publisher.parseContent(Publisher.java:4391)
at org.hl7.fhir.igtools.publisher.Publisher.parse(Publisher.java:4448)
at org.hl7.fhir.igtools.publisher.Publisher.load(Publisher.java:4039)
... 4 more
David Pyke (Jun 11 2020 at 15:39):
This is the definition:
OperationDefinition-ceqsubscribe.json
David Pyke (Jun 11 2020 at 15:39):
this is the FSH code that created it. CEQSubscriptionoperation.fsh
David Pyke (Jun 11 2020 at 15:39):
sushi has no problem with it.
David Pyke (Jun 11 2020 at 15:39):
ANy ideas?
Jose Costa Teixeira (Jun 11 2020 at 15:50):
generally, to debug, i run the publisher process separately (because I don't want sushi to change the stuff that I am debugging.
With that in mind:
- can you try to run the publisher without sushi? just rename your fsh folder to something else
"targetProfile": ["http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient","http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization","http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner", "RelatedPerson"]
RelatedPerson is not valid as a canonical, is it? - If I were the publisher, I think I'd complain as well
Try to remove that and run the publisher without sushi, and if that solves it, you know what to change in fsh
David Pyke (Jun 11 2020 at 15:54):
I always run sushi and the publsiher separately, I didn't set up the directory structure for the combined build yet.
I removed RelatedPerson, no change. I'm not seeing a null anywhere in the OpDef, might it be referring to a code that doesn't resolve?
Jose Costa Teixeira (Jun 11 2020 at 15:55):
is the entire IG available somewhere?
David Pyke (Jun 11 2020 at 15:58):
Only on my computer, I haven't uploaded it anywhere. I can send the fsh to you?
Jose Costa Teixeira (Jun 11 2020 at 15:59):
is the IG only one fsh? yes please
Grahame Grieve (Jun 11 2020 at 19:49):
that's a super weird error. According to the stack, you have a null in your parameters array, but your example doesn't have that. So there's some disconnect between what you think you have and what java thinks you have
Jose Costa Teixeira (Jun 11 2020 at 20:07):
Jean Duteau (Jun 11 2020 at 20:12):
the FSH does have a null in it. I don't think the JSON definition is your actual definition. The FSH file will create a null for parameter 1 which causes the error you are seeing.
David Pyke (Jun 11 2020 at 21:01):
Yep, that should throw at least a warning. Having a null may be in rare circumstances desirable but the user should be alerted.
Last updated: Apr 12 2022 at 19:14 UTC