Commons module RIDGENERATOR SERVICE errors

Hello Mosip Team,
I cloned and built commons LTS-1.2.0.1 Sprint6 git branch repo that i would like to test from my local machine,
I also cloned and run config-server develop2-v2 branch and is running as indicated localhost:51000/config/kernel/env/develop2-v2
I not sure with the bootstrap.prorperties values to give. And I am getting the following errors.

error logs:
18:38:36,052 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
18:38:36,053 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
18:38:36,057 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/D:/project/commons/kernel/kernel-ridgenerator-service/target/classes/logback.xml]
18:38:36,058 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs multiple times on the classpath.
18:38:36,058 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [file:/D:/project/commons/kernel/kernel-dataaccess-hibernate/target/classes/logback.xml]
18:38:36,058 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [file:/D:/project/commons/kernel/kernel-ridgenerator-service/target/classes/logback.xml]
18:38:36,258 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
18:38:36,267 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@2:83 - no applicable action for [springProperty], current ElementPath is [[configuration][springProperty]]
18:38:36,267 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
18:38:36,278 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
18:38:36,651 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
18:38:36,651 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
18:38:36,652 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
18:38:36,654 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@18ece7f4 - Registering current configuration as safe fallback point

{“@timestamp”:“2023-09-12T18:38:38.859+03:00”,“@version”:“1”,“message”:“Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@3e8f7922: startup date [Tue Sep 12 18:38:38 EAT 2023]; root of context hierarchy”,“logger_name”:“org.springframework.context.annotation.AnnotationConfigApplicationContext”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“kernel-ridgenerator-service”}
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1 (file:/C:/Users/PC/.m2/repository/org/springframework/spring-core/5.0.6.RELEASE/spring-core-5.0.6.RELEASE.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte,int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of org.springframework.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
{“@timestamp”:“2023-09-12T18:38:39.234+03:00”,“@version”:“1”,“message”:“Bean ‘configurationPropertiesRebinderAutoConfiguration’ of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$52c024c5] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)”,“logger_name”:“org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“kernel-ridgenerator-service”}

. ____ _ __ _ _
/\ / __ _ () __ __ _ \ \ \
( ( )_
_ | '_ | '| | ’ / ` | \ \ \
\/ )| |)| | | | | || (| | ) ) ) )
’ |
| .__|| ||| |_, | / / / /
=========|
|==============|/=////
:: Spring Boot :: (v2.0.2.RELEASE)

{“@timestamp”:“2023-09-12T18:38:40.823+03:00”,“@version”:“1”,“message”:“Could not locate PropertySource: Invalid URL: localhost”,“logger_name”:“org.springframework.cloud.config.client.ConfigServicePropertySourceLocator”,“thread_name”:“main”,“level”:“WARN”,“level_value”:30000,“appName”:“kernel-ridgenerator-service”}
{“@timestamp”:“2023-09-12T18:38:40.827+03:00”,“@version”:“1”,“message”:“The following profiles are active: dev”,“logger_name”:“io.mosip.kernel.ridgenerator.RidGeneratorBootApplication”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“kernel-ridgenerator-service”}
{“@timestamp”:“2023-09-12T18:38:40.853+03:00”,“@version”:“1”,“message”:“Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@37fdfb05: startup date [Tue Sep 12 18:38:40 EAT 2023]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@3e8f7922”,“logger_name”:“org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“kernel-ridgenerator-service”}
{“@timestamp”:“2023-09-12T18:38:40.977+03:00”,“@version”:“1”,“message”:“Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [io.mosip.kernel.ridgenerator.RidGeneratorBootApplication]; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder ‘mosip.auth.adapter.impl.basepackage’ in value "${mosip.auth.adapter.impl.basepackage}"”,“logger_name”:“org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext”,“thread_name”:“main”,“level”:“WARN”,“level_value”:30000,“appName”:“kernel-ridgenerator-service”}
{“@timestamp”:“2023-09-12T18:38:41.004+03:00”,“@version”:“1”,“message”:“Application run failed”,“logger_name”:“org.springframework.boot.SpringApplication”,“thread_name”:“main”,“level”:“ERROR”,“level_value”:40000,“stack_trace”:“org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [io.mosip.kernel.ridgenerator.RidGeneratorBootApplication]; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder ‘mosip.auth.adapter.impl.basepackage’ in value "${mosip.auth.adapter.impl.basepackage}"\r\n\tat org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:184)\r\n\tat org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:316)\r\n\tat org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:233)\r\n\tat org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:273)\r\n\tat org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:93)\r\n\tat org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:694)\r\n\tat org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532)\r\n\tat org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)\r\n\tat org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)\r\n\tat org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395)\r\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:327)\r\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1255)\r\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1243)\r\n\tat io.mosip.kernel.ridgenerator.RidGeneratorBootApplication.main(RidGeneratorBootApplication.java:22)\r\nCaused by: java.lang.IllegalArgumentException: Could not resolve placeholder ‘mosip.auth.adapter.impl.basepackage’ in value "${mosip.auth.adapter.impl.basepackage}"\r\n\tat org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:172)\r\n\tat org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:124)\r\n\tat org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:237)\r\n\tat org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders(AbstractPropertyResolver.java:211)\r\n\tat org.springframework.core.env.AbstractEnvironment.resolveRequiredPlaceholders(AbstractEnvironment.java:567)\r\n\tat org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.resolveBasePackage(ClassPathScanningCandidateComponentProvider.java:481)\r\n\tat org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.scanCandidateComponents(ClassPathScanningCandidateComponentProvider.java:420)\r\n\tat org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:316)\r\n\tat org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:275)\r\n\tat org.springframework.context.annotation.ComponentScanAnnotationParser.parse(ComponentScanAnnotationParser.java:132)\r\n\tat org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:288)\r\n\tat org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:245)\r\n\tat org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:202)\r\n\tat org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:170)\r\n\t… 13 common frames omitted\r\n”,“appName”:“kernel-ridgenerator-service”}
Kindly help me out.

Hello Team,
Following the commons developer guide, I am supposed to add Auth adapter jar as an external jar file to the class libraries.
which specific package/packages am I supposed to add it to? its not indicated on the developer guide.

could it the reason as to why I am unable to resolve mosip.auth.adapter.impl.basepackage=io.mosip.kernel.auth.defaultadapter as its set properties files?

Kindly guide me through.

Hey @Rukumbyana

We will check the error logs shared by you while running the config-server develop2-v2 branch to guide you through the right steps.

Best Regards,
Team MOSIP

Hey @Rukumbyana

Can you change the value in bootstap as below and try again ?

spring.cloud.config.url=http://localhost:51000/config

Hello @vishwa
I did as directed but i am still getting the same error message.

It complains how it can’t relsolve ${mosip.auth.adapter.impl.basepackage} in the application’s configuration.

Any more guide is highly appreciated.
Thanks inadvance.

1 Like

@Rukumbyana Can you post the latest logs after the config url change ?

Want to specifically check if the below error still exist

{“@timestamp”:“2023-09-12T18:38:40.823+03:00”,“@version”:“1”,“message”:“Could not locate PropertySource: Invalid URL: localhost”,“logger_name”:“org.springframework.cloud.config.client.ConfigServicePropertySourceLocator”,“thread_name”:“main”,“level”:“WARN”,“level_value”:30000,“appName”:“kernel-ridgenerator-service”}
1 Like