Stream: hapi
Topic: error from HAPI
Grahame Grieve (Jul 26 2016 at 04:43):
java.lang.ClassCastException: Found instance of class org.hl7.fhir.dstu2.model.HumanName - Did you set a field value to the incorrect type? Expected org.hl7.fhir.instance.model.api.IBase at ca.uhn.fhir.util.ElementUtil.isEmpty(ElementUtil.java:108) at ca.uhn.fhir.util.ElementUtil.isEmpty(ElementUtil.java:41) at org.hl7.fhir.dstu2.utils.FHIRPathEngine.funcExists(FHIRPathEngine.java:2251) at org.hl7.fhir.dstu2.utils.FHIRPathEngine.evaluateFunction(FHIRPathEngine.java:1923) at org.hl7.fhir.dstu2.utils.FHIRPathEngine.execute(FHIRPathEngine.java:796) at org.hl7.fhir.dstu2.utils.FHIRPathEngine.execute(FHIRPathEngine.java:810) at org.hl7.fhir.dstu2.utils.FHIRPathEngine.execute(FHIRPathEngine.java:810) at org.hl7.fhir.dstu2.utils.FHIRPathEngine.evaluate(FHIRPathEngine.java:256)
Grahame Grieve (Jul 26 2016 at 04:44):
@James Agnew - I haven't got anything wrong in my object model. what's goiing on here?
James Agnew (Jul 26 2016 at 11:12):
Ahh... There shouldn't be an IBase.java
interface in the directory trunk/build/implementations/java/org.hl7.fhir.dstu2/src/org/hl7/fhir/dstu2/model
The class org.hl7.fhir.dstu2.model.Base
should implement org.hl7.fhir.instance.model.api.IBase
, which is a super interface for all model objects across all versions.
James Agnew (Jul 26 2016 at 11:13):
I haven't used the DSTU2 RI model at all since its packages got renamed. Are you backporting FluentPath?
Grahame Grieve (Jul 26 2016 at 20:19):
yes, that's what I'm doing. I ended up just removing the use of ElementUtil in R2
Grahame Grieve (Jul 26 2016 at 20:20):
We have a set of DSTU2 based tests for FluentPath
James Agnew (Jul 28 2016 at 02:00):
Cool.
Last updated: Apr 12 2022 at 19:14 UTC