Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘serviceRequestTranslatorImpl’: Unsatisfied dependency expressed through field ‘taskService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘fhirTaskServiceImpl’: Unsatisfied dependency expressed through field ‘searchQueryInclude’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘searchQueryInclude’: Unsatisfied dependency expressed through field ‘locationService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘fhirLocationServiceImpl’: Unsatisfied dependency expressed through field ‘translator’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘locationTranslatorImpl’: Unsatisfied dependency expressed through field ‘locationTypeTranslator’; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘org.openmrs.module.fhir2.api.translators.LocationTypeTranslator’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
@mherman22 could you make sure to provide the required fhir2 api .jar dependencies scoped as provided in the conditional submodule introduced as part of the PR?
@mherman22 - the FHIR2 module has several submodules, and you need to ensure you have the appropriate ones included. Specifically here, since you are creating an Iniz submodule that is based on OpenMRS 2.6, you need to look to see if the FHIR2 module has any submodules that are specific to OpenMRS 2.6+. And indeed the FHIR2 module does have such an artifact.
I would recommend using the pom provided in the api-2.5 submodule as a guide as to how to do this.
Specifically, see how the api-2.5 pom of initializer includes all of the initializer submodules that are related to OpenMRS 2.5 and under, and also see how it includes the fhir2-api-2.5 submodule:
So you will need to included similar in your api-2.6 pom, but include also fhir2-api-2.6
Thanks @mseaton, i have done much of the stuff detailed above however the issue persists.
I have even gone ahead and ensured the fhir2 module version (1.6.0) in the parent module doesn’t change and ensured the api-2.6 runs on fhir2:1.11.0 as can be seen in this commit:
I tried checkout out your branch on your fork in the hope that you had a failing unit test that demonstrated this issue, but I don’t see one. I do see another unit test failing (LoadersOrderTest) with the error no loader for domain FHIR_CONTACT_POINT_MAP was found . So, in order to properly help you to investigate, it would be best to have some sort of context-sensitive test that actually tries to start up the context where you can demonstrate this error, and which does not require one to try running the module in an OpenMRS instance.
One thing I see missing is the api-2.5 as a dependency (eg. if you mimicked what was happening in api-2.5 pom that’s good, but then you also need to remember to add the api-2.5 dependency itself). Something like this: