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

Non-blocking error message is logged after updating concept words task completes

    Details

    • Complexity:
      Low

      Description

      After the update concept words task finishes the last task, it tries to purge the global property it uses to keep track of things, and this throws an exception in the log.

      ERROR - TimerSchedulerTask.run(55) |2011-12-13 21:07:45,130| FATAL ERROR: Task [class org.openmrs.scheduler.tasks.TaskThreadedInitializationWrapper] failed due to exception [org.hibernate.NonUniqueObjectException]
      org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [org.openmrs.GlobalProperty#conceptIndexUpdateTask.lastConceptUpdated]
      	at org.hibernate.engine.StatefulPersistenceContext.checkUniqueness(StatefulPersistenceContext.java:590)
      	at org.hibernate.event.def.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:99)
      	at org.hibernate.event.def.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:52)
      	at org.hibernate.impl.SessionImpl.fireDelete(SessionImpl.java:766)
      	at org.hibernate.impl.SessionImpl.delete(SessionImpl.java:744)
      	at org.openmrs.api.db.hibernate.HibernateAdministrationDAO.deleteGlobalProperty(HibernateAdministrationDAO.java:302)
      	at org.openmrs.api.impl.AdministrationServiceImpl.purgeGlobalProperty(AdministrationServiceImpl.java:757)
      	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:309)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      	at $Proxy120.purgeGlobalProperty(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:309)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:122)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      	at $Proxy121.purgeGlobalProperty(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:309)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      	at $Proxy121.purgeGlobalProperty(Unknown Source)
      	at org.openmrs.scheduler.tasks.ConceptIndexUpdateTask.execute(ConceptIndexUpdateTask.java:90)
      	at org.openmrs.scheduler.tasks.TaskThreadedInitializationWrapper.execute(TaskThreadedInitializationWrapper.java:72)
      	at org.openmrs.scheduler.timer.TimerSchedulerTask.execute(TimerSchedulerTask.java:104)
      	at org.openmrs.api.context.Daemon$2.run(Daemon.java:116)
      
      

      The fix here is to make sure that the purge happens correctly and no error is logged.

        Gliffy Diagrams

          Attachments

            Attachments-Category-Modification

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  darius Darius Jazayeri
                  Watchers:
                  Ben Wolfe, Daniel Kayiwa, Darius Jazayeri, Lluis Martinez, Mayank Sharma, Mikko Suniala, Rafal Korytkowski, Wyclif Luyima
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - 30 minutes
                    30m
                    Remaining:
                    Remaining Estimate - 30 minutes
                    30m
                    Logged:
                    Time Spent - Not Specified
                    Not Specified