FHIR2 module causing linkage error with name "javax/xml/namespace/QName"

Try the changes in this pull request and see if it helps: https://github.com/openmrs/openmrs-module-fhir2/pull/237

1 Like

@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 2.11.0-SNAPSHOT and 2.10.0 versions):

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.

The 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?


@bashir I think I’ve removed the last version of javax.xml.namespace.QName from the FHIR2 classpath with this commit. Could you give that a shot?

1 Like

Thanks @ibacher; with your commit this issues was resolved. Is the root cause the same as TRUNK-5344?

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. image and from the source module xds-sender

. Any advice on how to resolve it? cc @dkayiwa @ccwhite23 @pmanko

1 Like

@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.