We see this warning when the token is expired / not found during initial sync. Regclient automatically generates new token and stores in local db as a part of background sync.
What exactly is the issue? Can you please share some more details and logs?
2023-03-28 13:54:40,411 INFO [JavaFX Application Thread] i.m.r.c.a.LoginController : Validating Credentials entered through UI
2023-03-28 13:54:40,413 INFO [JavaFX Application Thread] i.m.r.s.l.i.LoginServiceImpl : REGISTRATION - LOGIN - LOGIN_CONTROLLER - REGISTRATION - REG - Validating User
2023-03-28 13:54:40,413 INFO [JavaFX Application Thread] i.m.r.s.l.i.LoginServiceImpl : Fetching User details
2023-03-28 13:54:40,755 INFO [JavaFX Application Thread] i.m.r.d.i.UserDetailDAOImpl : Fetching User details
2023-03-28 13:54:40,951 INFO [JavaFX Application Thread] i.m.r.s.l.i.LoginServiceImpl : Completed fetching User details, user found : true
2023-03-28 13:54:40,990 INFO [JavaFX Application Thread] i.m.r.s.l.i.LoginServiceImpl : Validating roles for the provided userid
2023-03-28 13:54:40,995 INFO [JavaFX Application Thread] i.m.r.s.l.i.LoginServiceImpl : completed validating user successfully
2023-03-28 13:54:40,998 INFO [JavaFX Application Thread] i.m.r.c.a.LoginController : REGISTRATION - LOGIN - LOGIN_CONTROLLER - REGISTRATION - REG - Fetching invalid login params
2023-03-28 13:54:40,999 INFO [JavaFX Application Thread] i.m.r.c.a.LoginController : Invoking validation of login attempts
2023-03-28 13:54:40,999 INFO [JavaFX Application Thread] i.m.r.s.l.i.LoginServiceImpl : validating invalid login params
2023-03-28 13:54:40,999 INFO [JavaFX Application Thread] i.m.r.s.l.i.LoginServiceImpl : REGISTRATION - LOGIN - LOGIN_CONTROLLER - REGISTRATION - REG - Comparing timestamps in case of invalid login attempts
2023-03-28 13:54:40,999 INFO [JavaFX Application Thread] i.m.r.s.o.i.UserMachineMappingServiceImpl : REGISTRATION-CENTER-USER-MACHINE-MAPPING-DETAILS- SYNC - REGISTRATION - REG - Started to find whether the user new to machine or not
2023-03-28 13:54:40,999 INFO [JavaFX Application Thread] i.m.r.d.i.MachineMappingDAOImpl : checking if user has onboarded to machine or not
2023-03-28 13:54:46,948 INFO [JavaFX Application Thread] i.m.r.c.a.LoginController : REGISTRATION - LOGIN - LOGIN_CONTROLLER - REGISTRATION - REG - Validating Credentials entered through UI
2023-03-28 13:54:47,052 INFO [JavaFX Application Thread] i.m.r.u.r.AuthTokenUtilService : Fetching Auth Token and refresh token based on Login Mode >>> PASSWORD
2023-03-28 13:54:47,053 INFO [JavaFX Application Thread] i.m.k.c.s.i.TPMClientCryptoServiceImpl : ccSessionID - TPM - - Creating the Key from Platform TPM
2023-03-28 13:54:47,269 INFO [JavaFX Application Thread] i.m.k.c.s.i.TPMClientCryptoServiceImpl : ccSessionID - TPM - - Completed creating the Signing Key from Platform TPM
2023-03-28 13:54:47,281 INFO [JavaFX Application Thread] i.m.k.c.s.i.TPMClientCryptoServiceImpl : ccSessionID - TPM - - Creating the Key from Platform TPM
2023-03-28 13:54:47,438 INFO [JavaFX Application Thread] i.m.k.c.s.i.TPMClientCryptoServiceImpl : ccSessionID - TPM - - Completed Signing data using TPM
2023-03-28 13:54:47,438 INFO [JavaFX Application Thread] i.m.r.u.r.AuthTokenUtilService : Preparing URI for web-service >>>>> https://api-internal.sandbox.stataware.com/v1/syncdata/authenticate/useridpwd
2023-03-28 13:54:47,443 INFO [JavaFX Application Thread] i.m.r.u.r.AuthTokenUtilService : Completed preparing URI for web-service >>>>>>> https://api-internal.sandbox.stataware.com/v1/syncdata/authenticate/useridpwd
2023-03-28 13:54:47,768 INFO [JavaFX Application Thread] i.m.k.c.s.i.TPMClientCryptoServiceImpl : ccSessionID - TPM - - Getting Asymmetric Key Creation from tpm
2023-03-28 13:54:47,875 ERROR [JavaFX Application Thread] i.m.r.u.r.AuthTokenUtilService : could not execute statement; SQL [n/a]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement
org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:259)
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:225)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:527)
at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:61)
at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:242)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:153)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:135)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.data.repository.core.support.SurroundingTransactionDetectorMethodInterceptor.invoke(SurroundingTransactionDetectorMethodInterceptor.java:61)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy162.saveAndFlush(Unknown Source)
at io.mosip.registration.dao.impl.UserDetailDAOImpl.updateUserRolesAndUsername(UserDetailDAOImpl.java:284)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:197)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy167.updateUserRolesAndUsername(Unknown Source)
at io.mosip.registration.util.restclient.AuthTokenUtilService.updateUserDetails(AuthTokenUtilService.java:395)
at io.mosip.registration.util.restclient.AuthTokenUtilService.getAuthTokenAndRefreshToken(AuthTokenUtilService.java:237)
at io.mosip.registration.util.restclient.AuthTokenUtilService.getAuthTokenAndRefreshToken(AuthTokenUtilService.java:201)
at io.mosip.registration.util.restclient.AuthTokenUtilService$$FastClassBySpringCGLIB$$605b6d5c.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)
at io.mosip.registration.util.restclient.AuthTokenUtilService$$EnhancerBySpringCGLIB$$e28ddeea.getAuthTokenAndRefreshToken()
at io.mosip.registration.service.security.impl.AuthenticationServiceImpl.validatePassword(AuthenticationServiceImpl.java:156)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:197)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)
at io.micrometer.core.aop.CountedAspect.interceptAndRecord(CountedAspect.java:100)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:174)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy212.validatePassword(Unknown Source)
at io.mosip.registration.context.SessionContext.validatePword(SessionContext.java:267)
at io.mosip.registration.context.SessionContext.validateAuthMethods(SessionContext.java:234)
at io.mosip.registration.context.SessionContext.create(SessionContext.java:169)
at io.mosip.registration.controller.auth.LoginController.validateUserCredentialsInLocal(LoginController.java:491)
at io.mosip.registration.controller.auth.LoginController.validateCredentials(LoginController.java:450)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javafx.reflect.Trampoline.invoke(Unknown Source)
at jdk.internal.reflect.GeneratedMethodAccessor121.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at javafx.base/com.sun.javafx.reflect.MethodUtil.invoke(Unknown Source)
at javafx.fxml/com.sun.javafx.fxml.MethodHelper.invoke(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader$MethodHandler.invoke(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(Unknown Source)
at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
at javafx.base/javafx.event.Event.fireEvent(Unknown Source)
at javafx.graphics/javafx.scene.Node.fireEvent(Unknown Source)
at javafx.controls/javafx.scene.control.Button.fire(Unknown Source)
at javafx.controls/com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(Unknown Source)
at javafx.controls/com.sun.javafx.scene.control.inputmap.InputMap.handle(Unknown Source)
at javafx.base/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
at javafx.base/javafx.event.Event.fireEvent(Unknown Source)
at javafx.graphics/javafx.scene.Scene$MouseHandler.process(Unknown Source)
at javafx.graphics/javafx.scene.Scene.processMouseEvent(Unknown Source)
at javafx.graphics/javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source)
at javafx.graphics/com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
at javafx.graphics/com.sun.glass.ui.View.notifyMouse(Unknown Source)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.hibernate.exception.ConstraintViolationException: could not execute statement
at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59)
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:208)
at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:45)
at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3188)
at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:3067)
at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3447)
at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:145)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:586)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:460)
at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)
at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1428)
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1414)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:304)
at com.sun.proxy.$Proxy128.flush(Unknown Source)
at org.springframework.data.jpa.repository.support.SimpleJpaRepository.flush(SimpleJpaRepository.java:534)
at org.springframework.data.jpa.repository.support.SimpleJpaRepository.saveAndFlush(SimpleJpaRepository.java:505)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.data.repository.core.support.RepositoryComposition$RepositoryFragments.invoke(RepositoryComposition.java:377)
at org.springframework.data.repository.core.support.RepositoryComposition.invoke(RepositoryComposition.java:200)
at org.springframework.data.repository.core.support.RepositoryFactorySupport$ImplementationMethodExecutionInterceptor.invoke(RepositoryFactorySupport.java:629)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:593)
at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:578)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:59)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139)
… 117 common frames omitted
Caused by: java.sql.SQLIntegrityConstraintViolationException: Column ‘NAME’ cannot accept a NULL value.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeLargeUpdate(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(Unknown Source)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:205)
… 153 common frames omitted
Caused by: org.apache.derby.iapi.error.StandardException: Column ‘NAME’ cannot accept a NULL value.
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.impl.sql.execute.NormalizeResultSet.normalizeColumn(Unknown Source)
at org.apache.derby.impl.sql.execute.NormalizeResultSet.normalizeRow(Unknown Source)
at org.apache.derby.impl.sql.execute.NormalizeResultSet.getNextRowCore(Unknown Source)
at org.apache.derby.impl.sql.execute.DMLWriteResultSet.getNextRowCore(Unknown Source)
at org.apache.derby.impl.sql.execute.UpdateResultSet.getNextRowCore(Unknown Source)
at org.apache.derby.impl.sql.execute.UpdateResultSet.collectAffectedRows(Unknown Source)
at org.apache.derby.impl.sql.execute.UpdateResultSet.open(Unknown Source)
at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
… 158 common frames omitted
2023-03-28 13:54:47,955 ERROR [JavaFX Application Thread] i.m.r.c.SessionContext : Failed validating password
io.mosip.registration.exception.RegBaseCheckedException: REG-SDU-006 → Failed to save auth token (invalid / too large)
at io.mosip.registration.util.restclient.AuthTokenUtilService.getAuthTokenAndRefreshToken(AuthTokenUtilService.java:249)
at io.mosip.registration.util.restclient.AuthTokenUtilService.getAuthTokenAndRefreshToken(AuthTokenUtilService.java:201)
at io.mosip.registration.util.restclient.AuthTokenUtilService$$FastClassBySpringCGLIB$$605b6d5c.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)
at io.mosip.registration.util.restclient.AuthTokenUtilService$$EnhancerBySpringCGLIB$$e28ddeea.getAuthTokenAndRefreshToken()
at io.mosip.registration.service.security.impl.AuthenticationServiceImpl.validatePassword(AuthenticationServiceImpl.java:156)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:197)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)
at io.micrometer.core.aop.CountedAspect.interceptAndRecord(CountedAspect.java:100)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:174)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy212.validatePassword(Unknown Source)
at io.mosip.registration.context.SessionContext.validatePword(SessionContext.java:267)
at io.mosip.registration.context.SessionContext.validateAuthMethods(SessionContext.java:234)
at io.mosip.registration.context.SessionContext.create(SessionContext.java:169)
at io.mosip.registration.controller.auth.LoginController.validateUserCredentialsInLocal(LoginController.java:491)
at io.mosip.registration.controller.auth.LoginController.validateCredentials(LoginController.java:450)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javafx.reflect.Trampoline.invoke(Unknown Source)
at jdk.internal.reflect.GeneratedMethodAccessor121.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at javafx.base/com.sun.javafx.reflect.MethodUtil.invoke(Unknown Source)
at javafx.fxml/com.sun.javafx.fxml.MethodHelper.invoke(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader$MethodHandler.invoke(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(Unknown Source)
at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
2023-03-28 13:54:47,956 INFO [JavaFX Application Thread] i.m.r.c.a.LoginController : REGISTRATION - LOGIN - LOGIN_CONTROLLER - REGISTRATION - REG - Fetching invalid login params
2023-03-28 13:54:47,956 INFO [JavaFX Application Thread] i.m.r.c.a.LoginController : Invoking validation of login attempts
2023-03-28 13:54:47,956 INFO [JavaFX Application Thread] i.m.r.s.l.i.LoginServiceImpl : validating invalid login params
2023-03-28 13:54:47,956 INFO [JavaFX Application Thread] i.m.r.s.l.i.LoginServiceImpl : REGISTRATION - LOGIN - LOGIN_CONTROLLER - REGISTRATION - REG - Comparing timestamps in case of invalid login attempts
2023-03-28 13:54:47,956 INFO [JavaFX Application Thread] i.m.r.s.l.i.LoginServiceImpl : REGISTRATION - LOGIN - LOGIN_CONTROLLER - REGISTRATION - REG - updating login count and time for invalid login attempts
2023-03-28 13:54:47,956 INFO [JavaFX Application Thread] i.m.r.s.l.i.LoginServiceImpl : REGISTRATION - UPDATELOGINPARAMS - LOGINSERVICE - REGISTRATION - REG - Updating Login Params
2023-03-28 13:54:47,958 INFO [JavaFX Application Thread] i.m.r.d.i.UserDetailDAOImpl : Fetching User details
2023-03-28 13:54:47,965 INFO [JavaFX Application Thread] i.m.r.d.i.UserDetailDAOImpl : Updating Login params
2023-03-28 13:54:47,999 INFO [JavaFX Application Thread] i.m.r.d.i.UserDetailDAOImpl : Updated Login params successfully
2023-03-28 13:54:48,003 INFO [JavaFX Application Thread] i.m.r.s.l.i.LoginServiceImpl : REGISTRATION - UPDATELOGINPARAMS - LOGINSERVICE - REGISTRATION - REG - Updated Login Params
2023-03-28 13:54:48,030 INFO [JavaFX Application Thread] i.m.r.c.r.AlertController : REGISTRATION - ALERT_CONTROLLER - ALERT_GENERATION - REGISTRATION - REG - Alert generation has been started
2023-03-28 13:54:48,033 INFO [JavaFX Application Thread] i.m.r.c.r.AlertController : REGISTRATION - ALERT_CONTROLLER - ALERT_GENERATION - REGISTRATION - REG - Alert generation has been ended
2023-03-28 13:59:14,298 INFO [JavaFX Application Thread] i.m.r.c.r.AlertController : REGISTRATION - ALERT_CONTROLLER - ALERT_GENERATION - REGISTRATION - REG - Alert closing has been started
2023-03-28 13:59:14,306 INFO [JavaFX Application Thread] i.m.r.c.r.AlertController : REGISTRATION - ALERT_CONTROLLER - ALERT_GENERATION - REGISTRATION - REG - Alert closing has been ended
2023-03-28 13:59:14,306 INFO [JavaFX Application Thread] i.m.r.c.r.AlertController : REGISTRATION - ALERT_CONTROLLER - ALERT_GENERATION - REGISTRATION - REG - Alert closing has been started
2023-03-28 13:59:14,306 INFO [JavaFX Application Thread] i.m.r.c.r.AlertController : REGISTRATION - ALERT_CONTROLLER - ALERT_GENERATION - REGISTRATION - REG - Alert closing has been ended
2023-03-28 13:59:14,306 INFO [JavaFX Application Thread] i.m.r.c.a.LoginController : Validated number of login attempts, failed!
2023-03-28 14:01:16,338 INFO [pool-3-thread-1] i.m.r.c.MetricsConfig : Starting upload…{filename=metrics-archive.2023-03-27_19.log}
2023-03-28 14:01:16,339 ERROR [pool-3-thread-1] i.m.r.c.MetricsURLMemoryStore : Failed to get resumable url in MetricsURLMemoryStore
Caused by: org.apache.derby.iapi.error.StandardException: Column ‘NAME’ cannot accept a NULL value
The “name” column of the “user_detail” table must be having null value, which is not supported in local db. Can you please check the entries of that table if any entry is having name as null?
Give any valid value instead of null, it should resolve this issue.
Hi @HimajaDhanyamraju2 can you please tell me the table and column name and what value is to be given in that.
Hi @Jayant ,
pls cross check below:
- “name” claim in the auth-token
- The number of roles assigned to the keycloak userid, with which you are trying to login to reg-client.
We expect a reg-client user to atmost have 3 roles
a. Default
b. REGISTRATION_SUPERVISOR
c. REGISTRATION_OPERATOR
Way to verify:
Use below endpoint to generate an auth-token
https://api-internal.sandbox.stataware.com/v1/authmanager/authenticate/internal/useridPwd
and verify the payload of auth-token, for “name” and “realm_access” claims.
Hi Anusha,
we found one more database related error/exception while running the run batch file.
not sure if because of this we are getting authentication error during login.
2023-04-05 07:29:44,601 INFO [JavaFX-Launcher] i.m.r.c.DaoConfig : REGISTRATION - DaoConfig - REGISTRATION - REG - getDBSecret invoked - DB_PWD_FILE not found !
2023-04-05 07:29:44,615 INFO [JavaFX-Launcher] i.m.k.c.s.i.TPMClientCryptoServiceImpl : ccSessionID - TPM - - Instantiating Platform TPM
2023-04-05 07:29:44,802 INFO [JavaFX-Launcher] i.m.k.c.s.i.TPMClientCryptoServiceImpl : ccSessionID - TPM - - Completed getting the instance of Platform TPM
2023-04-05 07:29:44,802 INFO [JavaFX-Launcher] i.m.k.c.s.i.TPMClientCryptoServiceImpl : ccSessionID - TPM - - Getting Asymmetric Key Creation from tpm
2023-04-05 07:29:45,182 INFO [JavaFX-Launcher] i.m.k.c.s.i.TPMClientCryptoServiceImpl : ccSessionID - TPM - - Completed Asymmetric Key Creation using tpm. Time taken is 0 seconds
2023-04-05 07:29:45,182 INFO [JavaFX-Launcher] i.m.k.c.s.i.TPMClientCryptoServiceImpl : ccSessionID - TPM - - TpmClientSecurity Asymmetric encrypt
2023-04-05 07:29:45,364 INFO [JavaFX-Launcher] i.m.k.c.s.i.TPMClientCryptoServiceImpl : ccSessionID - TPM - - Getting Asymmetric Key Creation from tpm
2023-04-05 07:29:52,580 INFO [JavaFX-Launcher] i.m.r.c.DaoConfig : REGISTRATION - DAO Config - DB - REGISTRATION - REG - Derby DB shutdown successful.
2023-04-05 07:29:52,581 INFO [JavaFX-Launcher] i.m.k.c.s.i.TPMClientCryptoServiceImpl : ccSessionID - TPM - - Getting Asymmetric Key Creation from tpm
2023-04-05 07:29:52,581 INFO [JavaFX-Launcher] i.m.k.c.s.i.TPMClientCryptoServiceImpl : ccSessionID - TPM - - TpmClientSecurity Asymmetric encrypt
2023-04-05 07:29:52,595 INFO [JavaFX-Launcher] i.m.k.c.s.i.TPMClientCryptoServiceImpl : ccSessionID - TPM - - Getting Asymmetric Key Creation from tpm
2023-04-05 07:29:52,624 INFO [JavaFX-Launcher] i.m.r.c.DaoConfig : REGISTRATION - DAO Config - DB - REGISTRATION - Checking Derby Security properties - Started …
2023-04-05 07:29:52,625 INFO [JavaFX-Launcher] i.m.k.c.s.i.TPMClientCryptoServiceImpl : ccSessionID - TPM - - Getting Asymmetric Key Creation from tpm
2023-04-05 07:29:52,629 INFO [JavaFX-Launcher] i.m.k.c.s.i.TPMClientCryptoServiceImpl : ccSessionID - TPM - - Getting Asymmetric Key Creation from tpm
2023-04-05 07:29:52,858 ERROR [JavaFX-Launcher] i.m.r.c.DaoConfig : REGISTRATION - DAO Config - DB - REGISTRATION - REG - io.mosip.registration.exception.RegBaseCheckedException: → derby.connection.requireAuthentication : is not set to preferred value!
at io.mosip.registration.config.DaoConfig.isKeySet(DaoConfig.java:396)
at io.mosip.registration.config.DaoConfig.isUserSetupComplete(DaoConfig.java:343)
at io.mosip.registration.config.DaoConfig.setupUserAndPermits(DaoConfig.java:303)
at io.mosip.registration.config.DaoConfig.setupDataSource(DaoConfig.java:215)
at io.mosip.registration.config.DaoConfig.dataSource(DaoConfig.java:133)
at io.mosip.registration.config.DaoConfig.entityManagerFactory(DaoConfig.java:158)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:579)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1254)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1103)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:541)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1089)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:859)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
at org.springframework.context.annotation.AnnotationConfigApplicationContext.(AnnotationConfigApplicationContext.java:88)
at io.mosip.registration.controller.ClientApplication.init(ClientApplication.java:86)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
2023-04-05 07:29:52,858 INFO [JavaFX-Launcher] i.m.r.c.DaoConfig : REGISTRATION - DAO Config - DB - REGISTRATION - REG - Started setting up DB user and access permits…
2023-04-05 07:29:52,936 INFO [JavaFX-Launcher] i.m.r.c.DaoConfig : REGISTRATION - DAO Config - DB - REGISTRATION - REG - Derby DB shutdown successful.
During application launch, regclient verifies for db.conf file, if it does not exist, it is considered as initial launch and the file will be created. This error log is regarding that scenario, not related to the error that you are facing.
As suggested by Anusha, please verify if “name” claim is present in the auth-token.
If “name” is empty / null, check “username” / “First Name” / “Last Name” fields in keycloak for the username that you are using to login to regclient and give valid values for those fields.
Now it’s working fine. Thanks for your support.