Samsung / LPVS

License Pre-Validation Service analyzes which open source components and licenses are used in every patch. It returns the list of restricted licenses and the possibility of license violation on the comment with the exact code location and the open source component information.

Home Page:https://samsung.github.io/LPVS/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Duplicate Records in member table.

tiokim opened this issue · comments

Describe the bug
When a new user logs in through the frontend webpage, two duplicate records are inserted.
As a result, the user can not log in.

To Reproduce
Steps to reproduce the behavior:

  1. Go to http://localhost:3000
  2. Click on login
  3. login with Google
  4. See the error logs from lpvs container

Logs from lpvs container

lpvs-lpvs-1     | 2023-09-15 00:56:58.047 ERROR 1 --- [nio-7896-exec-7] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result: 2; nested exception is javax.persistence.NonUniqueResultException: query did not return a unique result: 2] with root cause
lpvs-lpvs-1     |
lpvs-lpvs-1     | javax.persistence.NonUniqueResultException: query did not return a unique result: 2
lpvs-lpvs-1     |       at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:128) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final]
lpvs-lpvs-1     |       at org.hibernate.query.internal.AbstractProducedQuery.getSingleResult(AbstractProducedQuery.java:1672) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final]
lpvs-lpvs-1     |       at org.hibernate.query.criteria.internal.compile.CriteriaQueryTypeQueryAdapter.getSingleResult(CriteriaQueryTypeQueryAdapter.java:111) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final]
lpvs-lpvs-1     |       at org.springframework.data.jpa.repository.query.JpaQueryExecution$SingleEntityExecution.doExecute(JpaQueryExecution.java:198) ~[spring-data-jpa-2.7.15.jar!/:2.7.15]
lpvs-lpvs-1     |       at org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:90) ~[spring-data-jpa-2.7.15.jar!/:2.7.15]
lpvs-lpvs-1     |       at org.springframework.data.jpa.repository.query.AbstractJpaQuery.doExecute(AbstractJpaQuery.java:156) ~[spring-data-jpa-2.7.15.jar!/:2.7.15]
lpvs-lpvs-1     |       at org.springframework.data.jpa.repository.query.AbstractJpaQuery.execute(AbstractJpaQuery.java:144) ~[spring-data-jpa-2.7.15.jar!/:2.7.15]
lpvs-lpvs-1     |       at org.springframework.data.repository.core.support.RepositoryMethodInvoker.doInvoke(RepositoryMethodInvoker.java:137) ~[spring-data-commons-2.7.15.jar!/:2.7.15]
lpvs-lpvs-1     |       at org.springframework.data.repository.core.support.RepositoryMethodInvoker.invoke(RepositoryMethodInvoker.java:121) ~[spring-data-commons-2.7.15.jar!/:2.7.15]
lpvs-lpvs-1     |       at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.doInvoke(QueryExecutorMethodInterceptor.java:160) ~[spring-data-commons-2.7.15.jar!/:2.7.15]
lpvs-lpvs-1     |       at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.invoke(QueryExecutorMethodInterceptor.java:139) ~[spring-data-commons-2.7.15.jar!/:2.7.15]
lpvs-lpvs-1     |       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.29.jar!/:5.3.29]
lpvs-lpvs-1     |       at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:76) ~[spring-data-commons-2.7.15.jar!/:2.7.15]
lpvs-lpvs-1     |       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.29.jar!/:5.3.29]
lpvs-lpvs-1     |       at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123) ~[spring-tx-5.3.29.jar!/:5.3.29]
lpvs-lpvs-1     |       at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388) ~[spring-tx-5.3.29.jar!/:5.3.29]
lpvs-lpvs-1     |       at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) ~[spring-tx-5.3.29.jar!/:5.3.29]
lpvs-lpvs-1     |       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.29.jar!/:5.3.29]
lpvs-lpvs-1     |       at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:137) ~[spring-tx-5.3.29.jar!/:5.3.29]
lpvs-lpvs-1     |       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.29.jar!/:5.3.29]
lpvs-lpvs-1     |       at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:145) ~[spring-data-jpa-2.7.15.jar!/:2.7.15]
lpvs-lpvs-1     |       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.29.jar!/:5.3.29]
lpvs-lpvs-1     |       at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) ~[spring-aop-5.3.29.jar!/:5.3.29]
lpvs-lpvs-1     |       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.29.jar!/:5.3.29]
lpvs-lpvs-1     |       at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:241) ~[spring-aop-5.3.29.jar!/:5.3.29]
lpvs-lpvs-1     |       at com.sun.proxy.$Proxy117.findByEmailAndProvider(Unknown Source) ~[na:na]
lpvs-lpvs-1     |       at com.lpvs.service.LPVSLoginCheckService.getMemberFromMemberMap(LPVSLoginCheckService.java:56) ~[classes!/:1.1.0]
lpvs-lpvs-1     |       at com.lpvs.service.LPVSLoginCheckService$$FastClassBySpringCGLIB$$cb08147c.invoke(<generated>) ~[classes!/:1.1.0]

Test environment configuration (please complete the following information):

  • Java: v11
  • LPVS Release: 1.1.0