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

Adding a concept to the patient graphs tab doesn't work right

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Should
    • Resolution: Fixed
    • None
    • OpenMRS 1.4.0
    • None
    • None

    Description

      Go to the patient dashboard, go to the Graphs tab, click Add at the bottom and pick a concept. You'll get the stack trace below. If you remove the fragment from the URL that refers to adding that graph, then things will look right.

      The problem happens when trying to save the user, however the user is cached in the Session, so until you log out, you'll still see a graph of the concept you tried to add.

      javax.servlet.jsp.JspException: org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [org.openmrs.UserTRAC-6]
      	at org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireString(Unknown Source)
      	at org.apache.taglibs.standard.tag.common.core.ImportSupport.doEndTag(Unknown Source)
      	at org.openmrs.web.taglib.PortletTag.doEndTag(PortletTag.java:112)
      	at org.apache.jsp.WEB_002dINF.view.patientDashboardForm_jsp._jspx_meth_openmrs_005fportlet_005f6(patientDashboardForm_jsp.java:4354)
      	at org.apache.jsp.WEB_002dINF.view.patientDashboardForm_jsp._jspx_meth_openmrs_005fhasPrivilege_005f17(patientDashboardForm_jsp.java:4295)
      	at org.apache.jsp.WEB_002dINF.view.patientDashboardForm_jsp._jspService(patientDashboardForm_jsp.java:600)
      	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
      	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
      	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
      	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
      	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
      	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
      	at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:171)
      	at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:251)
      	at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1160)
      	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:901)
      	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
      	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476)
      	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:431)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:81)
      	at org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:56)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.openmrs.web.filter.OpenmrsFilter.doFilter(OpenmrsFilter.java:124)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
      	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.openmrs.web.filter.initialization.InitializationFilter.doFilter(InitializationFilter.java:111)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
      	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      	at java.lang.Thread.run(Thread.java:619)
      Caused by: org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [org.openmrs.UserTRAC-6]
      	at org.hibernate.engine.StatefulPersistenceContext.checkUniqueness(StatefulPersistenceContext.java:590)
      	at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performUpdate(DefaultSaveOrUpdateEventListener.java:284)
      	at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsDetached(DefaultSaveOrUpdateEventListener.java:223)
      	at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:89)
      	at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
      	at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:507)
      	at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:499)
      	at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:495)
      	at org.openmrs.api.db.hibernate.HibernateUserDAO.saveUser(HibernateUserDAO.java:77)
      	at org.openmrs.api.impl.UserServiceImpl.saveUser(UserServiceImpl.java:102)
      	at org.openmrs.api.impl.UserServiceImpl.setUserProperty(UserServiceImpl.java:447)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	at $Proxy4365.setUserProperty(Unknown Source)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:107)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	at $Proxy4366.setUserProperty(Unknown Source)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	at $Proxy4366.setUserProperty(Unknown Source)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
      	at $Proxy4414.setUserProperty(Unknown Source)
      	at org.apache.jsp.WEB_002dINF.view.portlets.patientGraphs_jsp._jspService(patientGraphs_jsp.java:183)
      	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
      	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
      	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
      	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535)
      	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
      	at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:162)
      	at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:251)
      	at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1160)
      	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:901)
      	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
      	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476)
      	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:431)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
      	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535)
      	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
      	... 53 more
      

      Gliffy Diagrams

        Attachments

          Activity

            People

              isherman Ilya Sherman [X] (Inactive)
              darius Darius Jazayeri
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: