Prereg-application Error (MOSIP v1.2..0.1-B1)

Hello,
I tried all the possible fixes but not yet, now i have an error in prereg-application
Here is the log file:

2023-04-03 08:13:09,347 [main] INFO [i.m.k.l.l.i.Slf4jLoggerImpl].info.32 : sessionId - idType - id - In applicationStartedEvent method of ApplicationEventListerner login service setupLoginService method called
2023-04-03 08:13:09,351 [main] INFO [i.m.k.l.l.i.Slf4jLoggerImpl].info.32 : sessionId - idType - id - URL in demographic service util of getJson http://config-server.config-server.svc.cluster.local/config/pre-registration/default/1.2.0.1-v3/identity-mapping.json
2023-04-03 08:13:09,379 [main] INFO [i.m.k.l.l.i.Slf4jLoggerImpl].info.52 : Fetched the identity json from config server{
“identity”: {
“IDSchemaVersion”: {
“value”: “IDSchemaVersion”
},
“name”: {
“value”: “fullName”
},
“gender”: {
“value”: “gender”
},
“dob”: {
“value”: “dateOfBirth”
},
“age”: {
“value”: “age”
},
“introducerRID”: {
“value”: “introducerRID”
},
“introducerUIN”: {
“value”: “introducerUIN”
},
“introducerVID”: {
“value”: “introducerVID”
},
“introducerName”: {
“value”: “introducerName”
},
“phone”: {
“value”: “phone”
},
“phoneNumber”: {
“value”: “phone”
},
“email”: {
“value”: “email”
},
“emailId”: {
“value”: “email”
},
“uin”: {
“value”: “UIN”
},
“individualBiometrics”: {
“value”: “individualBiometrics”
},
“introducerBiometrics”: {
“value”: “introducerBiometrics”
},
“individualAuthBiometrics”: {
“value”: “individualAuthBiometrics”
},
“officerBiometricFileName”: {
“value”: “officerBiometricFileName”
},
“supervisorBiometricFileName”: {
“value”: “supervisorBiometricFileName”
},
“residenceStatus”: {
“value”: “residenceStatus”
},
“preferredLanguage”: {
“value”: “preferredLang”
},
“locationHierarchyForProfiling”: {
“value”: “zone,postalCode”
},
“addressLine1”: {
“value”: “addressLine1”
},
“addressLine2”: {
“value”: “addressLine2”
},
“addressLine3”: {
“value”: “addressLine3”
},
“location1”: {
“value”: “city”
},
“location2”: {
“value”: “region”
},
“location3”: {
“value”: “province”
},
“postalCode”: {
“value”: “postalCode”
},
“location4”: {
“value”: “zone”
},
“fullAddress”: {
“value”: “addressLine1,addressLine2,addressLine3,city,region,province,postalCode”
}
},
“metaInfo”: {
“value”: “metaInfo”
},
“audits”: {
“value”: “audits”
},
“documents”: {
“poa”: {
“value”: “proofOfAddress”
},
“poi”: {
“value”: “proofOfIdentity”
},
“por”: {
“value”: “proofOfRelationship”
},
“pob”: {
“value”: “proofOfDateOfBirth”
},
“poe”: {
“value”: “proofOfException”
}
}
}

2023-04-03 08:13:09,379 [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
2023-04-03 08:13:09,391 [main] INFO [i.m.k.l.l.i.Slf4jLoggerImpl].info.57 : getAllDocCategoriesAndTypes url: http://masterdata.kernel/v1/masterdata/validdocuments/all?pageSize=50
2023-04-03 08:13:09,482 [main] INFO [o.s.b.a.l.ConditionEvaluationReportLoggingListener].logAutoConfigurationReport.101 :

Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
2023-04-03 08:13:09,488 [main] ERROR [o.s.b.SpringApplication].reportFailure.842 : Application run failed
io.mosip.preregistration.core.exception.MasterDataNotAvailableException: KER-MSD-016 → Valid document not found
at io.mosip.preregistration.core.util.ValidationUtil.getAllDocCategoriesAndTypes(ValidationUtil.java:340)
at io.mosip.preregistration.application.service.DocumentService.setup(DocumentService.java:187)
at io.mosip.preregistration.application.service.DocumentService$$FastClassBySpringCGLIB$$22bc9d53.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:684)
at io.mosip.preregistration.application.service.DocumentService$$EnhancerBySpringCGLIB$$232ad180.setup()
at io.mosip.preregistration.application.config.ApplicationEventListerner.applicationStartedEvent(ApplicationEventListerner.java:36)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:261)
at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:180)
at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:142)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:400)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:354)
at org.springframework.boot.context.event.EventPublishingRunListener.started(EventPublishingRunListener.java:97)
at org.springframework.boot.SpringApplicationRunListeners.started(SpringApplicationRunListeners.java:72)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:334)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243)
at io.mosip.preregistration.application.PreRegistrationApplication.main(PreRegistrationApplication.java:23)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:467)
2023-04-03 08:13:09,489 [main] INFO [o.s.c.s.AbstractApplicationContext].doClose.993 : Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@515f4131: startup date [Mon Apr 03 08:12:19 UTC 2023]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@5884a914
2023-04-03 08:13:09,495 [main] INFO [o.s.j.e.MBeanExporter].destroy.451 : Unregistering JMX-exposed beans on shutdown
2023-04-03 08:13:09,496 [main] INFO [o.s.j.s.MBeanRegistrationSupport].unregisterBeans.183 : Unregistering JMX-exposed beans
2023-04-03 08:13:09,554 [main] INFO [o.s.o.j.AbstractEntityManagerFactoryBean].destroy.597 : Closing JPA EntityManagerFactory for persistence unit ‘hibernate’
2023-04-03 08:13:09,557 [main] INFO [c.z.h.HikariDataSource].close.381 : HikariPool-1 - Shutdown initiated…
2023-04-03 08:13:09,560 [main] INFO [c.z.h.HikariDataSource].close.383 : HikariPool-1 - Shutdown completed.

@slimab The error is from the master data. The pre-reg is calling the API to get list of valid documents. If you login to our admin portal you should see the list of valid documents.

Hello,
the database was not initializing correctly, we don’t have any tables in database, any process to update (create database table).

Thanks

can you please provide the logs of postgres-init and masterdata-loader?

I redeploy and i find the table, but there is no data

Hi Slimab,
Please try to login into admin module and add the doctype details so that it will be added in the DB and appear in pre-reg when you try to create an application. Thanks