error while uploading module with a dependency on javax.ws.rs-api

Hello all;

I am trying to upload module A according to this issue but i keep hitting this error complaining about the spring configuration of beans in the applicationContext-service.xml yet am running the latest built version of core bundled with the latest built snapshot version of the legacy ui .Am currently being blocked with reproducing the error on the latest snapshot version of core.

Thanks

@dkayiwa @mksd @ibacher

Those two sample modules will need to be changed to be able to run on platform 2.4.0-SNAPSHOT due to changes in Spring. One real-world scenario to test this out is to try to load the FHIR and FHIR2 modules in the same OpenMRS instance. Those shouldn’t need any changes and produce the same problem.

@ibacher i added the FHIR module ie fhir-120.0.omod & FHIR2 module ie fhir2-1.0.0-SNAPSHOT.omod files in my openmrs instance.

On running the instance still spring is unhappy about it …

Oh, shoot! I forgot there was web stuff in the FHIR module. The fix is really simple, though: In webModuleApplicationContext.xml find the line that looks like this:

<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/>

And delete it. It’s not a necessary mapping.

@ibacher this is the only bean deifinied in the webModuleApplicationContext.xml of the fhir module

<bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
		<property name="mappings">

			<value>
			</value>
		</property>
	</bean>

,the DefaultAnnotationHandlerMapping from spring is not defined here in order to be deleted…

. How about i define the DefaultAnnotationHandlerMapping bean in the webApplictionContext of the fhir module so that its load during runtime?

Make sure you’re running the latest SNAPSHOT of the FHIR module if you’re running on 2.4.0

@ibacher i was able to fix the error by removing the <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/> spring bean mapping from the webModuleApplicationContext.xml of module A and module B .Am able to reproduce the issue now …

Thanks :+1: