FHIR Chat · duplicate property error · IG creation

Stream: IG creation

Topic: duplicate property error


view this post on Zulip Brian Reinhold (Nov 21 2018 at 13:20):

I am getting this error which I cannot recover from. I have reverted and the error remains. I do not understand the error.

    [java] java.lang.Exception: Unable to determine type for  E:\Ruby25-x64\IG_Publisher\PHD\src\resources\PhdBaseObservation: java.io.IOException: Error parsing JSON source: Duplicated property name: min at Line 1 (path=[//differential/element[]/min1])Publishing Content Failed: Unable to determine type for  E:\Ruby25-x64\IG_Publisher\PHD\src\resources\PhdBaseObservation: java.io.IOException: Error parsing JSON source: Duplicated property name: min at Line 1 (path=[//differential/element[]/min1]) (12.0304sec)
     [java]
     [java]                                                                                  (12.0304sec)
     [java]     at org.hl7.fhir.igtools.publisher.Publisher.loadAsElementModel(Publisher.java:2394)
     [java] Use -? to get command line help                                                  (12.0304sec)
     [java]     at org.hl7.fhir.igtools.publisher.Publisher.load(Publisher.java:1778)
     [java]                                                                                  (12.0304sec)
     [java] Stack Dump (for debugging):                                                      (12.0304sec)
     [java]     at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:582)
     [java]     at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:526)
     [java]     at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:4925)
     [java] Caused by: org.hl7.fhir.exceptions.FHIRException: java.io.IOException: Error parsing JSON source: Duplicated property name: min at Line 1 (path=[//differential/element[]/min1])
     [java]     at org.hl7.fhir.r4.elementmodel.ObjectConverter.convert(ObjectConverter.java:93)
     [java]     at org.hl7.fhir.igtools.publisher.Publisher.loadAsElementModel(Publisher.java:2387)
     [java]     ... 4 more
     [java] Caused by: java.io.IOException: Error parsing JSON source: Duplicated property name: min at Line 1 (path=[//differential/element[]/min1])
     [java]     at org.hl7.fhir.r4.utils.formats.JsonTrackingParser$Lexer.error(JsonTrackingParser.java:170)
     [java]     at org.hl7.fhir.r4.utils.formats.JsonTrackingParser$Lexer.access$400(JsonTrackingParser.java:90)
     [java]     at org.hl7.fhir.r4.utils.formats.JsonTrackingParser.readObject(JsonTrackingParser.java:346)
     [java]     at org.hl7.fhir.r4.utils.formats.JsonTrackingParser.readArray(JsonTrackingParser.java:409)
     [java]     at org.hl7.fhir.r4.utils.formats.JsonTrackingParser.readObject(JsonTrackingParser.java:387)
     [java]     at org.hl7.fhir.r4.utils.formats.JsonTrackingParser.readObject(JsonTrackingParser.java:354)
     [java]     at org.hl7.fhir.r4.utils.formats.JsonTrackingParser.parse(JsonTrackingParser.java:334)
     [java]     at org.hl7.fhir.r4.utils.formats.JsonTrackingParser.parse(JsonTrackingParser.java:319)
     [java]     at org.hl7.fhir.r4.formats.JsonParserBase.loadJson(JsonParserBase.java:167)
     [java]     at org.hl7.fhir.r4.formats.JsonParserBase.parse(JsonParserBase.java:91)
     [java]     at org.hl7.fhir.r4.formats.ParserBase.parse(ParserBase.java:58)
     [java]     at org.hl7.fhir.r4.elementmodel.ObjectConverter.convert(ObjectConverter.java:90)
     [java]     ... 5 more
     [java] Exception in thread "main" java.lang.NullPointerException
     [java]     at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:4935)
     [java] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

ANyone have any idea what this means?

view this post on Zulip Eric Haas (Nov 21 2018 at 16:10):

looks like a malformed json file

view this post on Zulip Brian Reinhold (Nov 21 2018 at 16:13):

looks like a malformed json file

It was. It was just in a location different than suggested by the error message. So I was looking in the wrong place (only at that section I had changed). The 'Line 1' confused me because I was looking at my file. But probably what happens is that the builder removes all the line breaks and the thing is one long line....

view this post on Zulip Eric Haas (Nov 21 2018 at 16:16):

I just run the files through a json validator rather than try to use the error message line and char. Often the files are reformatted (minimized, resorted ).

view this post on Zulip Eric Haas (Nov 21 2018 at 16:16):

so you can only get an approximate location to your source files

view this post on Zulip Brian Reinhold (Nov 21 2018 at 16:17):

so you can only get an approximate location to your source files

Problem was I could not find it. It may not have been saved to a file because the build aborted.


Last updated: Apr 12 2022 at 19:14 UTC