FHIR Chat · Error with Citation resource · IG creation

Stream: IG creation

Topic: Error with Citation resource


view this post on Zulip Giorgio Cangioli (Feb 24 2021 at 13:09):

I've the following error when I try to profile the Citation resource

java.lang.Exception: Error generating snapshot for C:\Users\giorg\OneDrive\github\fhir-forfair-4b\input\profiles\StructureDefinition-Citation-uv-f4f(Citation-uv-f4f): Cannot find or generate snapshot for base definition (http://hl7.org/fhir/StructureDefinition/Citation from

FHIR version is set to "4.5.0"

I have this error even if I make a very trivial profile

Profile:  CitationF4F
Parent:   Citation
Id:       Citation-uv-f4f
Title:    "Citation (FHIR for FAIR)"
Description: "This profile defines how to use the Citation resource to convey metadata information for a FAIR dataset by using HL7 FHIR"
* identifier MS

view this post on Zulip Giorgio Cangioli (Feb 24 2021 at 18:04):

suggestions ?

view this post on Zulip Rob Hausam (Feb 24 2021 at 20:15):

Quick thought - try cleaning out your .class files and see if that helps?

view this post on Zulip Grahame Grieve (Feb 24 2021 at 20:18):

now you don't do that anymore. class files are now irrelevant. It'll be something to do with packages and versions

view this post on Zulip Rob Hausam (Feb 24 2021 at 21:40):

OK. Good to know we don't need to consider the .class files any longer - I don't recall hearing anything about that. Agree it then makes sense to look at packages and versions.

view this post on Zulip Giorgio Cangioli (Feb 25 2021 at 07:40):

Grahame Grieve said:

now you don't do that anymore. class files are now irrelevant. It'll be something to do with packages and versions

Basically what do you suggest me to do? :-)

view this post on Zulip Giorgio Cangioli (Mar 01 2021 at 16:18):

Hi @Grahame Grieve have you any suggestion for me on this point ?

view this post on Zulip Grahame Grieve (Mar 01 2021 at 21:20):

oh - I meant ot ask - how do I reproduce this?

view this post on Zulip Giorgio Cangioli (Mar 02 2021 at 20:59):

Grahame Grieve said:

oh - I meant ot ask - how do I reproduce this?

https://github.com/HL7/fhir-forfair.
Thanks a lot

view this post on Zulip Giorgio Cangioli (Mar 03 2021 at 13:24):

I don't know if it can help.. but creating a Citation instance, instead of a profile based on the Citation, the error that is returned is the following

view this post on Zulip Giorgio Cangioli (Mar 03 2021 at 13:24):

Exception in thread "main" java.lang.Error: The resource type "Citation" does not implement the property "publisher"
at org.hl7.fhir.r5.model.Citation.getPublisher(Citation.java:11392)
at org.hl7.fhir.igtools.renderers.StatusRenderer.readOwner(StatusRenderer.java:121)
at org.hl7.fhir.igtools.renderers.StatusRenderer.analyse(StatusRenderer.java:62)
at org.hl7.fhir.igtools.publisher.Publisher.genStatus(Publisher.java:7402)
at org.hl7.fhir.igtools.publisher.Publisher.saveDirectResourceOutputs(Publisher.java:7165)
at org.hl7.fhir.igtools.publisher.Publisher.generateHtmlOutputs(Publisher.java:6651)
at org.hl7.fhir.igtools.publisher.Publisher.generate(Publisher.java:4906)
at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:888)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:732)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:8417)

view this post on Zulip Grahame Grieve (Mar 03 2021 at 19:42):

so that github repo generates without error for me

view this post on Zulip Grahame Grieve (Mar 03 2021 at 19:45):

so the stack was very useful. fixed next release

view this post on Zulip Giorgio Cangioli (Mar 04 2021 at 08:14):

Thank you so much Grahame !

view this post on Zulip Giorgio Cangioli (Mar 10 2021 at 08:13):

The Citation profile now works (thanks :-) ), but if I add an example as the following..

{
  "resourceType": "Citation",
  "id": "10.1038-s41597-021-00811-3",
  "identifier": [
    {
      "system": "https://doi.org",
      "value": "10.13026/c4n5-3b04"
    }
  ],
  "name": "NInFEA",
  "title": "A non-invasive multimodal foetal ECG-doppler dataset for antenatal cardiology research",
  "status": "active"
}

view this post on Zulip Giorgio Cangioli (Mar 10 2021 at 08:15):

the following error is returned

Generating Summary Outputs                                                       (01:58.0066)
Publishing Content Failed: Cannot invoke "String.compareTo(String)" because the return value of "org.hl7.fhir.r5.model.CanonicalResource.getUrl()" is null (02:16.0464)
<..>
Stack Dump (for debugging):                                                      (02:16.0473)
java.lang.NullPointerException: Cannot invoke "String.compareTo(String)" because the return value of "org.hl7.fhir.r5.model.CanonicalResource.getUrl()" is null
        at org.hl7.fhir.r5.utils.ResourceSorters$CanonicalResourceSortByUrl.compare(ResourceSorters.java:13)
        at org.hl7.fhir.r5.utils.ResourceSorters$CanonicalResourceSortByUrl.compare(ResourceSorters.java:9)
        at java.base/java.util.TimSort.countRunAndMakeAscending(TimSort.java:355)
        at java.base/java.util.TimSort.sort(TimSort.java:220)
        at java.base/java.util.Arrays.sort(Arrays.java:1306)
        at java.base/java.util.ArrayList.sort(ArrayList.java:1721)
        at java.base/java.util.Collections.sort(Collections.java:179)
        at org.hl7.fhir.igtools.publisher.Publisher.generateCanonicalSummary(Publisher.java:5871)
        at org.hl7.fhir.igtools.publisher.Publisher.generateSummaryOutputs(Publisher.java:5657)
        at org.hl7.fhir.igtools.publisher.Publisher.generate(Publisher.java:4916)
        at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:888)
        at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:732)
        at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:8424)

view this post on Zulip Giorgio Cangioli (Mar 10 2021 at 08:16):

any suggestion on where I should look at ?

view this post on Zulip Grahame Grieve (Mar 30 2021 at 19:29):

something doesn't have a canonical URL?


Last updated: Apr 12 2022 at 19:14 UTC