FHIR Chat · Version 3.0 to 5.0 conversion issue · hapi

Stream: hapi

Topic: Version 3.0 to 5.0 conversion issue


view this post on Zulip Alexander Henket (Feb 11 2020 at 10:20):

I ran the source in Eclipse just now and got this new error that does not appear to be mine, but from the converting the core Appointment resource. Even after removing any hint of Appointment in my set this error stayed on.

Know issue?

Error loading StructureDefinition-Appointment.json: org.hl7.fhir.r5.model.UriType cannot be cast to org.hl7.fhir.r5.model.CanonicalType
Exception in thread "main" org.hl7.fhir.exceptions.FHIRException: Error loading StructureDefinition-Appointment.json: org.hl7.fhir.r5.model.UriType cannot be cast to org.hl7.fhir.r5.model.CanonicalType
    at org.hl7.fhir.r5.context.SimpleWorkerContext.fromDefinitions(SimpleWorkerContext.java:223)
    at org.hl7.fhir.r5.validation.ValidationEngine.loadDefinitions(ValidationEngine.java:341)
    at org.hl7.fhir.r5.validation.ValidationEngine.loadInitialDefinitions(ValidationEngine.java:288)
    at org.hl7.fhir.r5.validation.ValidationEngine.<init>(ValidationEngine.java:320)
    at org.hl7.fhir.r5.validation.Validator.main(Validator.java:570)
Caused by: java.lang.ClassCastException: org.hl7.fhir.r5.model.UriType cannot be cast to org.hl7.fhir.r5.model.CanonicalType
    at org.hl7.fhir.convertors.conv30_50.StructureDefinition30_50.convertStructureDefinition(StructureDefinition30_50.java:109)
    at org.hl7.fhir.convertors.VersionConvertor_30_50.convertResource(VersionConvertor_30_50.java:4653)
    at org.hl7.fhir.convertors.R3ToR5Loader.loadBundle(R3ToR5Loader.java:65)
    at org.hl7.fhir.r5.context.SimpleWorkerContext.loadFromFileJson(SimpleWorkerContext.java:295)
    at org.hl7.fhir.r5.context.SimpleWorkerContext.loadDefinitionItem(SimpleWorkerContext.java:233)
    at org.hl7.fhir.r5.context.SimpleWorkerContext.fromDefinitions(SimpleWorkerContext.java:220)
    ... 4 more

view this post on Zulip Grahame Grieve (Feb 11 2020 at 10:20):

@Mark Iantorno making sure you know about this (this is work in progress)

view this post on Zulip Alexander Henket (Feb 12 2020 at 03:42):

I see one version of the class cast problem is fixed. Thanks! I got this one in return though:

* load file: eAfspraak-OperationDefinition-appointment-cancel.xml - ignored due to error: org.hl7.fhir.r5.model.StringType cannot be cast to org.hl7.fhir.r5.model.MarkdownType
* load file: eAfspraak-OperationDefinition-slot-find.xml - ignored due to error: org.hl7.fhir.r5.model.StringType cannot be cast to org.hl7.fhir.r5.model.MarkdownType
* load file: eAfspraak-OperationDefinition-appointment-book.xml - ignored due to error: org.hl7.fhir.r5.model.StringType cannot be cast to org.hl7.fhir.r5.model.MarkdownType
* load file: OperationDefinition-medication-overview.xml - ignored due to error: org.hl7.fhir.r5.model.StringType cannot be cast to org.hl7.fhir.r5.model.MarkdownType

view this post on Zulip Grahame Grieve (Feb 12 2020 at 03:45):

@Mark Iantorno I'm getting a few of these too. I'll hunt them down at some stage. In the meantime, @Alexander Henket, can you provide source?

view this post on Zulip Grahame Grieve (Feb 12 2020 at 03:48):

next release will stack dump in this circumstance so we get good information

view this post on Zulip Alexander Henket (Feb 12 2020 at 05:51):

OperationDefinition-medication-overview.xml

view this post on Zulip Alexander Henket (Feb 12 2020 at 05:51):

eAfspraak-OperationDefinition-appointment-book.xml eAfspraak-OperationDefinition-appointment-cancel.xml eAfspraak-OperationDefinition-slot-find.xml

view this post on Zulip Alexander Henket (Feb 12 2020 at 05:54):

What I liked about these messages was that they are very clear as to what file is the problem. What's not so clear is the path it is on at that point. Maybe that is worth including too

view this post on Zulip Grahame Grieve (Feb 12 2020 at 06:06):

that's what my change does

view this post on Zulip Mark Iantorno (Feb 12 2020 at 14:25):

I will look into these today. With the sheer scope of the changes to the codebase I made in refactoring, I think I missed some conversion casting.

view this post on Zulip Alexander Henket (Feb 14 2020 at 12:48):

Thanks. All seems well now in the latest build


Last updated: Apr 12 2022 at 19:14 UTC