Error NullPointerExecption-Kernel-Keygen installation

Hi team,

I am installing mosip-infra V1.2.0.2 and and below image in keygen_values.yaml

image:
registry: docker.io
repository: mosipid/keys-generator
tag: 1.2.0.1

I have been getting the NullPointerException error for the kernel-keygen pod. I even tried with other image tag 1.2.0.1-B2, 1.2,0, but hitting the same error.

Here is the snippet of error log and any guidance or support would be of a great help.

:: Spring Boot :: (v2.0.2.RELEASE)

{“@timestamp”:“2025-12-23T05:03:38.926Z”,“@version”:“1”,“message”:“Fetching config from server at : http://config-server.config-server/config",“logger_name”:“org.springframework.cloud.config.client.ConfigServicePropertySourceLocator”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:"kernel”}
{“@timestamp”:“2025-12-23T05:03:39.378Z”,“@version”:“1”,“message”:“Could not locate PropertySource: label not found”,“logger_name”:“org.springframework.cloud.config.client.ConfigServicePropertySourceLocator”,“thread_name”:“main”,“level”:“WARN”,“level_value”:30000,“appName”:“kernel”}
{“@timestamp”:“2025-12-23T05:03:39.381Z”,“@version”:“1”,“message”:“The following profiles are active: default”,“logger_name”:“io.mosip.kernel.keygenerator.KeysGeneratorApplication”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“kernel”}
{“@timestamp”:“2025-12-23T05:03:39.381Z”,“@version”:“1”,“message”:“Loading source class io.mosip.kernel.keygenerator.KeysGeneratorApplication”,“logger_name”:“org.springframework.boot.SpringApplication”,“thread_name”:“main”,“level”:“DEBUG”,“level_value”:10000,“appName”:“kernel”}
{“@timestamp”:“2025-12-23T05:03:39.389Z”,“@version”:“1”,“message”:“Activated activeProfiles default”,“logger_name”:“org.springframework.boot.context.config.ConfigFileApplicationListener”,“thread_name”:“main”,“level”:“DEBUG”,“level_value”:10000,“appName”:“kernel”}
{“@timestamp”:“2025-12-23T05:03:39.390Z”,“@version”:“1”,“message”:“Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@4201c465: startup date [Tue Dec 23 05:03:39 UTC 2025]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@36bc55de”,“logger_name”:“org.springframework.context.annotation.AnnotationConfigApplicationContext”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“kernel”}
{“@timestamp”:“2025-12-23T05:03:39.881Z”,“@version”:“1”,“message”:“BeanFactory id=4ee82794-5ee7-385f-863d-b89ac0541c96”,“logger_name”:“org.springframework.cloud.context.scope.GenericScope”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“kernel”}
{“@timestamp”:“2025-12-23T05:03:40.051Z”,“@version”:“1”,“message”:“Bean ‘org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration’ of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$ab2e12e7] 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”}
{“@timestamp”:“2025-12-23T05:03:40.069Z”,“@version”:“1”,“message”:“Bean ‘org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration’ of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$c74815e4] 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”}
{“@timestamp”:“2025-12-23T05:03:40.088Z”,“@version”:“1”,“message”:“Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘keymanagerEntityManagerFactory’ defined in class path resource [io/mosip/kernel/keymanagerservice/config/KeymanagerDaoConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]: Factory method ‘keymanagerEntityManagerFactory’ threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘keymanagerDataSource’ defined in class path resource [io/mosip/kernel/keymanagerservice/config/KeymanagerDaoConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method ‘keymanagerDataSource’ threw exception; nested exception is java.lang.NullPointerException”,“logger_name”:“org.springframework.context.annotation.AnnotationConfigApplicationContext”,“thread_name”:“main”,“level”:“WARN”,“level_value”:30000,“appName”:“kernel”}

I tried adding the required JDBC properties in the kernel-default.properties to tackle the keymanagerdatasource NPE issue , but again encountered another NPE issue related to JPA. The class keymanagerDaoConfig is expecting various properties which i am unable to bypass or sort them explicitly.

Is there any patched key-generator image or can you suggest the right key-generator image tag to avoid all these NPE issues?

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.

Hello @Ranjan_mosip

Please accept our apologies for the delayed response. Thank you for reaching out—please allow us some time to respond with a solution.

Regards

Likhitha
on behalf of MOSIP team