Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate Records in member table. #214

Closed
tiokim opened this issue Sep 15, 2023 · 0 comments · Fixed by #215
Closed

Duplicate Records in member table. #214

tiokim opened this issue Sep 15, 2023 · 0 comments · Fixed by #215
Labels
bug Something isn't working

Comments

@tiokim
Copy link
Member

tiokim commented Sep 15, 2023

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
@tiokim tiokim linked a pull request Sep 15, 2023 that will close this issue
15 tasks
@tiokim tiokim added the bug Something isn't working label Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant