Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-5977

getPatientOrPromotePerson leading to stack traces under some conditions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Should
    • Resolution: Fixed
    • Affects Version/s: Core 2.3.2
    • Fix Version/s: Core 2.4.0, Core 2.3.3
    • Component/s: None
    • Labels:
      None

      Description

      Some users have reported this issue, but not 100% reproducible.

      Steps: 

      1. Create a new patient
      2. From that patient's dashboard, create a new relationship, when doing so:

      • Create a new person within that relationship tag
      • Save relationship
        3. Go to create a new patient, and enter same name/age/gender as newly created provider
        4. Select that newly created provider from the list

      https://www.loom.com/share/efb0c689cf4147c1a2639b8eaf44d0d9

       

       

      An Internal Error has Occurredorg.hibernate.WrongClassExceptionObject [id=41055] was not of the specified subclass [org.openmrs.Patient] : loaded object was of wrong class class org.openmrs.PersonConsult the help document.
      Contact your friendly neighborhood administrator if it cannot be resolved.Hide stack trace
      org.hibernate.event.internal.DefaultLoadEventListener.loadFromSecondLevelCache(DefaultLoadEventListener.java:621)
      org.hibernate.event.internal.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:452)
      org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:213)
      org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:275)
      org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:151)
      org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:1106)
      org.hibernate.internal.SessionImpl.access$2000(SessionImpl.java:176)
      org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.load(SessionImpl.java:2587)
      org.hibernate.internal.SessionImpl.get(SessionImpl.java:991)
      org.openmrs.api.db.hibernate.HibernatePatientDAO.getPatient(HibernatePatientDAO.java:84)
      org.openmrs.api.impl.PatientServiceImpl.getPatient(PatientServiceImpl.java:216)
      sun.reflect.GeneratedMethodAccessor872.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      java.lang.reflect.Method.invoke(Method.java:498)
      org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
      org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
      org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
      org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
      com.sun.proxy.$Proxy174.getPatient(Unknown Source)
      sun.reflect.GeneratedMethodAccessor872.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      java.lang.reflect.Method.invoke(Method.java:498)
      org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
      org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:52)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:52)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:52)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:52)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.springframework.cache.interceptor.CacheInterceptor$1.invoke(CacheInterceptor.java:52)
      org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:303)
      org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:61)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:122)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:52)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:52)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
      com.sun.proxy.$Proxy175.getPatient(Unknown Source)
      org.openmrs.api.impl.PatientServiceImpl.getPatientOrPromotePerson(PatientServiceImpl.java:224)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      java.lang.reflect.Method.invoke(Method.java:498)
      org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
      org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
      org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
      org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
      com.sun.proxy.$Proxy174.getPatientOrPromotePerson(Unknown Source)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      java.lang.reflect.Method.invoke(Method.java:498)
      org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
      org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:52)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:52)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:52)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:52)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.springframework.cache.interceptor.CacheInterceptor$1.invoke(CacheInterceptor.java:52)
      org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:303)
      org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:61)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:122)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:52)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:52)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
      com.sun.proxy.$Proxy175.getPatientOrPromotePerson(Unknown Source)
      org.openmrs.web.controller.patient.ShortPatientFormController.getPatientModel(ShortPatientFormController.java:85)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      java.lang.reflect.Method.invoke(Method.java:498)
      org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:163)
      org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:446)
      org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:434)
      org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:943)
      org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
      org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
      org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
      org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      org.openmrs.module.web.filter.ForcePasswordChangeFilter.doFilter(ForcePasswordChangeFilter.java:60)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:73)
      org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:98)
      org.openmrs.module.usagestatistics.web.filter.RequestProviderFilter.doFilterInternal(RequestProviderFilter.java:58)
      org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:71)
      org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:57)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:109)
      org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:150)
      org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:107)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:107)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:107)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
      org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
      org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:1025)
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
      org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1137)
      org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
      org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2575)
      org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2564)
      java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      java.lang.Thread.run(Thread.java:748)OpenMRS Version: 2.3.3 SNAPSHOT Build 6bb184
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              mseaton Mike Seaton
              Reporter:
              mseaton Mike Seaton
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: