Re: ARV reporting problem

classic Classic list List threaded Threaded
6 messages Options
Rowan Seymour Rowan Seymour
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ARV reporting problem

Upgrading this to dev list. We're working on a custom cohort definition in the reporting framework for patients having drug orders. We added a configuration property to the definition so that we can specify a list of concepts to describe all ARV drugs:

@ConfigurationProperty(required=false)
private List<Concept> masterDrugSets;

but when we try and save the definition we get a LazyInitializationException:

An Internal Error has Occurred
org.hibernate.LazyInitializationException
failed to lazily initialize a collection of role: org.openmrs.Concept.names, no session or session was closed

More details in emails below including complete exception. We'll try using a PersonAttributeCohortDefinition and see if the same thing happens as suggested.

On 10 May 2012 16:16, Michael Seaton <[hidden email]> wrote:
Hi Rowan,

I would use the dev list for this kind of question.  Here is what I would guess is happening:

The way the RequiredDataAdvice works in OpenMRS is that it AOPs around any method in a service that implements OpenmrsService and which is like "save*(obj)" and makes sure any required data that can be automatically handled (createdBy, dateCreated, changedBy, dateChanged, etc.) are set.  It also recurses over any property which is a Collection containing objects that implement OpenmrsObject, and applies the same processing to these objects.  So that is what is happening here - by virtue of saving the CohortDefinition, OpenMRS core is saving all underlying Concepts configured on this CohortDefinition as well.

Now, there are a number of issues here:

* I would think we do not want this behavior in general for this type of Object - eg. we do not want saving Definitions in the reporting module to perform a save on any associated data.  However, I don't believe there is any way to turn this off, particularly in 1.6.x.  I think Mark ran into this recently though in another context, and may have applied some patches, so I'm copying him here to comment.  @Mark?

* Even if we can live with this behavior the way it is currently working, this stack trace is a problem.  I don't know why it is happening.  I'm in Malawi with not great connectivity at the moment, but you might want to look through JIRA in the reporting module and/or trunk to see if a similar error message has previously been reported and resolved that might indicate that updating to 1.6.x or the reporting module would help.  That being said, the CodedObsCohortDefinition and the PersonAttributeCohortDefinition both use a List<Concept> property, and don't believe there are any open tickets around these.  Can you try configuring one of these in the UI and saving it with multiple Concepts and see if you get this stack trace when saving?  Could you try upgrading a dev/test environment to 1.6.x and see if that helps as well?  Can you reproduce your bug in a unit test?

I would hit the dev list to see if Ben or anyone else remembers any specific fixes or other details around this error.  If all else fails, since you are writing your reports in code and not via the UI, you could change your configuration property from a List<Concept> masterDrugSets to a List<Integer> masterDrugSetConceptIds and this would alleviate the problem...

Mike




On 05/09/2012 10:39 AM, Rowan Seymour wrote:
Hi guys 

So Mariam and I have been trying to add that functionality to our ARV reports that we discussed before - that is being able to check that a patient's regimen is EXACTLY the specified regimen and that they are not taking additional ARVs. We can't modify the PatientSetService as this has to work with OpenMRS 1.6.x. So I added two new properties to our DrugOrderCohortDefinition class (in bold):

@ConfigurationProperty(required=false)
private List<Drug> drugList;
@ConfigurationProperty(required=false)
private List<Concept> drugSets;
@ConfigurationProperty(required=false)
private GroupMethod anyOrAll;

@ConfigurationProperty(required=false)
private Boolean exactlyAll;

@ConfigurationProperty(required=false)
private List<Concept> masterDrugSets;

with setters and getters, and then created our own service methods for checking drug orders against a master list of drugs which in our case will be the list of all ARV drugs. However we're now getting an exception whenever we save the cohort definition, i.e.

DrugOrderCohortDefinition onRegimen = new DrugOrderCohortDefinition();
onRegimen.setName("patient on........" + regimenName + "regimen");
onRegimen.addParameter(new Parameter("startDate","Start of Period", Date.class));
onRegimen.addParameter(new Parameter("endDate","End of Period", Date.class));
onRegimen.setDrugList(drugs);
onRegimen.setAnyOrAll(GroupMethod.ALL);
onRegimen.addMasterDrugSet(Context.getConceptService().getConcept(1085)); // All ARVs
onRegimen.setExactlyAll(true);
h.replaceCohortDefinition(onRegimen);

The exception is in email below from Mariam. Am hoping you can point us in the right direction. Thanks!

On 9 May 2012 15:39, Mariam N. <[hidden email]> wrote:

An Internal Error has Occurred

org.hibernate.LazyInitializationException
failed to lazily initialize a collection of role: org.openmrs.Concept.names, no session or session was closed


Consult the help document
Contact your friendly neighborhood administrator if it cannot be resolved. 

Hide stack trace 
org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350)
org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:343)
org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
org.hibernate.collection.PersistentSet.iterator(PersistentSet.java:163)
org.openmrs.Concept.getNames(Concept.java:1028)
org.openmrs.Concept.getNames(Concept.java:1012)
org.openmrs.api.handler.ConceptSaveHandler.handle(ConceptSaveHandler.java:46)
org.openmrs.api.handler.ConceptSaveHandler.handle(ConceptSaveHandler.java:1)
org.openmrs.aop.RequiredDataAdvice.recursivelyHandle(RequiredDataAdvice.java:217)
org.openmrs.aop.RequiredDataAdvice.recursivelyHandle(RequiredDataAdvice.java:234)
org.openmrs.aop.RequiredDataAdvice.recursivelyHandle(RequiredDataAdvice.java:180)
org.openmrs.aop.RequiredDataAdvice.before(RequiredDataAdvice.java:130)
org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:49)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
$Proxy8432.saveDefinition(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
$Proxy8432.saveDefinition(Unknown Source)
org.openmrs.module.rwandamohreports.reporting.Helper.replaceCohortDefinition(Helper.java:172)
org.openmrs.module.rwandamohreports.reporting.SetupHIVCareAndARTReport.createReportDefinition(SetupHIVCareAndARTReport.java:874)
org.openmrs.module.rwandamohreports.reporting.SetupHIVCareAndARTReport.setup(SetupHIVCareAndARTReport.java:66)
org.openmrs.module.rwandamohreports.web.controller.RwandaSetupReportsFormController.registerHIVCareAndARTReport(RwandaSetupReportsFormController.java:74)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:421)
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:136)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:326)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:313)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:76)
org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:58)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:112)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:574)
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527)
java.lang.Thread.run(Unknown Source)


OpenMRS Version: 1.6.3 dev Build 18591

--

Dr Rowan Seymour
Partners In Health, Rwanda

Tel: <a href="tel:%2B250783835665" value="+250783835665" target="_blank">+250783835665







--

Dr Rowan Seymour
Partners In Health, Rwanda

Tel: +250783835665



[hidden email] from OpenMRS Developers' mailing list
Ben Wolfe (openmrs) Ben Wolfe (openmrs)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ARV reporting problem

This is one reason why Mark created the annotation for ignoring some of the save handler calls.  What ticket was that and was it backported?  If it was backported, your module would just need to add an annotation that says "don't save this list of concepts when saving this object"

Ben

On Thu, May 10, 2012 at 10:33 AM, Rowan Seymour <[hidden email]> wrote:
Upgrading this to dev list. We're working on a custom cohort definition in the reporting framework for patients having drug orders. We added a configuration property to the definition so that we can specify a list of concepts to describe all ARV drugs:

@ConfigurationProperty(required=false)
private List<Concept> masterDrugSets;

but when we try and save the definition we get a LazyInitializationException:

An Internal Error has Occurred
org.hibernate.LazyInitializationException
failed to lazily initialize a collection of role: org.openmrs.Concept.names, no session or session was closed

More details in emails below including complete exception. We'll try using a PersonAttributeCohortDefinition and see if the same thing happens as suggested.

On 10 May 2012 16:16, Michael Seaton <[hidden email]> wrote:
Hi Rowan,

I would use the dev list for this kind of question.  Here is what I would guess is happening:

The way the RequiredDataAdvice works in OpenMRS is that it AOPs around any method in a service that implements OpenmrsService and which is like "save*(obj)" and makes sure any required data that can be automatically handled (createdBy, dateCreated, changedBy, dateChanged, etc.) are set.  It also recurses over any property which is a Collection containing objects that implement OpenmrsObject, and applies the same processing to these objects.  So that is what is happening here - by virtue of saving the CohortDefinition, OpenMRS core is saving all underlying Concepts configured on this CohortDefinition as well.

Now, there are a number of issues here:

* I would think we do not want this behavior in general for this type of Object - eg. we do not want saving Definitions in the reporting module to perform a save on any associated data.  However, I don't believe there is any way to turn this off, particularly in 1.6.x.  I think Mark ran into this recently though in another context, and may have applied some patches, so I'm copying him here to comment.  @Mark?

* Even if we can live with this behavior the way it is currently working, this stack trace is a problem.  I don't know why it is happening.  I'm in Malawi with not great connectivity at the moment, but you might want to look through JIRA in the reporting module and/or trunk to see if a similar error message has previously been reported and resolved that might indicate that updating to 1.6.x or the reporting module would help.  That being said, the CodedObsCohortDefinition and the PersonAttributeCohortDefinition both use a List<Concept> property, and don't believe there are any open tickets around these.  Can you try configuring one of these in the UI and saving it with multiple Concepts and see if you get this stack trace when saving?  Could you try upgrading a dev/test environment to 1.6.x and see if that helps as well?  Can you reproduce your bug in a unit test?

I would hit the dev list to see if Ben or anyone else remembers any specific fixes or other details around this error.  If all else fails, since you are writing your reports in code and not via the UI, you could change your configuration property from a List<Concept> masterDrugSets to a List<Integer> masterDrugSetConceptIds and this would alleviate the problem...

Mike




On 05/09/2012 10:39 AM, Rowan Seymour wrote:
Hi guys 

So Mariam and I have been trying to add that functionality to our ARV reports that we discussed before - that is being able to check that a patient's regimen is EXACTLY the specified regimen and that they are not taking additional ARVs. We can't modify the PatientSetService as this has to work with OpenMRS 1.6.x. So I added two new properties to our DrugOrderCohortDefinition class (in bold):

@ConfigurationProperty(required=false)
private List<Drug> drugList;
@ConfigurationProperty(required=false)
private List<Concept> drugSets;
@ConfigurationProperty(required=false)
private GroupMethod anyOrAll;

@ConfigurationProperty(required=false)
private Boolean exactlyAll;

@ConfigurationProperty(required=false)
private List<Concept> masterDrugSets;

with setters and getters, and then created our own service methods for checking drug orders against a master list of drugs which in our case will be the list of all ARV drugs. However we're now getting an exception whenever we save the cohort definition, i.e.

DrugOrderCohortDefinition onRegimen = new DrugOrderCohortDefinition();
onRegimen.setName("patient on........" + regimenName + "regimen");
onRegimen.addParameter(new Parameter("startDate","Start of Period", Date.class));
onRegimen.addParameter(new Parameter("endDate","End of Period", Date.class));
onRegimen.setDrugList(drugs);
onRegimen.setAnyOrAll(GroupMethod.ALL);
onRegimen.addMasterDrugSet(Context.getConceptService().getConcept(1085)); // All ARVs
onRegimen.setExactlyAll(true);
h.replaceCohortDefinition(onRegimen);

The exception is in email below from Mariam. Am hoping you can point us in the right direction. Thanks!

On 9 May 2012 15:39, Mariam N. <[hidden email]> wrote:

An Internal Error has Occurred

org.hibernate.LazyInitializationException
failed to lazily initialize a collection of role: org.openmrs.Concept.names, no session or session was closed


Consult the help document
Contact your friendly neighborhood administrator if it cannot be resolved. 

Hide stack trace 
org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350)
org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:343)
org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
org.hibernate.collection.PersistentSet.iterator(PersistentSet.java:163)
org.openmrs.Concept.getNames(Concept.java:1028)
org.openmrs.Concept.getNames(Concept.java:1012)
org.openmrs.api.handler.ConceptSaveHandler.handle(ConceptSaveHandler.java:46)
org.openmrs.api.handler.ConceptSaveHandler.handle(ConceptSaveHandler.java:1)
org.openmrs.aop.RequiredDataAdvice.recursivelyHandle(RequiredDataAdvice.java:217)
org.openmrs.aop.RequiredDataAdvice.recursivelyHandle(RequiredDataAdvice.java:234)
org.openmrs.aop.RequiredDataAdvice.recursivelyHandle(RequiredDataAdvice.java:180)
org.openmrs.aop.RequiredDataAdvice.before(RequiredDataAdvice.java:130)
org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:49)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
$Proxy8432.saveDefinition(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
$Proxy8432.saveDefinition(Unknown Source)
org.openmrs.module.rwandamohreports.reporting.Helper.replaceCohortDefinition(Helper.java:172)
org.openmrs.module.rwandamohreports.reporting.SetupHIVCareAndARTReport.createReportDefinition(SetupHIVCareAndARTReport.java:874)
org.openmrs.module.rwandamohreports.reporting.SetupHIVCareAndARTReport.setup(SetupHIVCareAndARTReport.java:66)
org.openmrs.module.rwandamohreports.web.controller.RwandaSetupReportsFormController.registerHIVCareAndARTReport(RwandaSetupReportsFormController.java:74)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:421)
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:136)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:326)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:313)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:76)
org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:58)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:112)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:574)
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527)
java.lang.Thread.run(Unknown Source)


OpenMRS Version: 1.6.3 dev Build 18591

--

Dr Rowan Seymour
Partners In Health, Rwanda

Tel: <a href="tel:%2B250783835665" value="+250783835665" target="_blank">+250783835665







--

Dr Rowan Seymour
Partners In Health, Rwanda

Tel: <a href="tel:%2B250783835665" value="+250783835665" target="_blank">+250783835665



[hidden email] from OpenMRS Developers' mailing list


[hidden email] from OpenMRS Developers' mailing list
Mark Goodrich-2 Mark Goodrich-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ARV reporting problem

I was running into a problem where when I was retiring an object, the retire handler was recursively handling and retiring all Collection<OpenmrsObject> associated with that object…

 

If this is indeed the problem, this annotation would be the solution.  I backported it to 1.9, but that was it.  I think it would be possible to backport to earlier releases:

 

Here’s the ticket, with a link to the commit and code review:

 

https://tickets.openmrs.org/browse/TRUNK-3174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#issue-tabs

 

fwiw, in the case below, I believe if you retired a DrugOrderCohortDefinition, it would retire all associated Concepts and Drugs, which is definitely not the functionality we want!  Might be worth testing.

 

Mark

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Ben Wolfe
Sent: Thursday, May 10, 2012 11:17 AM
To: [hidden email]
Subject: Re: [OPENMRS-DEV] ARV reporting problem

 

This is one reason why Mark created the annotation for ignoring some of the save handler calls.  What ticket was that and was it backported?  If it was backported, your module would just need to add an annotation that says "don't save this list of concepts when saving this object"

Ben

On Thu, May 10, 2012 at 10:33 AM, Rowan Seymour <[hidden email]> wrote:

Upgrading this to dev list. We're working on a custom cohort definition in the reporting framework for patients having drug orders. We added a configuration property to the definition so that we can specify a list of concepts to describe all ARV drugs:

 

@ConfigurationProperty(required=false)

private List<Concept> masterDrugSets;

 

but when we try and save the definition we get a LazyInitializationException:

 

An Internal Error has Occurred

org.hibernate.LazyInitializationException

failed to lazily initialize a collection of role: org.openmrs.Concept.names, no session or session was closed

 

More details in emails below including complete exception. We'll try using a PersonAttributeCohortDefinition and see if the same thing happens as suggested.

 

On 10 May 2012 16:16, Michael Seaton <[hidden email]> wrote:

Hi Rowan,

I would use the dev list for this kind of question.  Here is what I would guess is happening:

The way the RequiredDataAdvice works in OpenMRS is that it AOPs around any method in a service that implements OpenmrsService and which is like "save*(obj)" and makes sure any required data that can be automatically handled (createdBy, dateCreated, changedBy, dateChanged, etc.) are set.  It also recurses over any property which is a Collection containing objects that implement OpenmrsObject, and applies the same processing to these objects.  So that is what is happening here - by virtue of saving the CohortDefinition, OpenMRS core is saving all underlying Concepts configured on this CohortDefinition as well.

Now, there are a number of issues here:

* I would think we do not want this behavior in general for this type of Object - eg. we do not want saving Definitions in the reporting module to perform a save on any associated data.  However, I don't believe there is any way to turn this off, particularly in 1.6.x.  I think Mark ran into this recently though in another context, and may have applied some patches, so I'm copying him here to comment.  @Mark?

* Even if we can live with this behavior the way it is currently working, this stack trace is a problem.  I don't know why it is happening.  I'm in Malawi with not great connectivity at the moment, but you might want to look through JIRA in the reporting module and/or trunk to see if a similar error message has previously been reported and resolved that might indicate that updating to 1.6.x or the reporting module would help.  That being said, the CodedObsCohortDefinition and the PersonAttributeCohortDefinition both use a List<Concept> property, and don't believe there are any open tickets around these.  Can you try configuring one of these in the UI and saving it with multiple Concepts and see if you get this stack trace when saving?  Could you try upgrading a dev/test environment to 1.6.x and see if that helps as well?  Can you reproduce your bug in a unit test?

I would hit the dev list to see if Ben or anyone else remembers any specific fixes or other details around this error.  If all else fails, since you are writing your reports in code and not via the UI, you could change your configuration property from a List<Concept> masterDrugSets to a List<Integer> masterDrugSetConceptIds and this would alleviate the problem...

Mike





On 05/09/2012 10:39 AM, Rowan Seymour wrote:

Hi guys 

 

So Mariam and I have been trying to add that functionality to our ARV reports that we discussed before - that is being able to check that a patient's regimen is EXACTLY the specified regimen and that they are not taking additional ARVs. We can't modify the PatientSetService as this has to work with OpenMRS 1.6.x. So I added two new properties to our DrugOrderCohortDefinition class (in bold):

 

@ConfigurationProperty(required=false)

private List<Drug> drugList;

@ConfigurationProperty(required=false)

private List<Concept> drugSets;

@ConfigurationProperty(required=false)

private GroupMethod anyOrAll;

 

@ConfigurationProperty(required=false)

private Boolean exactlyAll;

 

@ConfigurationProperty(required=false)

private List<Concept> masterDrugSets;

 

with setters and getters, and then created our own service methods for checking drug orders against a master list of drugs which in our case will be the list of all ARV drugs. However we're now getting an exception whenever we save the cohort definition, i.e.

 

DrugOrderCohortDefinition onRegimen = new DrugOrderCohortDefinition();

onRegimen.setName("patient on........" + regimenName + "regimen");

onRegimen.addParameter(new Parameter("startDate","Start of Period", Date.class));

onRegimen.addParameter(new Parameter("endDate","End of Period", Date.class));

onRegimen.setDrugList(drugs);

onRegimen.setAnyOrAll(GroupMethod.ALL);

onRegimen.addMasterDrugSet(Context.getConceptService().getConcept(1085)); // All ARVs

onRegimen.setExactlyAll(true);

h.replaceCohortDefinition(onRegimen);

 

The exception is in email below from Mariam. Am hoping you can point us in the right direction. Thanks!

On 9 May 2012 15:39, Mariam N. <[hidden email]> wrote:


An Internal Error has Occurred

org.hibernate.LazyInitializationException

failed to lazily initialize a collection of role: org.openmrs.Concept.names, no session or session was closed



Consult the help document
Contact your friendly neighborhood administrator if it cannot be resolved. 

Hide stack trace 

org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350)
org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:343)
org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
org.hibernate.collection.PersistentSet.iterator(PersistentSet.java:163)
org.openmrs.Concept.getNames(Concept.java:1028)
org.openmrs.Concept.getNames(Concept.java:1012)
org.openmrs.api.handler.ConceptSaveHandler.handle(ConceptSaveHandler.java:46)
org.openmrs.api.handler.ConceptSaveHandler.handle(ConceptSaveHandler.java:1)
org.openmrs.aop.RequiredDataAdvice.recursivelyHandle(RequiredDataAdvice.java:217)
org.openmrs.aop.RequiredDataAdvice.recursivelyHandle(RequiredDataAdvice.java:234)
org.openmrs.aop.RequiredDataAdvice.recursivelyHandle(RequiredDataAdvice.java:180)
org.openmrs.aop.RequiredDataAdvice.before(RequiredDataAdvice.java:130)
org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:49)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
$Proxy8432.saveDefinition(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
$Proxy8432.saveDefinition(Unknown Source)
org.openmrs.module.rwandamohreports.reporting.Helper.replaceCohortDefinition(Helper.java:172)
org.openmrs.module.rwandamohreports.reporting.SetupHIVCareAndARTReport.createReportDefinition(SetupHIVCareAndARTReport.java:874)
org.openmrs.module.rwandamohreports.reporting.SetupHIVCareAndARTReport.setup(SetupHIVCareAndARTReport.java:66)
org.openmrs.module.rwandamohreports.web.controller.RwandaSetupReportsFormController.registerHIVCareAndARTReport(RwandaSetupReportsFormController.java:74)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:421)
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:136)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:326)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:313)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:76)
org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:58)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:112)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:574)
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527)
java.lang.Thread.run(Unknown Source)


OpenMRS Version: 1.6.3 dev Build 18591

 

--

Dr Rowan Seymour
Partners In Health, Rwanda

Tel: <a href="tel:%2B250783835665" target="_blank">+250783835665





 

--

Dr Rowan Seymour
Partners In Health, Rwanda

Tel: <a href="tel:%2B250783835665" target="_blank">+250783835665

 


[hidden email] from OpenMRS Developers' mailing list

 


[hidden email] from OpenMRS Developers' mailing list


[hidden email] from OpenMRS Developers' mailing list
Michael Seaton Michael Seaton
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ARV reporting problem

If this is the case, then this seems like a bug that we definitely want to backport down to 1.6...

On 05/10/2012 03:08 PM, Mark Goodrich wrote:

I was running into a problem where when I was retiring an object, the retire handler was recursively handling and retiring all Collection<OpenmrsObject> associated with that object…

 

If this is indeed the problem, this annotation would be the solution.  I backported it to 1.9, but that was it.  I think it would be possible to backport to earlier releases:

 

Here’s the ticket, with a link to the commit and code review:

 

https://tickets.openmrs.org/browse/TRUNK-3174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#issue-tabs

 

fwiw, in the case below, I believe if you retired a DrugOrderCohortDefinition, it would retire all associated Concepts and Drugs, which is definitely not the functionality we want!  Might be worth testing.

 

Mark

 

From: [hidden email] [[hidden email]] On Behalf Of Ben Wolfe
Sent: Thursday, May 10, 2012 11:17 AM
To: [hidden email]
Subject: Re: [OPENMRS-DEV] ARV reporting problem

 

This is one reason why Mark created the annotation for ignoring some of the save handler calls.  What ticket was that and was it backported?  If it was backported, your module would just need to add an annotation that says "don't save this list of concepts when saving this object"

Ben

On Thu, May 10, 2012 at 10:33 AM, Rowan Seymour <[hidden email]> wrote:

Upgrading this to dev list. We're working on a custom cohort definition in the reporting framework for patients having drug orders. We added a configuration property to the definition so that we can specify a list of concepts to describe all ARV drugs:

 

@ConfigurationProperty(required=false)

private List<Concept> masterDrugSets;

 

but when we try and save the definition we get a LazyInitializationException:

 

An Internal Error has Occurred

org.hibernate.LazyInitializationException

failed to lazily initialize a collection of role: org.openmrs.Concept.names, no session or session was closed

 

More details in emails below including complete exception. We'll try using a PersonAttributeCohortDefinition and see if the same thing happens as suggested.

 

On 10 May 2012 16:16, Michael Seaton <[hidden email]> wrote:

Hi Rowan,

I would use the dev list for this kind of question.  Here is what I would guess is happening:

The way the RequiredDataAdvice works in OpenMRS is that it AOPs around any method in a service that implements OpenmrsService and which is like "save*(obj)" and makes sure any required data that can be automatically handled (createdBy, dateCreated, changedBy, dateChanged, etc.) are set.  It also recurses over any property which is a Collection containing objects that implement OpenmrsObject, and applies the same processing to these objects.  So that is what is happening here - by virtue of saving the CohortDefinition, OpenMRS core is saving all underlying Concepts configured on this CohortDefinition as well.

Now, there are a number of issues here:

* I would think we do not want this behavior in general for this type of Object - eg. we do not want saving Definitions in the reporting module to perform a save on any associated data.  However, I don't believe there is any way to turn this off, particularly in 1.6.x.  I think Mark ran into this recently though in another context, and may have applied some patches, so I'm copying him here to comment.  @Mark?

* Even if we can live with this behavior the way it is currently working, this stack trace is a problem.  I don't know why it is happening.  I'm in Malawi with not great connectivity at the moment, but you might want to look through JIRA in the reporting module and/or trunk to see if a similar error message has previously been reported and resolved that might indicate that updating to 1.6.x or the reporting module would help.  That being said, the CodedObsCohortDefinition and the PersonAttributeCohortDefinition both use a List<Concept> property, and don't believe there are any open tickets around these.  Can you try configuring one of these in the UI and saving it with multiple Concepts and see if you get this stack trace when saving?  Could you try upgrading a dev/test environment to 1.6.x and see if that helps as well?  Can you reproduce your bug in a unit test?

I would hit the dev list to see if Ben or anyone else remembers any specific fixes or other details around this error.  If all else fails, since you are writing your reports in code and not via the UI, you could change your configuration property from a List<Concept> masterDrugSets to a List<Integer> masterDrugSetConceptIds and this would alleviate the problem...

Mike





On 05/09/2012 10:39 AM, Rowan Seymour wrote:

Hi guys 

 

So Mariam and I have been trying to add that functionality to our ARV reports that we discussed before - that is being able to check that a patient's regimen is EXACTLY the specified regimen and that they are not taking additional ARVs. We can't modify the PatientSetService as this has to work with OpenMRS 1.6.x. So I added two new properties to our DrugOrderCohortDefinition class (in bold):

 

@ConfigurationProperty(required=false)

private List<Drug> drugList;

@ConfigurationProperty(required=false)

private List<Concept> drugSets;

@ConfigurationProperty(required=false)

private GroupMethod anyOrAll;

 

@ConfigurationProperty(required=false)

private Boolean exactlyAll;

 

@ConfigurationProperty(required=false)

private List<Concept> masterDrugSets;

 

with setters and getters, and then created our own service methods for checking drug orders against a master list of drugs which in our case will be the list of all ARV drugs. However we're now getting an exception whenever we save the cohort definition, i.e.

 

DrugOrderCohortDefinition onRegimen = new DrugOrderCohortDefinition();

onRegimen.setName("patient on........" + regimenName + "regimen");

onRegimen.addParameter(new Parameter("startDate","Start of Period", Date.class));

onRegimen.addParameter(new Parameter("endDate","End of Period", Date.class));

onRegimen.setDrugList(drugs);

onRegimen.setAnyOrAll(GroupMethod.ALL);

onRegimen.addMasterDrugSet(Context.getConceptService().getConcept(1085)); // All ARVs

onRegimen.setExactlyAll(true);

h.replaceCohortDefinition(onRegimen);

 

The exception is in email below from Mariam. Am hoping you can point us in the right direction. Thanks!

On 9 May 2012 15:39, Mariam N. <[hidden email]> wrote:


An Internal Error has Occurred

org.hibernate.LazyInitializationException

failed to lazily initialize a collection of role: org.openmrs.Concept.names, no session or session was closed



Consult the help document
Contact your friendly neighborhood administrator if it cannot be resolved. 

Hide stack trace 

org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350)
org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:343)
org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
org.hibernate.collection.PersistentSet.iterator(PersistentSet.java:163)
org.openmrs.Concept.getNames(Concept.java:1028)
org.openmrs.Concept.getNames(Concept.java:1012)
org.openmrs.api.handler.ConceptSaveHandler.handle(ConceptSaveHandler.java:46)
org.openmrs.api.handler.ConceptSaveHandler.handle(ConceptSaveHandler.java:1)
org.openmrs.aop.RequiredDataAdvice.recursivelyHandle(RequiredDataAdvice.java:217)
org.openmrs.aop.RequiredDataAdvice.recursivelyHandle(RequiredDataAdvice.java:234)
org.openmrs.aop.RequiredDataAdvice.recursivelyHandle(RequiredDataAdvice.java:180)
org.openmrs.aop.RequiredDataAdvice.before(RequiredDataAdvice.java:130)
org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:49)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
$Proxy8432.saveDefinition(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
$Proxy8432.saveDefinition(Unknown Source)
org.openmrs.module.rwandamohreports.reporting.Helper.replaceCohortDefinition(Helper.java:172)
org.openmrs.module.rwandamohreports.reporting.SetupHIVCareAndARTReport.createReportDefinition(SetupHIVCareAndARTReport.java:874)
org.openmrs.module.rwandamohreports.reporting.SetupHIVCareAndARTReport.setup(SetupHIVCareAndARTReport.java:66)
org.openmrs.module.rwandamohreports.web.controller.RwandaSetupReportsFormController.registerHIVCareAndARTReport(RwandaSetupReportsFormController.java:74)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:421)
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:136)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:326)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:313)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:76)
org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:58)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:112)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:574)
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527)
java.lang.Thread.run(Unknown Source)


OpenMRS Version: 1.6.3 dev Build 18591

 

--

Dr Rowan Seymour
Partners In Health, Rwanda

Tel: <a moz-do-not-send="true" href="tel:%2B250783835665" target="_blank">+250783835665





 

--

Dr Rowan Seymour
Partners In Health, Rwanda

Tel: <a moz-do-not-send="true" href="tel:%2B250783835665" target="_blank">+250783835665

 


[hidden email] from OpenMRS Developers' mailing list

 


[hidden email] from OpenMRS Developers' mailing list


[hidden email] from OpenMRS Developers' mailing list

[hidden email] from OpenMRS Developers' mailing list
Rowan Seymour-2 Rowan Seymour-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ARV reporting problem

Ok so we circumvented that problem by replacing the collection of Concepts with a collection of Integers. Next problem...

When the report is evaluating that cohort we get the following java.lang.AbstractMethodError in the log file. It occurs when BaseDefinitionService tries to call the evaluate method of our DrugOrderCohortDefinitionEvaluator class which you can see at:


Any ideas? We're running reporting 0.7.1.1 and the module is building against reporting-0.7.1.jar

Exception in log file is:

INFO - LoggingAdvice.invoke(102) |2012-05-18 10:40:50,315| In method CohortDefinitionService.evaluate. Arguments: Mapped=Patients currently taking exactly ALL of [Nevirapine sirop (10mg/ml) , Stavudine(30) , Lamivudine(150)]  [startDate -> ${startDate},endDate -> ${endDate}], EvaluationContext=EvaluationContext[evaluationDate=Fri May 18 10:40:50 EEST 2012,startDate->Tue May 01 00:00:00 EEST 2012 (Date),location->ARBEF Butare (Location),endDate->Fri May 18 00:00:00 EEST 2012 (Date)], 
ERROR - LoggingAdvice.invoke(111) |2012-05-18 10:40:50,323| An error occurred while executing this method. Error message: null
java.lang.AbstractMethodError
at org.openmrs.module.reporting.definition.service.BaseDefinitionService.evaluate(BaseDefinitionService.java:224)
at org.openmrs.module.reporting.cohort.definition.service.CohortDefinitionServiceImpl.evaluate(CohortDefinitionServiceImpl.java:46)
at org.openmrs.module.reporting.cohort.definition.service.CohortDefinitionServiceImpl.evaluate(CohortDefinitionServiceImpl.java:29)
at org.openmrs.module.reporting.definition.service.BaseDefinitionService.evaluate(BaseDefinitionService.java:246)
at org.openmrs.module.reporting.cohort.definition.service.CohortDefinitionServiceImpl.evaluate(CohortDefinitionServiceImpl.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
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.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 $Proxy293.evaluate(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
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 $Proxy383.evaluate(Unknown Source)
at org.openmrs.module.reporting.indicator.evaluator.CohortIndicatorEvaluator.evaluate(CohortIndicatorEvaluator.java:94)
at org.openmrs.module.reporting.indicator.evaluator.CohortIndicatorEvaluator.evaluate(CohortIndicatorEvaluator.java:38)
at org.openmrs.module.reporting.definition.service.BaseDefinitionService.evaluate(BaseDefinitionService.java:230)
at org.openmrs.module.reporting.indicator.service.IndicatorServiceImpl.evaluate(IndicatorServiceImpl.java:49)
at org.openmrs.module.reporting.indicator.service.IndicatorServiceImpl.evaluate(IndicatorServiceImpl.java:30)
at org.openmrs.module.reporting.definition.service.BaseDefinitionService.evaluate(BaseDefinitionService.java:246)
at org.openmrs.module.reporting.indicator.service.IndicatorServiceImpl.evaluate(IndicatorServiceImpl.java:58)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
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.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 $Proxy295.evaluate(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
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 $Proxy385.evaluate(Unknown Source)
at org.openmrs.module.reporting.dataset.definition.evaluator.CohortIndicatorDataSetEvaluator.evaluate(CohortIndicatorDataSetEvaluator.java:81)
at org.openmrs.module.reporting.dataset.definition.evaluator.CohortIndicatorDataSetEvaluator.evaluate(CohortIndicatorDataSetEvaluator.java:31)
at org.openmrs.module.reporting.definition.service.BaseDefinitionService.evaluate(BaseDefinitionService.java:230)
at org.openmrs.module.reporting.dataset.definition.service.DataSetDefinitionServiceImpl.evaluate(DataSetDefinitionServiceImpl.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
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.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 $Proxy294.evaluate(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
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 $Proxy384.evaluate(Unknown Source)
at org.openmrs.module.reporting.report.definition.service.ReportDefinitionServiceImpl.evaluate(ReportDefinitionServiceImpl.java:174)
at org.openmrs.module.reporting.report.definition.service.ReportDefinitionServiceImpl.evaluate(ReportDefinitionServiceImpl.java:36)
at org.openmrs.module.reporting.definition.service.BaseDefinitionService.evaluate(BaseDefinitionService.java:246)
at org.openmrs.module.reporting.report.definition.service.ReportDefinitionServiceImpl.evaluate(ReportDefinitionServiceImpl.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
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.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 $Proxy286.evaluate(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
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 $Proxy376.evaluate(Unknown Source)
at org.openmrs.module.reporting.report.service.ReportServiceImpl.runReport(ReportServiceImpl.java:402)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
at $Proxy347.runReport(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
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.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 $Proxy348.runReport(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
at $Proxy348.runReport(Unknown Source)
at org.openmrs.module.reporting.report.task.RunQueuedReportsTask.execute(RunQueuedReportsTask.java:57)
at org.openmrs.module.reporting.report.task.AbstractReportsTask.run(AbstractReportsTask.java:39)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)
INFO - LoggingAdvice.invoke(127) |2012-05-18 10:40:50,325| Exiting method evaluate

On 10 May 2012 21:31, Michael Seaton <[hidden email]> wrote:
If this is the case, then this seems like a bug that we definitely want to backport down to 1.6...


On 05/10/2012 03:08 PM, Mark Goodrich wrote:

I was running into a problem where when I was retiring an object, the retire handler was recursively handling and retiring all Collection<OpenmrsObject> associated with that object…

 

If this is indeed the problem, this annotation would be the solution.  I backported it to 1.9, but that was it.  I think it would be possible to backport to earlier releases:

 

Here’s the ticket, with a link to the commit and code review:

 

https://tickets.openmrs.org/browse/TRUNK-3174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#issue-tabs

 

fwiw, in the case below, I believe if you retired a DrugOrderCohortDefinition, it would retire all associated Concepts and Drugs, which is definitely not the functionality we want!  Might be worth testing.

 

Mark

 

From: [hidden email] [[hidden email]] On Behalf Of Ben Wolfe
Sent: Thursday, May 10, 2012 11:17 AM
To: [hidden email]
Subject: Re: [OPENMRS-DEV] ARV reporting problem

 

This is one reason why Mark created the annotation for ignoring some of the save handler calls.  What ticket was that and was it backported?  If it was backported, your module would just need to add an annotation that says "don't save this list of concepts when saving this object"

Ben

On Thu, May 10, 2012 at 10:33 AM, Rowan Seymour <[hidden email]> wrote:

Upgrading this to dev list. We're working on a custom cohort definition in the reporting framework for patients having drug orders. We added a configuration property to the definition so that we can specify a list of concepts to describe all ARV drugs:

 

@ConfigurationProperty(required=false)

private List<Concept> masterDrugSets;

 

but when we try and save the definition we get a LazyInitializationException:

 

An Internal Error has Occurred

org.hibernate.LazyInitializationException

failed to lazily initialize a collection of role: org.openmrs.Concept.names, no session or session was closed

 

More details in emails below including complete exception. We'll try using a PersonAttributeCohortDefinition and see if the same thing happens as suggested.

 

On 10 May 2012 16:16, Michael Seaton <[hidden email]> wrote:

Hi Rowan,

I would use the dev list for this kind of question.  Here is what I would guess is happening:

The way the RequiredDataAdvice works in OpenMRS is that it AOPs around any method in a service that implements OpenmrsService and which is like "save*(obj)" and makes sure any required data that can be automatically handled (createdBy, dateCreated, changedBy, dateChanged, etc.) are set.  It also recurses over any property which is a Collection containing objects that implement OpenmrsObject, and applies the same processing to these objects.  So that is what is happening here - by virtue of saving the CohortDefinition, OpenMRS core is saving all underlying Concepts configured on this CohortDefinition as well.

Now, there are a number of issues here:

* I would think we do not want this behavior in general for this type of Object - eg. we do not want saving Definitions in the reporting module to perform a save on any associated data.  However, I don't believe there is any way to turn this off, particularly in 1.6.x.  I think Mark ran into this recently though in another context, and may have applied some patches, so I'm copying him here to comment.  @Mark?

* Even if we can live with this behavior the way it is currently working, this stack trace is a problem.  I don't know why it is happening.  I'm in Malawi with not great connectivity at the moment, but you might want to look through JIRA in the reporting module and/or trunk to see if a similar error message has previously been reported and resolved that might indicate that updating to 1.6.x or the reporting module would help.  That being said, the CodedObsCohortDefinition and the PersonAttributeCohortDefinition both use a List<Concept> property, and don't believe there are any open tickets around these.  Can you try configuring one of these in the UI and saving it with multiple Concepts and see if you get this stack trace when saving?  Could you try upgrading a dev/test environment to 1.6.x and see if that helps as well?  Can you reproduce your bug in a unit test?

I would hit the dev list to see if Ben or anyone else remembers any specific fixes or other details around this error.  If all else fails, since you are writing your reports in code and not via the UI, you could change your configuration property from a List<Concept> masterDrugSets to a List<Integer> masterDrugSetConceptIds and this would alleviate the problem...

Mike





On 05/09/2012 10:39 AM, Rowan Seymour wrote:

Hi guys 

 

So Mariam and I have been trying to add that functionality to our ARV reports that we discussed before - that is being able to check that a patient's regimen is EXACTLY the specified regimen and that they are not taking additional ARVs. We can't modify the PatientSetService as this has to work with OpenMRS 1.6.x. So I added two new properties to our DrugOrderCohortDefinition class (in bold):

 

@ConfigurationProperty(required=false)

private List<Drug> drugList;

@ConfigurationProperty(required=false)

private List<Concept> drugSets;

@ConfigurationProperty(required=false)

private GroupMethod anyOrAll;

 

@ConfigurationProperty(required=false)

private Boolean exactlyAll;

 

@ConfigurationProperty(required=false)

private List<Concept> masterDrugSets;

 

with setters and getters, and then created our own service methods for checking drug orders against a master list of drugs which in our case will be the list of all ARV drugs. However we're now getting an exception whenever we save the cohort definition, i.e.

 

DrugOrderCohortDefinition onRegimen = new DrugOrderCohortDefinition();

onRegimen.setName("patient on........" + regimenName + "regimen");

onRegimen.addParameter(new Parameter("startDate","Start of Period", Date.class));

onRegimen.addParameter(new Parameter("endDate","End of Period", Date.class));

onRegimen.setDrugList(drugs);

onRegimen.setAnyOrAll(GroupMethod.ALL);

onRegimen.addMasterDrugSet(Context.getConceptService().getConcept(1085)); // All ARVs

onRegimen.setExactlyAll(true);

h.replaceCohortDefinition(onRegimen);

 

The exception is in email below from Mariam. Am hoping you can point us in the right direction. Thanks!

On 9 May 2012 15:39, Mariam N. <[hidden email]> wrote:


An Internal Error has Occurred

org.hibernate.LazyInitializationException

failed to lazily initialize a collection of role: org.openmrs.Concept.names, no session or session was closed



Consult the help document
Contact your friendly neighborhood administrator if it cannot be resolved. 

Hide stack trace 

org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350)
org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:343)
org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
org.hibernate.collection.PersistentSet.iterator(PersistentSet.java:163)
org.openmrs.Concept.getNames(Concept.java:1028)
org.openmrs.Concept.getNames(Concept.java:1012)
org.openmrs.api.handler.ConceptSaveHandler.handle(ConceptSaveHandler.java:46)
org.openmrs.api.handler.ConceptSaveHandler.handle(ConceptSaveHandler.java:1)
org.openmrs.aop.RequiredDataAdvice.recursivelyHandle(RequiredDataAdvice.java:217)
org.openmrs.aop.RequiredDataAdvice.recursivelyHandle(RequiredDataAdvice.java:234)
org.openmrs.aop.RequiredDataAdvice.recursivelyHandle(RequiredDataAdvice.java:180)
org.openmrs.aop.RequiredDataAdvice.before(RequiredDataAdvice.java:130)
org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:49)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
$Proxy8432.saveDefinition(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
$Proxy8432.saveDefinition(Unknown Source)
org.openmrs.module.rwandamohreports.reporting.Helper.replaceCohortDefinition(Helper.java:172)
org.openmrs.module.rwandamohreports.reporting.SetupHIVCareAndARTReport.createReportDefinition(SetupHIVCareAndARTReport.java:874)
org.openmrs.module.rwandamohreports.reporting.SetupHIVCareAndARTReport.setup(SetupHIVCareAndARTReport.java:66)
org.openmrs.module.rwandamohreports.web.controller.RwandaSetupReportsFormController.registerHIVCareAndARTReport(RwandaSetupReportsFormController.java:74)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:421)
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:136)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:326)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:313)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:76)
org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:58)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:112)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:574)
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527)
java.lang.Thread.run(Unknown Source)


OpenMRS Version: 1.6.3 dev Build 18591

 

--

Dr Rowan Seymour
Partners In Health, Rwanda

Tel: <a href="tel:%2B250783835665" target="_blank">+250783835665





 

--

Dr Rowan Seymour
Partners In Health, Rwanda

Tel: <a href="tel:%2B250783835665" target="_blank">+250783835665

 


[hidden email] from OpenMRS Developers' mailing list

 


[hidden email] from OpenMRS Developers' mailing list


[hidden email] from OpenMRS Developers' mailing list

[hidden email] from OpenMRS Developers' mailing list



--
Rowan Seymour
tel: <a href="tel:%2B250%20783835665" value="+250783835665" target="_blank">+250 783835665
http://twitter.com/rowanseymour


[hidden email] from OpenMRS Developers' mailing list
Michael Seaton Michael Seaton
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ARV reporting problem

Hi Rowan,

I've never encountered an AbstractMethodError before, but from the javadoc:

"Thrown when an application tries to call an abstract method. Normally, this error is caught by the compiler; this error can only occur at run time if the definition of some class has incompatibly changed since the currently executing method was last compiled."

Could you possibly have multiple versions of the reporting module jar on the classpath?  Perhaps you are including one or more reporting-xxx.jar files in the lib folder of your modules (if not mavenized) or the pom misconfigured (if mavenized)?  This would be my first guess.

Cheers,
Mike

________________________________________
From: [hidden email] [[hidden email]] On Behalf Of Rowan Seymour [[hidden email]]
Sent: Friday, May 18, 2012 5:16 AM
To: [hidden email]
Subject: Re: [OPENMRS-DEV] ARV reporting problem

Ok so we circumvented that problem by replacing the collection of Concepts with a collection of Integers. Next problem...

When the report is evaluating that cohort we get the following java.lang.AbstractMethodError in the log file. It occurs when BaseDefinitionService tries to call the evaluate method of our DrugOrderCohortDefinitionEvaluator class which you can see at:

http://test.emr.moh.gov.rw/svn/modules/rwandaMoHreports/src/org/openmrs/module/rwandamohreports/definition/evaluator/DrugOrderCohortDefinitionEvaluator.java

Any ideas? We're running reporting 0.7.1.1 and the module is building against reporting-0.7.1.jar

Exception in log file is:

INFO - LoggingAdvice.invoke(102) |2012-05-18 10:40:50,315| In method CohortDefinitionService.evaluate. Arguments: Mapped=Patients currently taking exactly ALL of [Nevirapine sirop (10mg/ml) , Stavudine(30) , Lamivudine(150)]  [startDate -> ${startDate},endDate -> ${endDate}], EvaluationContext=EvaluationContext[evaluationDate=Fri May 18 10:40:50 EEST 2012,startDate->Tue May 01 00:00:00 EEST 2012 (Date),location->ARBEF Butare (Location),endDate->Fri May 18 00:00:00 EEST 2012 (Date)],
ERROR - LoggingAdvice.invoke(111) |2012-05-18 10:40:50,323| An error occurred while executing this method. Error message: null
java.lang.AbstractMethodError
at org.openmrs.module.reporting.definition.service.BaseDefinitionService.evaluate(BaseDefinitionService.java:224)
at org.openmrs.module.reporting.cohort.definition.service.CohortDefinitionServiceImpl.evaluate(CohortDefinitionServiceImpl.java:46)
at org.openmrs.module.reporting.cohort.definition.service.CohortDefinitionServiceImpl.evaluate(CohortDefinitionServiceImpl.java:29)
at org.openmrs.module.reporting.definition.service.BaseDefinitionService.evaluate(BaseDefinitionService.java:246)
at org.openmrs.module.reporting.cohort.definition.service.CohortDefinitionServiceImpl.evaluate(CohortDefinitionServiceImpl.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
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.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 $Proxy293.evaluate(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
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 $Proxy383.evaluate(Unknown Source)
at org.openmrs.module.reporting.indicator.evaluator.CohortIndicatorEvaluator.evaluate(CohortIndicatorEvaluator.java:94)
at org.openmrs.module.reporting.indicator.evaluator.CohortIndicatorEvaluator.evaluate(CohortIndicatorEvaluator.java:38)
at org.openmrs.module.reporting.definition.service.BaseDefinitionService.evaluate(BaseDefinitionService.java:230)
at org.openmrs.module.reporting.indicator.service.IndicatorServiceImpl.evaluate(IndicatorServiceImpl.java:49)
at org.openmrs.module.reporting.indicator.service.IndicatorServiceImpl.evaluate(IndicatorServiceImpl.java:30)
at org.openmrs.module.reporting.definition.service.BaseDefinitionService.evaluate(BaseDefinitionService.java:246)
at org.openmrs.module.reporting.indicator.service.IndicatorServiceImpl.evaluate(IndicatorServiceImpl.java:58)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
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.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 $Proxy295.evaluate(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
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 $Proxy385.evaluate(Unknown Source)
at org.openmrs.module.reporting.dataset.definition.evaluator.CohortIndicatorDataSetEvaluator.evaluate(CohortIndicatorDataSetEvaluator.java:81)
at org.openmrs.module.reporting.dataset.definition.evaluator.CohortIndicatorDataSetEvaluator.evaluate(CohortIndicatorDataSetEvaluator.java:31)
at org.openmrs.module.reporting.definition.service.BaseDefinitionService.evaluate(BaseDefinitionService.java:230)
at org.openmrs.module.reporting.dataset.definition.service.DataSetDefinitionServiceImpl.evaluate(DataSetDefinitionServiceImpl.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
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.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 $Proxy294.evaluate(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
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 $Proxy384.evaluate(Unknown Source)
at org.openmrs.module.reporting.report.definition.service.ReportDefinitionServiceImpl.evaluate(ReportDefinitionServiceImpl.java:174)
at org.openmrs.module.reporting.report.definition.service.ReportDefinitionServiceImpl.evaluate(ReportDefinitionServiceImpl.java:36)
at org.openmrs.module.reporting.definition.service.BaseDefinitionService.evaluate(BaseDefinitionService.java:246)
at org.openmrs.module.reporting.report.definition.service.ReportDefinitionServiceImpl.evaluate(ReportDefinitionServiceImpl.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
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.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 $Proxy286.evaluate(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
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 $Proxy376.evaluate(Unknown Source)
at org.openmrs.module.reporting.report.service.ReportServiceImpl.runReport(ReportServiceImpl.java:402)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
at $Proxy347.runReport(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
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.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 $Proxy348.runReport(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
at $Proxy348.runReport(Unknown Source)
at org.openmrs.module.reporting.report.task.RunQueuedReportsTask.execute(RunQueuedReportsTask.java:57)
at org.openmrs.module.reporting.report.task.AbstractReportsTask.run(AbstractReportsTask.java:39)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)
INFO - LoggingAdvice.invoke(127) |2012-05-18 10:40:50,325| Exiting method evaluate

On 10 May 2012 21:31, Michael Seaton <[hidden email]<mailto:[hidden email]>> wrote:
If this is the case, then this seems like a bug that we definitely want to backport down to 1.6...


On 05/10/2012 03:08 PM, Mark Goodrich wrote:
I was running into a problem where when I was retiring an object, the retire handler was recursively handling and retiring all Collection<OpenmrsObject> associated with that object...

If this is indeed the problem, this annotation would be the solution.  I backported it to 1.9, but that was it.  I think it would be possible to backport to earlier releases:

Here's the ticket, with a link to the commit and code review:

https://tickets.openmrs.org/browse/TRUNK-3174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#issue-tabs

fwiw, in the case below, I believe if you retired a DrugOrderCohortDefinition, it would retire all associated Concepts and Drugs, which is definitely not the functionality we want!  Might be worth testing.

Mark

From: [hidden email]<mailto:[hidden email]> [mailto:[hidden email]] On Behalf Of Ben Wolfe
Sent: Thursday, May 10, 2012 11:17 AM
To: [hidden email]<mailto:[hidden email]>
Subject: Re: [OPENMRS-DEV] ARV reporting problem

This is one reason why Mark created the annotation for ignoring some of the save handler calls.  What ticket was that and was it backported?  If it was backported, your module would just need to add an annotation that says "don't save this list of concepts when saving this object"

Ben
On Thu, May 10, 2012 at 10:33 AM, Rowan Seymour <[hidden email]<mailto:[hidden email]>> wrote:
Upgrading this to dev list. We're working on a custom cohort definition in the reporting framework for patients having drug orders. We added a configuration property to the definition so that we can specify a list of concepts to describe all ARV drugs:

@ConfigurationProperty(required=false)
private List<Concept> masterDrugSets;

but when we try and save the definition we get a LazyInitializationException:

An Internal Error has Occurred
org.hibernate.LazyInitializationException
failed to lazily initialize a collection of role: org.openmrs.Concept.names, no session or session was closed

More details in emails below including complete exception. We'll try using a PersonAttributeCohortDefinition and see if the same thing happens as suggested.

On 10 May 2012 16:16, Michael Seaton <[hidden email]<mailto:[hidden email]>> wrote:
Hi Rowan,

I would use the dev list for this kind of question.  Here is what I would guess is happening:

The way the RequiredDataAdvice works in OpenMRS is that it AOPs around any method in a service that implements OpenmrsService and which is like "save*(obj)" and makes sure any required data that can be automatically handled (createdBy, dateCreated, changedBy, dateChanged, etc.) are set.  It also recurses over any property which is a Collection containing objects that implement OpenmrsObject, and applies the same processing to these objects.  So that is what is happening here - by virtue of saving the CohortDefinition, OpenMRS core is saving all underlying Concepts configured on this CohortDefinition as well.

Now, there are a number of issues here:

* I would think we do not want this behavior in general for this type of Object - eg. we do not want saving Definitions in the reporting module to perform a save on any associated data.  However, I don't believe there is any way to turn this off, particularly in 1.6.x.  I think Mark ran into this recently though in another context, and may have applied some patches, so I'm copying him here to comment.  @Mark?

* Even if we can live with this behavior the way it is currently working, this stack trace is a problem.  I don't know why it is happening.  I'm in Malawi with not great connectivity at the moment, but you might want to look through JIRA in the reporting module and/or trunk to see if a similar error message has previously been reported and resolved that might indicate that updating to 1.6.x or the reporting module would help.  That being said, the CodedObsCohortDefinition and the PersonAttributeCohortDefinition both use a List<Concept> property, and don't believe there are any open tickets around these.  Can you try configuring one of these in the UI and saving it with multiple Concepts and see if you get this stack trace when saving?  Could you try upgrading a dev/test environment to 1.6.x and see if that helps as well?  Can you reproduce your bug in a unit test?

I would hit the dev list to see if Ben or anyone else remembers any specific fixes or other details around this error.  If all else fails, since you are writing your reports in code and not via the UI, you could change your configuration property from a List<Concept> masterDrugSets to a List<Integer> masterDrugSetConceptIds and this would alleviate the problem...

Mike




On 05/09/2012 10:39 AM, Rowan Seymour wrote:
Hi guys

So Mariam and I have been trying to add that functionality to our ARV reports that we discussed before - that is being able to check that a patient's regimen is EXACTLY the specified regimen and that they are not taking additional ARVs. We can't modify the PatientSetService as this has to work with OpenMRS 1.6.x. So I added two new properties to our DrugOrderCohortDefinition class (in bold):

@ConfigurationProperty(required=false)
private List<Drug> drugList;
@ConfigurationProperty(required=false)
private List<Concept> drugSets;
@ConfigurationProperty(required=false)
private GroupMethod anyOrAll;

@ConfigurationProperty(required=false)
private Boolean exactlyAll;

@ConfigurationProperty(required=false)
private List<Concept> masterDrugSets;

with setters and getters, and then created our own service methods for checking drug orders against a master list of drugs which in our case will be the list of all ARV drugs. However we're now getting an exception whenever we save the cohort definition, i.e.

DrugOrderCohortDefinition onRegimen = new DrugOrderCohortDefinition();
onRegimen.setName("patient on........" + regimenName + "regimen");
onRegimen.addParameter(new Parameter("startDate","Start of Period", Date.class));
onRegimen.addParameter(new Parameter("endDate","End of Period", Date.class));
onRegimen.setDrugList(drugs);
onRegimen.setAnyOrAll(GroupMethod.ALL);
onRegimen.addMasterDrugSet(Context.getConceptService().getConcept(1085)); // All ARVs
onRegimen.setExactlyAll(true);
h.replaceCohortDefinition(onRegimen);

The exception is in email below from Mariam. Am hoping you can point us in the right direction. Thanks!
On 9 May 2012 15:39, Mariam N. <[hidden email]<mailto:[hidden email]>> wrote:

An Internal Error has Occurred
org.hibernate.LazyInitializationException

failed to lazily initialize a collection of role: org.openmrs.Concept.names, no session or session was closed


Consult the help document<http://localhost:8080/openmrs/help.htm>.
Contact your friendly neighborhood administrator if it cannot be resolved.

Hide stack trace<http://localhost:8080/openmrs/module/rwandamohreports/register_HIVCareAndARTReport.form>
org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350)
org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:343)
org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
org.hibernate.collection.PersistentSet.iterator(PersistentSet.java:163)
org.openmrs.Concept.getNames(Concept.java:1028)
org.openmrs.Concept.getNames(Concept.java:1012)
org.openmrs.api.handler.ConceptSaveHandler.handle(ConceptSaveHandler.java:46)
org.openmrs.api.handler.ConceptSaveHandler.handle(ConceptSaveHandler.java:1)
org.openmrs.aop.RequiredDataAdvice.recursivelyHandle(RequiredDataAdvice.java:217)
org.openmrs.aop.RequiredDataAdvice.recursivelyHandle(RequiredDataAdvice.java:234)
org.openmrs.aop.RequiredDataAdvice.recursivelyHandle(RequiredDataAdvice.java:180)
org.openmrs.aop.RequiredDataAdvice.before(RequiredDataAdvice.java:130)
org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:49)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
$Proxy8432.saveDefinition(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
$Proxy8432.saveDefinition(Unknown Source)
org.openmrs.module.rwandamohreports.reporting.Helper.replaceCohortDefinition(Helper.java:172)
org.openmrs.module.rwandamohreports.reporting.SetupHIVCareAndARTReport.createReportDefinition(SetupHIVCareAndARTReport.java:874)
org.openmrs.module.rwandamohreports.reporting.SetupHIVCareAndARTReport.setup(SetupHIVCareAndARTReport.java:66)
org.openmrs.module.rwandamohreports.web.controller.RwandaSetupReportsFormController.registerHIVCareAndARTReport(RwandaSetupReportsFormController.java:74)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:421)
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:136)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:326)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:313)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:76)
org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:58)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:112)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:574)
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527)
java.lang.Thread.run(Unknown Source)


OpenMRS Version: 1.6.3 dev Build 18591

--

Dr Rowan Seymour
Partners In Health, Rwanda
Tel: +250783835665<tel:%2B250783835665>





--

Dr Rowan Seymour
Partners In Health, Rwanda
Tel: +250783835665<tel:%2B250783835665>

________________________________
Click here to unsubscribe<mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l> from OpenMRS Developers' mailing list

________________________________
Click here to unsubscribe<mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l> from OpenMRS Developers' mailing list
________________________________
Click here to unsubscribe<mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l> from OpenMRS Developers' mailing list
________________________________
Click here to unsubscribe<mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l> from OpenMRS Developers' mailing list



--
Rowan Seymour
tel: +250 783835665<tel:%2B250%20783835665>
http://twitter.com/rowanseymour

________________________________
Click here to unsubscribe<mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l> from OpenMRS Developers' mailing list

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]
Loading...