Hi, I try to clone id repo and run your source code. I follow all step in Identity Service Developers Guide. and this error shows up
{“@timestamp”:“2023-09-28T16:13:12.216+07:00”,“@version”:“1”,“message”:“Failed to clear soft references from ObjectStreamClass$Caches for web application [ROOT]”,“logger_name”:“org.apache.catalina.loader.WebappClassLoaderBase”,“thread_name”:“localhost-startStop-1”,“level”:“WARN”,“level_value”:30000,“stack_trace”:“java.lang.ClassCastException: class java.io.ObjectStreamClass$Caches$1 cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1 and java.util.Map are in module java.base of loader ‘bootstrap’)\n\tat org.apache.catalina.loader.WebappClassLoaderBase.clearCache(WebappClassLoaderBase.java:2244)\n\tat org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesObjectStreamClassCaches(WebappClassLoaderBase.java:2231)\n\tat org.apache.catalina.loader.WebappClassLoaderBase.clearReferences(WebappClassLoaderBase.java:1603)\n\tat org.apache.catalina.loader.WebappClassLoaderBase.stop(WebappClassLoaderBase.java:1548)\n\tat org.apache.catalina.loader.WebappLoader.stopInternal(WebappLoader.java:452)\n\tat org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)\n\tat org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5437)\n\tat org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)\n\tat org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1428)\n\tat org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1417)\n\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat java.base/java.lang.Thread.run(Thread.java:829)\n”,“appName”:“id-repository”}
Let me go through the error logs and see why this ID repo is showing this error.
@mahammedtaheer can you look into this and provide your guidance.
Best Regards,
Team MOSIP
Please add the below repository in pom.xml file for info.weboftrust jar file.
<repository>
<id>danubetech-maven-public</id>
<url>https://repo.danubetech.com/repository/maven-public/</url>
</repository>
Thanks
Thank @mahammedtaheer and @sanchi-singh24
problem with Maven solved but I have one more issue with the start identity service. it gives me this log
{“@timestamp”:“2023-09-30T16:34:08.878+07:00”,“@version”:“1”,“message”:“\n\n***************************\nAPPLICATION FAILED TO START\n***************************\n\nDescription:\n\nParameter 0 of method securityManagerWithAuth in io.mosip.idrepository.identity.config.IdRepoConfig required a bean of type ‘org.springframework.web.reactive.function.client.WebClient’ that could not be found.\n\n\nAction:\n\nConsider defining a bean of type ‘org.springframework.web.reactive.function.client.WebClient’ in your configuration.\n”,“logger_name”:“org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter”,“thread_name”:“main”,“level”:“ERROR”,“level_value”:40000,“appName”:“id-repository”}
currently, we running now version 1.2.0.1-SNAPSHOT id-repo
Best Regards
got this error when try running identity service in id repo module
“message”:“Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name ‘securityConfig’: Unsatisfied dependency expressed through method ‘setContentNegotationStrategy’ parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration’: Unsatisfied dependency expressed through method ‘setConfigurers’ parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘idRepoConfig’: Unsatisfied dependency expressed through field ‘interceptor’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘idRepoEntityInterceptor’: Unsatisfied dependency expressed through field ‘securityManager’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘securityManagerWithAuth’ defined in class path resource [io/mosip/idrepository/identity/config/IdRepoConfig.class]: Unsatisfied dependency expressed through method ‘securityManagerWithAuth’ parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘selfTokenWebClient’ defined in class path resource [io/mosip/kernel/auth/defaultadapter/config/BeanConfig.class]: Unsatisfied dependency expressed through method ‘selfTokenWebClient’ parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘plainWebClient’ defined in class path resource [io/mosip/kernel/auth/defaultadapter/config/BeanConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.reactive.function.client.WebClient]: Factory method ‘plainWebClient’ threw exception; nested exception is java.lang.NoSuchMethodError: ‘java.lang.Throwable io.netty.util.internal.ReflectionUtil.trySetAccessible(java.lang.reflect.AccessibleObject)’”,
Thank
During start of application it is expected to add auth-adapter jar file in the classpath. The auth-adapter jar file should be downloadable from the artifactory.
Because of non availability of this jar file in classpath, its throwing ‘selfTokenWebClient’ & ‘plainWebClient’ bean not available error.
Please add the jar file in the artifactory and download the jar file from artifactory in the classpath to resolve the issue.
Thanks,
Thank @mahammedtaheer and MOSIP team
we don’t run artifactory module parallelly for id repo to get kernel-auth-adapter. currently, we download it from https://oss.sonatype.org/ at version v1.2.0.1-B1 and import it into the service module as a library. Based on your commendation above do we need to artifactory to id repo get a kernel-auth-adapter? Or am I missing some point in configuration on IDE to start this module?
Thanks
If you are trying to run the id-repo through IDE, no need to configure artifactory. As you mentioned, kernel-auth-adapter is added as service module check why the jar is not getting loaded in the classpath.
Which IDE are you using? and how are you import the jar file into service module as a library.
Thanks
I use Intellij and I import the jar file by project setting > libraries > click on + and add jar file. and I choose to add on mosip-id-repository service
Thanks
Hello @mahammedtaheer,
I still have a problem with that. Is it possible to record the video you set up in this module?
Thank
Instead of adding in libraries under “Project Setting” try adding it in module and select specific module where you want the auth-adapter to be available in classpath.
Refer the attached image where the jar file is added to specific module (vci-service-impl module)
Thanks
Thank @mahammedtaheer
I tried to import jar to the module like you did. but the problem still occurs.
logs:
{“@timestamp”:“2023-10-09T09:41:18.649+07:00”,“@version”:“1”,“message”:“Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name ‘securityConfig’: Unsatisfied dependency expressed through method ‘setContentNegotationStrategy’ parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration’: Unsatisfied dependency expressed through method ‘setConfigurers’ parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘idRepoConfig’: Unsatisfied dependency expressed through field ‘interceptor’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘idRepoEntityInterceptor’: Unsatisfied dependency expressed through field ‘securityManager’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘securityManagerWithAuth’ defined in class path resource [io/mosip/idrepository/identity/config/IdRepoConfig.class]: Unsatisfied dependency expressed through method ‘securityManagerWithAuth’ parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘selfTokenWebClient’ defined in class path resource [io/mosip/kernel/auth/defaultadapter/config/BeanConfig.class]: Unsatisfied dependency expressed through method ‘selfTokenWebClient’ parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘plainWebClient’ defined in class path resource [io/mosip/kernel/auth/defaultadapter/config/BeanConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.reactive.function.client.WebClient]: Factory method ‘plainWebClient’ threw exception; nested exception is java.lang.NoSuchMethodError: ‘java.lang.Throwable io.netty.util.internal.ReflectionUtil.trySetAccessible(java.lang.reflect.AccessibleObject)’”,“logger_name”:“org.springframework.boot.web.embedded.tomcat.TomcatStarter”,“thread_name”:“localhost-startStop-1”,“level”:“ERROR”,“level_value”:40000,“appName”:“id-repository”}
Thank @mahammedtaheer
Now it’s running
I have one more question. I tried to add a new identity in id repo identity service but it required to have authorize to do it. In development, Dose it required to connect with keycloak as IAM to get authorization, or does it have another way to disable connect to IAM for development stage?
Thanks