The service it-fse-gtw-dispatcher fails during startup by giving the following error log in the output:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'kafkaProducerCFG': Unsatisfied dependency expressed through field 'kafkaPropCFG'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'kafkaPropertiesCFG': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'TENANT_ID' in value "${TENANT_ID}"
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:713)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:693)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:408)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:929)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:591)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:732)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:409)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1300)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1289)
at it.finanze.sanita.fse2.ms.gtw.dispatcher.DispatcherApplication.main(DispatcherApplication.java:27)
The error should be related to the resolution of the TENANT_ID placeholder on the ${TENANT_ID} value assigned to the property kafka.oauth.tenantId. By inspecting the application.properties file of the it-fse-gtw-dispatcher service the following properties are present:
kafka.oauth.tenantId=${TENANT_ID}
kafka.oauth.appId=${APP_ID}
kafka.oauth.pfxPathName=${PFX_NAME_RESOURCE_PATH}
kafka.oauth.pwd=${PFX_PASSWORD}
On the application-dev.properties file these properties are overridden in the following way:
kafka.oauth.tenantId=
kafka.oauth.appId=
kafka.oauth.pfxPathName=
kafka.oauth.pwd=
Should the same property overrides be defined on the application-docker.properties file to make the service working?
The service
it-fse-gtw-dispatcherfails during startup by giving the following error log in the output:The error should be related to the resolution of the
TENANT_IDplaceholder on the ${TENANT_ID} value assigned to the propertykafka.oauth.tenantId. By inspecting the application.properties file of theit-fse-gtw-dispatcherservice the following properties are present:On the
application-dev.propertiesfile these properties are overridden in the following way:Should the same property overrides be defined on the
application-docker.propertiesfile to make the service working?