Stream: implementers
Topic: Could not find any HAPI-FHIR structure JARs on the classpath
Ranjith (Jun 14 2016 at 03:02):
Getting: "Could not find any HAPI-FHIR structure JARs on the classpath. Note that as of HAPI-FHIR v0.8, a separate FHIR strcture JAR must be added to your classpath (or project pom.xml if you are using Maven)" when I try to create FHIR object eg: Patient, Bundle in Java. The classpath already contains "hapi-fhir-base-1.5.jar" and "hapi-fhir-structures-dstu3-1.5.jar". Any thoughts would be Helpful. Thank you.
James Agnew (Jun 14 2016 at 03:15):
How are you creating the context? You should probably be creating it using something like FhirContext ctx = FhirContext.forDstu3();
if you are trying to use STU3 resources.
Ranjith (Jun 14 2016 at 03:16):
Yes.
sample:
Patient pat = new Patient();
pat.addName().addFamily("Simpson").addGiven("Homer").addGiven("J");//Create a Context
FhirContext ctx = new FhirContext().forDstu3();
Ranjith (Jun 14 2016 at 03:25):
Hi James, I removed the code and put back in...it works now!!.. Not sure .How? Thank you.
Last updated: Apr 12 2022 at 19:14 UTC