Calling the PageManager#deepCopyPage API throws a TransactionRequiredException with no transaction in progress

XMLWordPrintable

    • 2
    • Severity 3 - Minor
    • 3

      Issue Summary

      There is a transaction issue with the PageManager#deepCopyPage and PageManager#updatePageInAncestorCollections API calls.

      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. Attempt to call either
        • pageManager.deepCopyPage(pageCopyOptions, templatePage, (Page) parentPage);
        • pageManager.updatePageInAncestorCollections(templatePage, (Page) parentPage);

      Expected Results

      The API successfully moves or updates the pages provided  with no exception thrown

      Actual Results

      An exception is thrown

      Caused by: javax.persistence.TransactionRequiredException: no transaction is in progress
      at org.hibernate.internal.SessionImpl.checkTransactionNeeded(SessionImpl.java:3505)
      at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1427)
      at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1423)
      at com.atlassian.confluence.impl.content.DefaultPageManager.removePageFromAncestorCollections(DefaultPageManager.java:610)
      at com.atlassian.confluence.impl.content.DefaultPageManager.updatePageInAncestorCollections(DefaultPageManager.java:575) 

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

            Assignee:
            Mahesh Swami
            Reporter:
            Javan (Inactive)
            Votes:
            7 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved: