Try the changes in this pull request and see if it helps: https://github.com/openmrs/openmrs-module-fhir2/pull/237
@mksd did incorporating the PR that @dkayiwa mentioned fixed the problem you had? I am getting a similar LinkageError when using the Ref. App. set through the SDK (with both
Failure during REST processing: java.lang.LinkageError: loader constraint violation: loader (instance of org/openmrs/module/ModuleClass Loader) previously initiated loading for a different type with name "javax/xml/namespace/QName"
Stack trace here.
fhir2 module is built from HEAD (this commit to be exact) and copied to the
modules directory (and old
fhir module removed).
Which exact REST call were you doing?
Yes, in so far as it’s caused by two instances of a class being loaded in two different ModuleClassLoaders at the same time.
Hi @ibacher, I stumbled upon a similar class loader issue. Upon investigating further, I realized that there may be another version of the
javax.xml.namespace.QName class being loaded from the
xpp3 library. Check out the dependency tree screenshot below from the fhir2-api’s pom.xml file.
and from the source module
@moshon Nice catch! I’ll see what we can do about eliminating that xpp3 and relying on the xpp3_min version in OpenMRS instead. If that works, I can release 1.2.1 of the FHIR module.
This is fixed and 1.2.1 has been released to our Maven repo.