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

Hello everyone,

I am involved in a OpenMRS project with version 2.3.0.

I was trying to include fhir2-1.0.0-SNAPSHOT.omod and I am seeing this error in the log. I am not able to load my OpenMRS application after that.

I have attached the application log to trace and I find that the following line in attached log as primary cause of the issue.

Exception in thread "Thread-10" java.lang.LinkageError:
  loader constraint violation:
  loader (instance of 
  previously initiated loading for a different type with name 

Can you help me fix this?

openmrs.log.txt (11.7 KB)

@mksd @ibacher @rrameshbtech @mddubey @sivareddy @vasanth2019

Did you remember to remove the old fhir module?

Hey @dkayiwa I thought the same too. I have made clear installation with FHIR2 omod. And I have checked the bundledModules and .openmrs-lib-cache just in case but there is only fhir2 module present.

Could you remove the datafilter module to from you local instance? Looks like I need to investigate whether or not the HAPI FHIR Converters need SAXON to operate.

Yes, @ibacher. I will do it in a fresh installation and do that just in case. Will get back to you once it is done. Thank you for your support :blush:

Hey @ibacher

Removing datafilter omod seems to works. But I tried to get endpoint /ws/fhir2/Patient/{patientUUID} as I did with fhir 1 module. The FHIR module returned Patient resource as expected but the FHIR2 is not returning anything. Then I remember that there are going to be changes in fhir2 endpoint such that it would be like /ws/fhir2/r3/Patient.

If there is any endpoint reference for testing purposes that I can look it would be helpful

I think it should work with /ws/fhir2/R4/Patient (I’d prefer R4 over R3).

I haven’t setup a reference testing end point yet, but I suppose that’s something that should likely happen.

Hey @ibacher. Thanks. I made a silly mistake. I put small case r3 instead R3. Both R3 and R4 works fine!

Thank you!

Oh sorry, I meant endpoint reference documentation. I guess I found this for FHIR module but for FHIR2, with the R3 and R4, I assume this link would tell in detail. Correct me if I am going in the wrong direction since this is all new to me! :sweat_smile:

@ibacher you seem to know what the issue might be when running both FHIR2 and Data Filter. Is there a ticket for this? I’m asking because we will need to track this closely.

There is no ticket raised. Shall I raise it?

Yes, however I this stage I don’t know if it’s a FHIR2 ticket or a Data Filter ticket. @ibacher suggested that there could be a change needed in FHIR2 though.

I think it should be FHIR2 ticket as @ibacher suggested. Also only FHIR2 has this issue. The first FHIR module v1.20.0 works well with the datafilter.

Shall I proceed with ticket stating FHIR2 when deployed with datafilter module results in QName linkage error?

Sure, with steps to reproduce, stack trace… etc etc. Thanks @kinle.

I have created a bug card here → FM2-184.

@ibacher @mksd

1 Like

I actually think the underlying cause is TRUNK-5344, rather than being an issue specific to either the Datafilter module or the FHIR2 module. I’m just hoping I can eliminate an indirect dependency from FHIR2 and eliminate the issue, but I can’t promise that that works.

I’m not so sure this is the same as TRUNK-5344. I’m going to try to reproduce this one (FM2-184) and see what’s going on.

Issue created here -> FM2-184

@ibacher and @leebreisacher, I just got a report that there is a similar error being thrown when using the HFE <drawing/> tag of the Drawing module when FHIR2 is started:

java.lang.LinkageError: javax/xml/namespace/QName

Stack trace here.

I haven’t looked into it yet, just reporting this here for now.