Error Setting up Pre-registration module for the V3 1.2.0.1.B3 MOSIP Deployment

2023-08-27 17:50:31,039 [main] INFO [i.m.k.l.l.i.Slf4jLoggerImpl].info.32 : sessionId - idType - id - In applicationStartedEvent method of ApplicationEventListerner demographic Service setup() method is called

Sun, Aug 27 2023 8:50:31 pm2023-08-27 17:50:31,060 [main] INFO [i.m.k.l.l.i.Slf4jLoggerImpl].info.57 : getAllDocCategoriesAndTypes url: http://masterdata.kernel/v1/masterdata/validdocuments/all?pageSize=50

Sun, Aug 27 2023 8:50:32 pm2023-08-27 17:50:32,909 [main] INFO [o.s.b.a.l.ConditionEvaluationReportLoggingListener].logAutoConfigurationReport.101 :

Sun, Aug 27 2023 8:50:32 pm

Sun, Aug 27 2023 8:50:32 pmError starting ApplicationContext. To display the conditions report re-run your application with ā€˜debugā€™ enabled.

Sun, Aug 27 2023 8:50:32 pm2023-08-27 17:50:32,918 [main] ERROR [o.s.b.SpringApplication].reportFailure.842 : Application run failed

Sun, Aug 27 2023 8:50:32 pmio.mosip.preregistration.core.exception.MasterDataNotAvailableException: KER-MSD-016 ā†’ Valid document not found

Sun, Aug 27 2023 8:50:32 pm at io.mosip.preregistration.core.util.ValidationUtil.getAllDocCategoriesAndTypes(ValidationUtil.java:340)

Sun, Aug 27 2023 8:50:32 pm at io.mosip.preregistration.application.service.DocumentService.setup(DocumentService.java:187)

Sun, Aug 27 2023 8:50:32 pm at io.mosip.preregistration.application.service.DocumentService$$FastClassBySpringCGLIB$$22bc9d53.invoke()

Sun, Aug 27 2023 8:50:32 pm at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)

Sun, Aug 27 2023 8:50:32 pm at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:684)

Sun, Aug 27 2023 8:50:32 pm at io.mosip.preregistration.application.service.DocumentService$$EnhancerBySpringCGLIB$$5d105527.setup()

Sun, Aug 27 2023 8:50:32 pm at io.mosip.preregistration.application.config.ApplicationEventListerner.applicationStartedEvent(ApplicationEventListerner.java:36)

Sun, Aug 27 2023 8:50:32 pm at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Sun, Aug 27 2023 8:50:32 pm at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

Sun, Aug 27 2023 8:50:32 pm at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

Sun, Aug 27 2023 8:50:32 pm at java.base/java.lang.reflect.Method.invoke(Method.java:566)

Sun, Aug 27 2023 8:50:32 pm at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:261)

Sun, Aug 27 2023 8:50:32 pm at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:180)

Sun, Aug 27 2023 8:50:32 pm at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:142)

Sun, Aug 27 2023 8:50:32 pm at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)

Sun, Aug 27 2023 8:50:32 pm at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)

Sun, Aug 27 2023 8:50:32 pm at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)

Sun, Aug 27 2023 8:50:32 pm at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:400)

Sun, Aug 27 2023 8:50:32 pm at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:354)

Sun, Aug 27 2023 8:50:32 pm at org.springframework.boot.context.event.EventPublishingRunListener.started(EventPublishingRunListener.java:97)

Sun, Aug 27 2023 8:50:32 pm at org.springframework.boot.SpringApplicationRunListeners.started(SpringApplicationRunListeners.java:72)

Sun, Aug 27 2023 8:50:32 pm at org.springframework.boot.SpringApplication.run(SpringApplication.java:334)

Sun, Aug 27 2023 8:50:32 pm at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255)

Sun, Aug 27 2023 8:50:32 pm at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243)

Sun, Aug 27 2023 8:50:32 pm at io.mosip.preregistration.application.PreRegistrationApplication.main(PreRegistrationApplication.java:23)

Sun, Aug 27 2023 8:50:32 pm at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Sun, Aug 27 2023 8:50:32 pm at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

Sun, Aug 27 2023 8:50:32 pm at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

Sun, Aug 27 2023 8:50:32 pm at java.base/java.lang.reflect.Method.invoke(Method.java:566)

Sun, Aug 27 2023 8:50:32 pm at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)

Sun, Aug 27 2023 8:50:32 pm at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)

Sun, Aug 27 2023 8:50:32 pm at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)

Sun, Aug 27 2023 8:50:32 pm at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:467)

Sun, Aug 27 2023 8:50:32 pm2023-08-27 17:50:32,920 [main] INFO [o.s.c.s.AbstractApplicationContext].doClose.993 : Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@3d526ad9: startup date [Sun Aug 27 17:49:46 UTC 2023]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@4681c175

Sun, Aug 27 2023 8:50:32 pm2023-08-27 17:50:32,930 [main] INFO [o.s.j.e.MBeanExporter].destroy.451 : Unregistering JMX-exposed beans on shutdown

Sun, Aug 27 2023 8:50:32 pm2023-08-27 17:50:32,931 [main] INFO [o.s.j.s.MBeanRegistrationSupport].unregisterBeans.183 : Unregistering JMX-exposed beans

Sun, Aug 27 2023 8:50:32 pm2023-08-27 17:50:32,951 [main] INFO [o.s.o.j.AbstractEntityManagerFactoryBean].destroy.597 : Closing JPA EntityManagerFactory for persistence unit ā€˜hibernateā€™

Sun, Aug 27 2023 8:50:32 pm2023-08-27 17:50:32,954 [main] INFO [c.z.h.HikariDataSource].close.381 : HikariPool-1 - Shutdown initiatedā€¦

Sun, Aug 27 2023 8:50:32 pm2023-08-27 17:50:32,961 [main] INFO [c.z.h.HikariDataSource].close.383 : HikariPool-1 - Shutdown completed.

1 Like

Hi @Al_Kay

I have asked one of my team member to look into the logs shared by you and guide you with a solution.

Best Regards,
Team MOSIP

Hi @Al_Kay

we get ā€˜MasterDataNotAvailableException: KER-MSD-016ā€™ if Pre-reg is not connected to Masterdata. Please do the setup of Masterdata, Admin and add relevant documents data through Admin UI and then run Pre-reg services.

Pre-reg services developers guide

Admin services developers guide

Masterdata Guide

Best Regards,
Aiham
MOSIP Team

Hi @Al_Kay

Can you please check if relevant template is added for notifications in
postgres master.template table as Pre-reg requires notification templates.

Pre-reg notification templates template_typ_code:
Email-Acknowledgement
Acknowledgement-email-subject
SMS-Acknowledgement
cancel-appointment
cancel-appointment-email-subject

Best regards,
Aiham
Team MOSIP

Hi @Al_Kay

  1. To get otp in email:
  1. To enable captcha please update mosip.preregistration.captcha.enable=true in Mosip-config pre-reg default properties .
    please update relevant captcha services property in Pre-reg default property line no. 378.

Best regards,
Aiham
Team MOSIP

1 Like

Hi @Al_Kay

In the above steps provided by @aihamh, you can find the configurations in this GitHub repo - https://github.com/mosip/mosip-config/blob/release-1.2.0/pre-registration-default.properties

FYR- Configurations - MOSIP Docs 1.2.0

If this is not what you are looking for please do let us know, we will guide you further with the issue.

Best Regards,
Team MOSIP

Hi @Al_Kay ,

Please fork the mosip-config repo and edit the config and then run it. please use config release branch.
Module Configuration - MOSIP Docs Develop

Best Regards,
Aiham
Team MOSIP

2 Likes