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

Unable to modify/edit a Program from OpenMRS admin

    Details

    • Type: Bug
    • Status: Closed
    • Priority: TBD
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Platform 2.0.5, Core 2.1.0
    • Component/s: None
    • Labels:
      None
    • Complexity:
      Undetermined

      Description

      When we try to change the name of a Program, it throws an exception. A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance: org.openmrs.Program.allWorkflows; nested exception is org.hibernate.HibernateException

      Steps to Reproduce:


      1. Login to the OpenMRS Admin.
      2. Select "Manage Programs".
      3. Click on an existing ProgramName.
      4. Change the Name of the program to something different or add a character.
      5. Click on Save.

      Actual:

      Caused by: org.hibernate.HibernateException: A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance: org.openmrs.Program.allWorkflows
      at org.hibernate.engine.internal.Collections.processDereferencedCollection(Collections.java:114)
      at org.hibernate.engine.internal.Collections.processUnreachableCollection(Collections.java:67)
      at org.hibernate.event.internal.AbstractFlushingEventListener.flushCollections(AbstractFlushingEventListener.java:258)
      at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:103)
      at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:55)
      at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1258)
      at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:425)
      at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101)
      at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:177)
      at org.springframework.orm.hibernate4.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:584)
      ... 82 more
      13-03-2017 14:40:35 [WARN ] ProgramFormController - Error saving Program
      org.springframework.orm.hibernate4.HibernateSystemException: A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance: org.openmrs.Program.allWorkflows; nested exception is org.hibernate.HibernateException: A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance: org.openmrs.Program.allWorkflows
      at org.springframework.orm.hibernate4.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:218)
      at org.springframework.orm.hibernate4.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:730)

      Expected:

      Program name changed successfully.

        Gliffy Diagrams

          Attachments

            Attachments-Category-Modification

              Activity

                People

                • Assignee:
                  sumanmaity112 Suman Maity
                  Reporter:
                  shruthipitta shruthi pitta
                  Designated Committer:
                  Darius Jazayeri
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: