Pre Registration

Hello everyone,
I have clone both the pre-registration UI and the backend to run them locally. The UI seem to work I am able to reach it in the browser, although all component doesn’t show but unfortunately for me the backend isn’t able to connect to the uri specified in the application properties as shown here: spring.cloud.config.uri=https://dev.mosip.net/config

I am new to the system, I would be very glad if anyone would help me out.

Thanks in advance.

1 Like

Hi,

Please run config server mosip-config in local and update the config property to the local server port which it is running on.
ex : spring.cloud.config.uri=https:// localhost:8080.

we can also deploy mosip-config in server and point it to mosip-config server url.
ex : spring.cloud.config.uri=https://dev.mosip.net/config (change this url to your config server url)

Thanks

Thanks, it worked. But I am geting this new error when I run the preReg app:

Could not resolve placeholder ‘mosip.lang.traslate.adapter.impl.basepackage’ in value “${mosip.lang.traslate.adapter.impl.basepackage}”

Please, when running pre-Registration backend locally, which branch do I clone from. Do I have to use develop, master or version 1.1.2

I will gladly appreciate your help.

Hello

You can use the released branch code for your testing. So whichever version you want to test you should clone and not “develop”.

~ Mayura

1 Like

Hello

You are missing runtime dependencies.
Download runtime dependencies of
“kernel-auth-adapter-x.x.x.jar”,
“kernel-ref-idobjectvalidator-x.x.x.jar”,
“kernel-transliteration-icu4j-x.x.x.jar”,
“kernel-virusscanner-clamav-x.x.x.jar” from maven.
Add all above as runtime dependencies to pre-registration-application-service.
All other Prereg services will need “kernel-auth-adapter-x.x.x.jar”.

Hope this helps.
Mayura

1 Like

Hello, Thanks a lot for your feedback. I have tried the steps, but the pre-registration app is still not starting. Attached is a screenshot of the console log.

I will appreciate if anyone would help me over a zoom or google meet call to set up the pre-registration app. I am sure I may be missing something small, but at this point I am unable to tell.

I will appreciate all the help I can get. Thanks.

#general #pre-registration #support @aihamh @mayuradesh

Hello

Config server values should be set correctly in bootstrap.

Sample values:
spring.cloud.config.uri=https://localhost:8080
spring.cloud.config.label=develop
spring.cloud.config.name=pre-registration
spring.application.name=pre-registration-application-service
spring.profiles.active=mz

Hope this helps!
Mayura

1 Like

Thank you. I have tried with the sample, I am still getting “label not found” error

Sample values are just example values and will not work in your env.
Depending on how you have set up the config server, these are to be added.

Some links for reference

1 Like

Hello, Thank you for the help so far. I think I have made a bit of progress, but it’s still not starting.
Below is the screenshot of the error I am getting.

Hi
Can you please share full logs ? Thanks
~ Mayura

tytion-application-service: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:3.0.6:repackage failed: Unable to find main class
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:347)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:330)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:175)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:76)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:163)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:160)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:827)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:272)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:195)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:3.0.6:repackage failed: Unable to find main class
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:133)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:342)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:330)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:175)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:76)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:163)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:160)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:827)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:272)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:195)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: java.lang.IllegalStateException: Unable to find main class
    at org.springframework.util.Assert.state (Assert.java:76)
    at org.springframework.boot.loader.tools.Packager.addMainAndStartAttributes (Packager.java:303)
    at org.springframework.boot.loader.tools.Packager.buildManifest (Packager.java:285)
    at org.springframework.boot.loader.tools.Packager.write (Packager.java:201)
    at org.springframework.boot.loader.tools.Packager.write (Packager.java:194)
    at org.springframework.boot.loader.tools.Repackager.repackage (Repackager.java:132)
    at org.springframework.boot.loader.tools.Repackager.repackage (Repackager.java:119)
    at org.springframework.boot.maven.RepackageMojo.repackage (RepackageMojo.java:216)
    at org.springframework.boot.maven.RepackageMojo.execute (RepackageMojo.java:206)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:342)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:330)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:175)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:76)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:163)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:160)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:827)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:272)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:195)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)pe or paste code here

It’s complaining of a failed plugin
@mayuradesh

Please run “mvn clean install -Dgpg.skip” at the parent “pre-registration” folder. After that same you can run at “pre-registration-application-service” folder too. I think code is not getting built properly.

1 Like

Thanks, I had to reclone the project and follow the documentation link you shared and I was able to build successfully. But now when I start the pre-registration-application-service, I get this error:

{"@timestamp":"2023-05-04T15:55:26.939+02:00","@version":"1","message":"Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@4e91d63f: startup date [Thu May 04 15:55:26 CEST 2023]; root of context hierarchy","logger_name":"org.springframework.context.annotation.AnnotationConfigApplicationContext","thread_name":"main","level":"INFO","level_value":20000,"appName":"pre-registration-application-service"}
{"@timestamp":"2023-05-04T15:55:27.570+02:00","@version":"1","message":"Application run failed","logger_name":"org.springframework.boot.SpringApplication","thread_name":"main","level":"ERROR","level_value":40000,"stack_trace":"java.lang.IllegalStateException: Cannot load configuration class: org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration\n\tat org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:414)\n\tat org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanFactory(ConfigurationClassPostProcessor.java:254)\n\tat org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:284)\n\tat org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:128)\n\tat org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:694)\n\tat org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532)\n\tat org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)\n\tat org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:327)\n\tat org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:137)\n\tat org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:197)\n\tat org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:104)\n\tat org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:70)\n\tat org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)\n\tat org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)\n\tat org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)\n\tat org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)\n\tat org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:74)\n\tat org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54)\n\tat org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:358)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:317)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1255)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1243)\n\tat io.mosip.preregistration.application.PreRegistrationApplication.main(PreRegistrationApplication.java:23)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)\n\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:568)\n\tat org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)\n\tat org.springframework.boot.loader.Launcher.launch(Launcher.java:95)\n\tat org.springframework.boot.loader.Launcher.launch(Launcher.java:58)\n\tat org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:466)\nCaused by: java.lang.ExceptionInInitializerError: null\n\tat org.springframework.context.annotation.ConfigurationClassEnhancer.newEnhancer(ConfigurationClassEnhancer.java:122)\n\tat org.springframework.context.annotation.ConfigurationClassEnhancer.enhance(ConfigurationClassEnhancer.java:110)\n\tat org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:403)\n\t... 31 common frames omitted\nCaused by: org.springframework.cglib.core.CodeGenerationException: java.lang.reflect.InaccessibleObjectException-->Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not \"opens java.lang\" to unnamed module @e320068\n\tat org.springframework.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:464)\n\tat org.springframework.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:336)\n\tat org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:93)\n\tat org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:91)\n\tat org.springframework.cglib.core.internal.LoadingCache$2.call(LoadingCache.java:54)\n\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\n\tat org.springframework.cglib.core.internal.LoadingCache.createEntry(LoadingCache.java:61)\n\tat org.springframework.cglib.core.internal.LoadingCache.get(LoadingCache.java:34)\n\tat org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:116)\n\tat org.springframework.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:291)\n\tat org.springframework.cglib.core.KeyFactory$Generator.create(KeyFactory.java:221)\n\tat org.springframework.cglib.core.KeyFactory.create(KeyFactory.java:174)\n\tat org.springframework.cglib.core.KeyFactory.create(KeyFactory.java:153)\n\tat org.springframework.cglib.proxy.Enhancer.<clinit>(Enhancer.java:73)\n\t... 34 common frames omitted\nCaused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not \"opens java.lang\" to unnamed module @e320068\n\tat java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)\n\tat java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)\n\tat java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)\n\tat java.base/java.lang.reflect.Method.setAccessible(Method.java:193)\n\tat org.springframework.cglib.core.ReflectUtils$1.run(ReflectUtils.java:61)\n\tat java.base/java.security.AccessController.doPrivileged(AccessController.java:569)\n\tat org.springframework.cglib.core.ReflectUtils.<clinit>(ReflectUtils.java:52)\n\tat org.springframework.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:243)\n\tat org.springframework.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)\n\tat org.springframework.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:329)\n\t... 46 common frames omitted\n","appName":"pre-registration-application-service"}
{"@timestamp":"2023-05-04T15:55:27.574+02:00","@version":"1","message":"Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@4e91d63f: startup date [Thu May 04 15:55:26 CEST 2023]; root of context hierarchy","logger_name":"org.springframework.context.annotation.AnnotationConfigApplicationContext","thread_name":"main","level":"INFO","level_value":20000,"appName":"pre-registration-application-service"}
{"@timestamp":"2023-05-04T15:55:27.932+02:00","@version":"1","message":"Application run failed","logger_name":"org.springframework.boot.SpringApplication","thread_name":"main","level":"ERROR","level_value":40000,"stack_trace":"java.lang.IllegalStateException: Cannot load configuration class: org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration\n\tat org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:414)\n\tat org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanFactory(ConfigurationClassPostProcessor.java:254)\n\tat org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:284)\n\tat org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:128)\n\tat org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:694)\n\tat org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532)\n\tat org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)\n\tat org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:327)\n\tat org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:137)\n\tat org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:197)\n\tat org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:104)\n\tat org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:70)\n\tat org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)\n\tat org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)\n\tat org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)\n\tat org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)\n\tat org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:74)\n\tat org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54)\n\tat org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:358)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:317)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1255)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1243)\n\tat io.mosip.preregistration.application.PreRegistrationApplication.main(PreRegistrationApplication.java:23)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)\n\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:568)\n\tat org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)\n\tat org.springframework.boot.loader.Launcher.launch(Launcher.java:95)\n\tat org.springframework.boot.loader.Launcher.launch(Launcher.java:58)\n\tat org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:466)\nCaused by: java.lang.ExceptionInInitializerError: null\n\tat org.springframework.context.annotation.ConfigurationClassEnhancer.newEnhancer(ConfigurationClassEnhancer.java:122)\n\tat org.springframework.context.annotation.ConfigurationClassEnhancer.enhance(ConfigurationClassEnhancer.java:110)\n\tat org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:403)\n\t... 31 common frames omitted\nCaused by: org.springframework.cglib.core.CodeGenerationException: java.lang.reflect.InaccessibleObjectException-->Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not \"opens java.lang\" to unnamed module @e320068\n\tat org.springframework.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:464)\n\tat org.springframework.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:336)\n\tat org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:93)\n\tat org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:91)\n\tat org.springframework.cglib.core.internal.LoadingCache$2.call(LoadingCache.java:54)\n\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\n\tat org.springframework.cglib.core.internal.LoadingCache.createEntry(LoadingCache.java:61)\n\tat org.springframework.cglib.core.internal.LoadingCache.get(LoadingCache.java:34)\n\tat org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:116)\n\tat org.springframework.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:291)\n\tat org.springframework.cglib.core.KeyFactory$Generator.create(KeyFactory.java:221)\n\tat org.springframework.cglib.core.KeyFactory.create(KeyFactory.java:174)\n\tat org.springframework.cglib.core.KeyFactory.create(KeyFactory.java:153)\n\tat org.springframework.cglib.proxy.Enhancer.<clinit>(Enhancer.java:73)\n\t... 34 common frames omitted\nCaused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not \"opens java.lang\" to unnamed module @e320068\n\tat java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)\n\tat java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)\n\tat java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)\n\tat java.base/java.lang.reflect.Method.setAccessible(Method.java:193)\n\tat org.springframework.cglib.core.ReflectUtils$1.run(ReflectUtils.java:61)\n\tat java.base/java.security.AccessController.doPrivileged(AccessController.java:569)\n\tat org.springframework.cglib.core.ReflectUtils.<clinit>(ReflectUtils.java:52)\n\tat org.springframework.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:243)\n\tat org.springframework.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)\n\tat org.springframework.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:329)\n\t... 46 common frames omitted\n","appName":"pre-registration-application-service"}

@mayuradesh

Thank you. I had to re-clone the app and rebuild the whole project following the documentation link you shared last time: But when try to run the jar for the pre-registration-application-service, I get the error below:

{"@timestamp":"2023-05-04T15:55:26.939+02:00","@version":"1","message":"Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@4e91d63f: startup date [Thu May 04 15:55:26 CEST 2023]; root of context hierarchy","logger_name":"org.springframework.context.annotation.AnnotationConfigApplicationContext","thread_name":"main","level":"INFO","level_value":20000,"appName":"pre-registration-application-service"}
{"@timestamp":"2023-05-04T15:55:27.570+02:00","@version":"1","message":"Application run failed","logger_name":"org.springframework.boot.SpringApplication","thread_name":"main","level":"ERROR","level_value":40000,"stack_trace":"java.lang.IllegalStateException: Cannot load configuration class: org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration\n\tat org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:414)\n\tat org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanFactory(ConfigurationClassPostProcessor.java:254)\n\tat org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:284)\n\tat org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:128)\n\tat org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:694)\n\tat org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532)\n\tat org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)\n\tat org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:327)\n\tat org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:137)\n\tat org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:197)\n\tat org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:104)\n\tat org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:70)\n\tat org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)\n\tat org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)\n\tat org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)\n\tat org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)\n\tat org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:74)\n\tat org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54)\n\tat org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:358)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:317)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1255)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1243)\n\tat io.mosip.preregistration.application.PreRegistrationApplication.main(PreRegistrationApplication.java:23)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)\n\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:568)\n\tat org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)\n\tat org.springframework.boot.loader.Launcher.launch(Launcher.java:95)\n\tat org.springframework.boot.loader.Launcher.launch(Launcher.java:58)\n\tat org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:466)\nCaused by: java.lang.ExceptionInInitializerError: null\n\tat org.springframework.context.annotation.ConfigurationClassEnhancer.newEnhancer(ConfigurationClassEnhancer.java:122)\n\tat org.springframework.context.annotation.ConfigurationClassEnhancer.enhance(ConfigurationClassEnhancer.java:110)\n\tat org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:403)\n\t... 31 common frames omitted\nCaused by: org.springframework.cglib.core.CodeGenerationException: java.lang.reflect.InaccessibleObjectException-->Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not \"opens java.lang\" to unnamed module @e320068\n\tat org.springframework.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:464)\n\tat org.springframework.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:336)\n\tat org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:93)\n\tat org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:91)\n\tat org.springframework.cglib.core.internal.LoadingCache$2.call(LoadingCache.java:54)\n\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\n\tat org.springframework.cglib.core.internal.LoadingCache.createEntry(LoadingCache.java:61)\n\tat org.springframework.cglib.core.internal.LoadingCache.get(LoadingCache.java:34)\n\tat org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:116)\n\tat org.springframework.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:291)\n\tat org.springframework.cglib.core.KeyFactory$Generator.create(KeyFactory.java:221)\n\tat org.springframework.cglib.core.KeyFactory.create(KeyFactory.java:174)\n\tat org.springframework.cglib.core.KeyFactory.create(KeyFactory.java:153)\n\tat org.springframework.cglib.proxy.Enhancer.<clinit>(Enhancer.java:73)\n\t... 34 common frames omitted\nCaused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not \"opens java.lang\" to unnamed module @e320068\n\tat java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)\n\tat java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)\n\tat java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)\n\tat java.base/java.lang.reflect.Method.setAccessible(Method.java:193)\n\tat org.springframework.cglib.core.ReflectUtils$1.run(ReflectUtils.java:61)\n\tat java.base/java.security.AccessController.doPrivileged(AccessController.java:569)\n\tat org.springframework.cglib.core.ReflectUtils.<clinit>(ReflectUtils.java:52)\n\tat org.springframework.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:243)\n\tat org.springframework.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)\n\tat org.springframework.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:329)\n\t... 46 common frames omitted\n","appName":"pre-registration-application-service"}
{"@timestamp":"2023-05-04T15:55:27.574+02:00","@version":"1","message":"Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@4e91d63f: startup date [Thu May 04 15:55:26 CEST 2023]; root of context hierarchy","logger_name":"org.springframework.context.annotation.AnnotationConfigApplicationContext","thread_name":"main","level":"INFO","level_value":20000,"appName":"pre-registration-application-service"}
{"@timestamp":"2023-05-04T15:55:27.932+02:00","@version":"1","message":"Application run failed","logger_name":"org.springframework.boot.SpringApplication","thread_name":"main","level":"ERROR","level_value":40000,"stack_trace":"java.lang.IllegalStateException: Cannot load configuration class: org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration\n\tat org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:414)\n\tat org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanFactory(ConfigurationClassPostProcessor.java:254)\n\tat org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:284)\n\tat org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:128)\n\tat org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:694)\n\tat org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532)\n\tat org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)\n\tat org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:327)\n\tat org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:137)\n\tat org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:197)\n\tat org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:104)\n\tat org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:70)\n\tat org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)\n\tat org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)\n\tat org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)\n\tat org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)\n\tat org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:74)\n\tat org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54)\n\tat org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:358)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:317)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1255)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1243)\n\tat io.mosip.preregistration.application.PreRegistrationApplication.main(PreRegistrationApplication.java:23)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)\n\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:568)\n\tat org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)\n\tat org.springframework.boot.loader.Launcher.launch(Launcher.java:95)\n\tat org.springframework.boot.loader.Launcher.launch(Launcher.java:58)\n\tat org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:466)\nCaused by: java.lang.ExceptionInInitializerError: null\n\tat org.springframework.context.annotation.ConfigurationClassEnhancer.newEnhancer(ConfigurationClassEnhancer.java:122)\n\tat org.springframework.context.annotation.ConfigurationClassEnhancer.enhance(ConfigurationClassEnhancer.java:110)\n\tat org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:403)\n\t... 31 common frames omitted\nCaused by: org.springframework.cglib.core.CodeGenerationException: java.lang.reflect.InaccessibleObjectException-->Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not \"opens java.lang\" to unnamed module @e320068\n\tat org.springframework.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:464)\n\tat org.springframework.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:336)\n\tat org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:93)\n\tat org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:91)\n\tat org.springframework.cglib.core.internal.LoadingCache$2.call(LoadingCache.java:54)\n\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\n\tat org.springframework.cglib.core.internal.LoadingCache.createEntry(LoadingCache.java:61)\n\tat org.springframework.cglib.core.internal.LoadingCache.get(LoadingCache.java:34)\n\tat org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:116)\n\tat org.springframework.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:291)\n\tat org.springframework.cglib.core.KeyFactory$Generator.create(KeyFactory.java:221)\n\tat org.springframework.cglib.core.KeyFactory.create(KeyFactory.java:174)\n\tat org.springframework.cglib.core.KeyFactory.create(KeyFactory.java:153)\n\tat org.springframework.cglib.proxy.Enhancer.<clinit>(Enhancer.java:73)\n\t... 34 common frames omitted\nCaused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not \"opens java.lang\" to unnamed module @e320068\n\tat java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)\n\tat java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)\n\tat java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)\n\tat java.base/java.lang.reflect.Method.setAccessible(Method.java:193)\n\tat org.springframework.cglib.core.ReflectUtils$1.run(ReflectUtils.java:61)\n\tat java.base/java.security.AccessController.doPrivileged(AccessController.java:569)\n\tat org.springframework.cglib.core.ReflectUtils.<clinit>(ReflectUtils.java:52)\n\tat org.springframework.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:243)\n\tat org.springframework.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)\n\tat org.springframework.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:329)\n\t... 46 common frames omitted\n","appName":"pre-registration-application-service"}

Hi

Can you please share the config server properties that you have added in boostrap ? Are you running config server locally or in some common env?
There seems to be something wrong in these since u are getting exception related to ConfigurationClassPostProcessor.

1 Like

oh okay.

spring.cloud.config.uri=http://172.16.218.67:51000
spring.cloud.config.label=develop-v3
spring.cloud.config.name=config/*
spring.application.name=pre-registration-datasync-service
spring.profiles.active=dev
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=info,health,refresh
server.servlet.context-path=/preregistration/v1
server.port=9094

#disabling health check so that client doesnt try to load properties from sprint config server every
# 5 minutes (should not be done in production)
health.config.enabled=false
mosip.auth.adapter.impl.basepackage=io.mosip.kernel.auth.defaultadapter
preregistration.core.restinterceptor.bypass=true

openapi.info.title=Pre-Registration-Datasync
openapi.info.description=Pre-Registration Datasync Service
openapi.info.version=1.0
openapi.info.license.name=Mosip
openapi.info.license.url=https://docs.mosip.io/platform/license
mosipbox.public.url=http://localhost:${server.port}
openapi.service.servers[0].url=${mosipbox.public.url}${server.servlet.context-path}
openapi.service.servers[0].description=Pre-Registration Datasync Service
openapi.group.name=${openapi.info.title}
openapi.group.paths[0]=/**
springdoc.swagger-ui.disable-swagger-default-url=true
springdoc.swagger-ui.tagsSorter=alpha
springdoc.swagger-ui.operationsSorter=alpha
springdoc.swagger-ui.path=/sync/datasync-service/swagger-ui.html
springdoc.api-docs.path= /sync/datasync-service/v3/api-docs