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