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

HibernatePatientSetDAO method getPatientAttributes fails when the passed input Cohort is large

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: TBD
    • Resolution: Fixed
    • Affects Version/s: OpenMRS 1.6.0, OpenMRS 1.6.1, OpenMRS 1.6.2, OpenMRS 1.7.0
    • Fix Version/s: OpenMRS 1.6.3
    • Component/s: None
    • Labels:
      None
    • Complexity:
      Undetermined

      Description

      When you pass in a large input cohort into this method, the Hibernate query fails with the following error:

      java.lang.StackOverflowError
      at org.hibernate.hql.ast.util.NodeTraverser.visitDepthFirst(NodeTraverser.java:37)
      at org.hibernate.hql.ast.util.NodeTraverser.visitDepthFirst(NodeTraverser.java:41)
      at org.hibernate.hql.ast.util.NodeTraverser.visitDepthFirst(NodeTraverser.java:41)
      at org.hibernate.hql.ast.util.NodeTraverser.visitDepthFirst(NodeTraverser.java:42)
      .....

      This is due to the fact that it is adding an "in" clause of every person id to the HQL query, and it is unable to handle this.

      This causes any Data Exports and related Birt reports to fail if they include person attributes and large cohorts of patients.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: