Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register

Ticket #809 (closed defect: fixed)

Opened 5 months ago

Last modified 5 months ago

synchronization breaks when concepts are locked

Reported by: catullus Assigned to: mcunderlik
Priority: major Milestone: Synchronization 0.3
Component: OpenMRS Code Base Keywords:
Cc: nzeyi, djazayeri Introductory Ticket:

Description

Currently, synchronization ingest breaks when concepts are locked. See the error below. We are running 1.3.0.01 RC1 Build 4527. Synchronization should be able to edit concepts even when concepts are locked. It makes sense to prevent users but not synchronization from editing concepts.

WARN - SynchronizationIngestServiceImpl.processSynchronizable(553) |2008-06-13 11:40:57,948| About to update or create a org.openmrs.Concept object org.openmrs.api.ConceptsLockedException: The concepts are currently locked. Editing of concepts is not allowed at this time.

at org.openmrs.api.impl.ConceptServiceImpl.checkIfLocked(ConceptServiceImpl.java:870) at org.openmrs.api.impl.ConceptServiceImpl.createConcept(ConceptServiceImpl.java:85) at org.openmrs.api.impl.ConceptServiceImpl.createConcept(ConceptServiceImpl.java:77) at sun.reflect.GeneratedMethodAccessor1035.invoke(Unknown Source) 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 $Proxy55.createConcept(Unknown Source) at sun.reflect.GeneratedMethodAccessor1035.invoke(Unknown Source) 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.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 $Proxy56.createConcept(Unknown Source) at sun.reflect.GeneratedMethodAccessor1035.invoke(Unknown Source) 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 $Proxy56.createConcept(Unknown Source) at sun.reflect.GeneratedMethodAccessor1035.invoke(Unknown Source) 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 $Proxy55.createConcept(Unknown Source) at org.openmrs.synchronization.SyncUtil.updateOpenmrsObject(SyncUtil.java:521) at org.openmrs.api.impl.SynchronizationIngestServiceImpl.processSynchronizable(SynchronizationIngestServiceImpl.java:554) at org.openmrs.api.impl.SynchronizationIngestServiceImpl.processSyncItem(SynchronizationIngestServiceImpl.java:257) at org.openmrs.api.impl.SynchronizationIngestServiceImpl.processSyncRecord(SynchronizationIngestServiceImpl.java:148) at sun.reflect.GeneratedMethodAccessor620.invoke(Unknown Source) 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 $Proxy92.processSyncRecord(Unknown Source) at sun.reflect.GeneratedMethodAccessor620.invoke(Unknown Source) 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.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 $Proxy93.processSyncRecord(Unknown Source) at sun.reflect.GeneratedMethodAccessor620.invoke(Unknown Source) 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 $Proxy93.processSyncRecord(Unknown Source) at sun.reflect.GeneratedMethodAccessor620.invoke(Unknown Source) 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 $Proxy92.processSyncRecord(Unknown Source) at org.openmrs.synchronization.SyncUtilTransmission.processSyncTransmission(SyncUtilTransmission.java:521) at org.openmrs.synchronization.SyncUtilTransmission.doFullSynchronize(SyncUtilTransmission.java:427) at org.openmrs.synchronization.SynchronizationTask.execute(SynchronizationTask.java:53) at org.openmrs.scheduler.timer.TimerSchedulerTask.run(TimerSchedulerTask.java:40) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462)

Attachments

syncCreateConceptFix.patch (0.9 kB) - added by nzeyi on 06/13/08 10:56:47.
Path for create concept fix.

Change History

06/13/08 10:56:47 changed by nzeyi

  • attachment syncCreateConceptFix.patch added.

Path for create concept fix.

06/13/08 10:58:04 changed by nzeyi

Added patch to fix this ticket. Just call createConcept with isForced == true. Is there any reason we shouldn't be doing this? If not, I'll (chase) go ahead and apply this patch and commit.

06/13/08 13:12:25 changed by catullus

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in [4631].

06/13/08 13:42:50 changed by bwolfe

What, no test case? :-)

06/13/08 13:48:45 changed by catullus

assertTrue(true);

ah! it works!