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

fix : 운영/발행예정 QSet 조회 쿼리 수정 #95

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

xonmin
Copy link
Member

@xonmin xonmin commented Aug 16, 2024

  • 🔀 PR 제목의 형식을 잘 작성했나요? e.g. [add] pr template
  • 🧹 불필요한 코드는 제거했나요?

작업 내용

  • QSheet 만들어졌는지 확인하려했는데, EB 들어가보니 에러로그 확인되어 버그 수정합니다.

비고 (첨부자료)

Aug 16 00:05:00 ip-172-31-12-84 web[391860]: 2024-08-16 09:05:00.144 ERROR 391860 --- [   scheduling-1] o.s.s.s.TaskUtils$LoggingErrorHandler    : Unexpected error occurred in scheduled task
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: org.springframework.dao.IncorrectResultSizeDataAccessException: Query did not return a unique result: 4 results were returned
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:301)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:244)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:550)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:61)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:335)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:152)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:136)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.data.repository.core.support.MethodInvocationValidator.invoke(MethodInvocationValidator.java:95)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:223)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at jdk.proxy2/jdk.proxy2.$Proxy161.findByStatusAndPublishedAtAfter(Unknown Source)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at com.mashup.dojo.service.DefaultQuestionService.getNextOperatingQuestionSet(QuestionService.kt:128)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at java.base/java.lang.reflect.Method.invoke(Method.java:580)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:354)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:768)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:392)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:768)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:720)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at com.mashup.dojo.service.DefaultQuestionService$$SpringCGLIB$$0.getNextOperatingQuestionSet(<generated>)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at com.mashup.dojo.usecase.DefaultQuestionUseCase.createQuestionSheet(QuestionUseCase.kt:123)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at java.base/java.lang.reflect.Method.invoke(Method.java:580)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:354)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:768)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:392)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:768)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:720)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at com.mashup.dojo.usecase.DefaultQuestionUseCase$$SpringCGLIB$$0.createQuestionSheet(<generated>)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at com.mashup.dojo.scheduler.Scheduler.createQuestionSheet(Scheduler.kt:29)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at java.base/java.lang.reflect.Method.invoke(Method.java:580)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.scheduling.support.ScheduledMethodRunnable.runInternal(ScheduledMethodRunnable.java:130)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.scheduling.support.ScheduledMethodRunnable.lambda$run$2(ScheduledMethodRunnable.java:124)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at io.micrometer.observation.Observation.observe(Observation.java:499)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:124)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:96)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: #011at java.base/java.lang.Thread.run(Thread.java:1583)
Aug 16 00:05:00 ip-172-31-12-84 web[391860]: Caused by: org.hibernate.NonUniqueResultException: Query did not return a unique result: 4 results were returned

@xonmin xonmin self-assigned this Aug 16, 2024
@xonmin xonmin merged commit e900e82 into master Aug 16, 2024
@xonmin xonmin deleted the xonmin/fix-get-questionSet-query branch August 16, 2024 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant