Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-96561

Unable to Copy the page if it has more than 10 child pages.

      Issue Summary

      This is reproducible on Data Center: Yes

      Steps to Reproduce

      1. Install latest Confluence
      2. Create a page and then create 11 child pages for the parent page
      3. Click on the parent page > Click ... on the right top corner > Copy
      4. You will see Include child pages will be greyed out and copy action will be kept running.

      Expected Results

      The page should get copied as expected.

      Actual Results

      The below exception is thrown in the xxxxxxx.log file:

      2024-07-24 13:48:18,568 WARN [http-nio-8090-exec-10 url: /rest/api/content/98344/child/page; user: admin] [engine.loading.internal.LoadContexts] cleanup HHH000100: Fail-safe cleanup (collections) : org.hibernate.engine.loading.internal.CollectionLoadContext@4814ed11<rs=HikariProxyResultSet@237923064 wrapping org.postgresql.jdbc.PgResultSet@24ae041a>
       -- url: /rest/api/content/98344/child/page | userName: admin | referer: https://instenv-330877-erx7.instenv.internal.atlassian.com/display/TEST/Test | traceId: b280773cec4b39f3
      2024-07-24 13:48:18,571 WARN [http-nio-8090-exec-10 url: /rest/api/content/98344/child/page; user: admin] [confluence.impl.hibernate.ConfluenceHibernateTransactionManager] doRollback Performing rollback. Transactions:\n  ->[com.atlassian.confluence.api.impl.service.content.ChildContentServiceImpl$ChildContentFinderImpl.fetchMany]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT,readOnly (Session #2010855888)
       -- url: /rest/api/content/98344/child/page | userName: admin | referer: https://instenv-330877-erx7.instenv.internal.atlassian.com/display/TEST/Test | traceId: b280773cec4b39f3
      2024-07-24 13:48:18,575 ERROR [http-nio-8090-exec-10 url: /rest/api/content/98344/child/page; user: admin] [rest.api.model.ExceptionConverter] convertServiceException No status code found for exception, converting to internal server error : 
       -- url: /rest/api/content/98344/child/page | userName: admin | referer: https://instenv-330877-erx7.instenv.internal.atlassian.com/display/TEST/Test | traceId: b280773cec4b39f3
      com.atlassian.confluence.api.impl.pagination.BatchExecutionException: Error during batch execution with session management
              at com.atlassian.confluence.api.impl.pagination.PaginationServiceImpl.executeBatchWithSessionManagement(PaginationServiceImpl.java:281)
              at com.atlassian.confluence.api.impl.pagination.PaginationServiceImpl.lambda$doRequestInTransaction$1(PaginationServiceImpl.java:263)
              at com.atlassian.confluence.api.impl.ReadOnlyAndReadWriteTransactionConversionTemplate.executeInReadOnly(ReadOnlyAndReadWriteTransactionConversionTemplate.java:38)
              at com.atlassian.confluence.api.impl.pagination.PaginationServiceImpl.doRequestInTransaction(PaginationServiceImpl.java:261)
              at com.atlassian.confluence.api.impl.pagination.PaginationServiceImpl.doPaginationListRequest(PaginationServiceImpl.java:96)
              at com.atlassian.confluence.api.service.pagination.PaginationService.performPaginationListRequest(PaginationService.java:113)
              at com.atlassian.confluence.api.impl.service.content.typebinding.PageContentTypeApiSupport.getChildrenForThisType(PageContentTypeApiSupport.java:88)
              at com.atlassian.confluence.api.impl.service.content.typebinding.PageContentTypeApiSupport.getChildrenForThisType(PageContentTypeApiSupport.java:47)
              at com.atlassian.confluence.content.apisupport.BaseContentTypeApiSupport.getChildren(BaseContentTypeApiSupport.java:54)
              at com.atlassian.confluence.content.apisupport.ContentTypeApiSupport.getFilteredChildren(ContentTypeApiSupport.java:50)
              at com.atlassian.confluence.api.impl.service.content.factory.ChildSupport.getChildrenList(ChildSupport.java:135)
              at com.atlassian.confluence.api.impl.service.content.ChildContentServiceImpl$ChildContentFinderImpl.fetchMany(ChildContentServiceImpl.java:99)
      
      Caused by: org.hibernate.HibernateException: Unable to resolve owner of loading collection [[com.atlassian.confluence.core.ContentEntityObject.contentProperties#1605644]] for second level caching
              at org.hibernate.engine.loading.internal.CollectionLoadContext.addCollectionToCache(CollectionLoadContext.java:360)
              at org.hibernate.engine.loading.internal.CollectionLoadContext.endLoadingCollection(CollectionLoadContext.java:299)
              at org.hibernate.engine.loading.internal.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:224)
              at org.hibernate.engine.loading.internal.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:198)
              at org.hibernate.loader.Loader.endCollectionLoad(Loader.java:1257)
      G
      

      Workaround

      Copy is working if 10 child pages are under the page.

      If the page hierarchy cannot be changed, the following alternative workaround can be considered until Confluence can be upgraded:

       

      1. Get the page id of the page you want to copy accessing the page information referred below as $Opid$.
      2. Get the page id of the destination parent page accessing the page information referred below as $DPpid$.
      3. (Optional) If the page hierarchy is copied under the same Confluence space, you need to set a page prefix which makes the new pages names unique, referred below as $Pprefix$.
      4. Run the following curl command, replacing accordingly $CONFLUENCE_BASE_URL$$Opid$$DPpid$$Pprefix$$ADMIN$,$PASSWORD$.
        curl '$CONFLUENCE_BASE_URL$/rest/page-hierarchy/copy' \
          -H 'content-type: application/json' \
          -u '$ADMIN$:$PASSWORD$' \
          --data-raw '{"copyAttachments":true,"copyPermissions":true,"copyLabels":true,"titleOptions":{"prefix":"$Pprefix$","search":"","replace":""},"originalPageId":"$Opid$","destinationPageId":"$DPpid$"}'
        
      5. If the above request is successfully submitted, a task id will be returned, referred below as $TaskID$.
      6. The progress of the task can be checked with the following rest api, replacing accordingly $CONFLUENCE_BASE_URL$$TaskID$$ADMIN$,$PASSWORD$.
        curl 'https://$CONFLUENCE_BASE_URL$/rest/api/longtask/$TaskID$' \
        -u '$ADMIN$:$PASSWORD$'
        

            [CONFSERVER-96561] Unable to Copy the page if it has more than 10 child pages.

            Marco Salvi made changes -
            Description Original: h3. Issue Summary

            This is reproducible on Data Center: Yes
            h3. Steps to Reproduce
             # Install latest Confluence
             # Create a page and then create 11 child pages for the parent page
             # Click on the parent page > Click ... on the right top corner > Copy
             # You will see *Include child pages* will be greyed out and copy action will be kept running.

            h3. Expected Results

            The page should get copied as expected.
            h3. Actual Results

            The below exception is thrown in the xxxxxxx.log file:
            {noformat}
            2024-07-24 13:48:18,568 WARN [http-nio-8090-exec-10 url: /rest/api/content/98344/child/page; user: admin] [engine.loading.internal.LoadContexts] cleanup HHH000100: Fail-safe cleanup (collections) : org.hibernate.engine.loading.internal.CollectionLoadContext@4814ed11<rs=HikariProxyResultSet@237923064 wrapping org.postgresql.jdbc.PgResultSet@24ae041a>
             -- url: /rest/api/content/98344/child/page | userName: admin | referer: https://instenv-330877-erx7.instenv.internal.atlassian.com/display/TEST/Test | traceId: b280773cec4b39f3
            2024-07-24 13:48:18,571 WARN [http-nio-8090-exec-10 url: /rest/api/content/98344/child/page; user: admin] [confluence.impl.hibernate.ConfluenceHibernateTransactionManager] doRollback Performing rollback. Transactions:\n ->[com.atlassian.confluence.api.impl.service.content.ChildContentServiceImpl$ChildContentFinderImpl.fetchMany]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT,readOnly (Session #2010855888)
             -- url: /rest/api/content/98344/child/page | userName: admin | referer: https://instenv-330877-erx7.instenv.internal.atlassian.com/display/TEST/Test | traceId: b280773cec4b39f3
            2024-07-24 13:48:18,575 ERROR [http-nio-8090-exec-10 url: /rest/api/content/98344/child/page; user: admin] [rest.api.model.ExceptionConverter] convertServiceException No status code found for exception, converting to internal server error :
             -- url: /rest/api/content/98344/child/page | userName: admin | referer: https://instenv-330877-erx7.instenv.internal.atlassian.com/display/TEST/Test | traceId: b280773cec4b39f3
            com.atlassian.confluence.api.impl.pagination.BatchExecutionException: Error during batch execution with session management
                    at com.atlassian.confluence.api.impl.pagination.PaginationServiceImpl.executeBatchWithSessionManagement(PaginationServiceImpl.java:281)
                    at com.atlassian.confluence.api.impl.pagination.PaginationServiceImpl.lambda$doRequestInTransaction$1(PaginationServiceImpl.java:263)
                    at com.atlassian.confluence.api.impl.ReadOnlyAndReadWriteTransactionConversionTemplate.executeInReadOnly(ReadOnlyAndReadWriteTransactionConversionTemplate.java:38)
                    at com.atlassian.confluence.api.impl.pagination.PaginationServiceImpl.doRequestInTransaction(PaginationServiceImpl.java:261)
                    at com.atlassian.confluence.api.impl.pagination.PaginationServiceImpl.doPaginationListRequest(PaginationServiceImpl.java:96)
                    at com.atlassian.confluence.api.service.pagination.PaginationService.performPaginationListRequest(PaginationService.java:113)
                    at com.atlassian.confluence.api.impl.service.content.typebinding.PageContentTypeApiSupport.getChildrenForThisType(PageContentTypeApiSupport.java:88)
                    at com.atlassian.confluence.api.impl.service.content.typebinding.PageContentTypeApiSupport.getChildrenForThisType(PageContentTypeApiSupport.java:47)
                    at com.atlassian.confluence.content.apisupport.BaseContentTypeApiSupport.getChildren(BaseContentTypeApiSupport.java:54)
                    at com.atlassian.confluence.content.apisupport.ContentTypeApiSupport.getFilteredChildren(ContentTypeApiSupport.java:50)
                    at com.atlassian.confluence.api.impl.service.content.factory.ChildSupport.getChildrenList(ChildSupport.java:135)
                    at com.atlassian.confluence.api.impl.service.content.ChildContentServiceImpl$ChildContentFinderImpl.fetchMany(ChildContentServiceImpl.java:99)

            Caused by: org.hibernate.HibernateException: Unable to resolve owner of loading collection [[com.atlassian.confluence.core.ContentEntityObject.contentProperties#1605644]] for second level caching
                    at org.hibernate.engine.loading.internal.CollectionLoadContext.addCollectionToCache(CollectionLoadContext.java:360)
                    at org.hibernate.engine.loading.internal.CollectionLoadContext.endLoadingCollection(CollectionLoadContext.java:299)
                    at org.hibernate.engine.loading.internal.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:224)
                    at org.hibernate.engine.loading.internal.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:198)
                    at org.hibernate.loader.Loader.endCollectionLoad(Loader.java:1257)
            G
            {noformat}
            h3. Workaround

            Copy is working if 10 child pages are under the page
            New: h3. Issue Summary

            This is reproducible on Data Center: Yes
            h3. Steps to Reproduce
             # Install latest Confluence
             # Create a page and then create 11 child pages for the parent page
             # Click on the parent page > Click ... on the right top corner > Copy
             # You will see *Include child pages* will be greyed out and copy action will be kept running.

            h3. Expected Results

            The page should get copied as expected.
            h3. Actual Results

            The below exception is thrown in the xxxxxxx.log file:
            {noformat}
            2024-07-24 13:48:18,568 WARN [http-nio-8090-exec-10 url: /rest/api/content/98344/child/page; user: admin] [engine.loading.internal.LoadContexts] cleanup HHH000100: Fail-safe cleanup (collections) : org.hibernate.engine.loading.internal.CollectionLoadContext@4814ed11<rs=HikariProxyResultSet@237923064 wrapping org.postgresql.jdbc.PgResultSet@24ae041a>
             -- url: /rest/api/content/98344/child/page | userName: admin | referer: https://instenv-330877-erx7.instenv.internal.atlassian.com/display/TEST/Test | traceId: b280773cec4b39f3
            2024-07-24 13:48:18,571 WARN [http-nio-8090-exec-10 url: /rest/api/content/98344/child/page; user: admin] [confluence.impl.hibernate.ConfluenceHibernateTransactionManager] doRollback Performing rollback. Transactions:\n ->[com.atlassian.confluence.api.impl.service.content.ChildContentServiceImpl$ChildContentFinderImpl.fetchMany]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT,readOnly (Session #2010855888)
             -- url: /rest/api/content/98344/child/page | userName: admin | referer: https://instenv-330877-erx7.instenv.internal.atlassian.com/display/TEST/Test | traceId: b280773cec4b39f3
            2024-07-24 13:48:18,575 ERROR [http-nio-8090-exec-10 url: /rest/api/content/98344/child/page; user: admin] [rest.api.model.ExceptionConverter] convertServiceException No status code found for exception, converting to internal server error :
             -- url: /rest/api/content/98344/child/page | userName: admin | referer: https://instenv-330877-erx7.instenv.internal.atlassian.com/display/TEST/Test | traceId: b280773cec4b39f3
            com.atlassian.confluence.api.impl.pagination.BatchExecutionException: Error during batch execution with session management
                    at com.atlassian.confluence.api.impl.pagination.PaginationServiceImpl.executeBatchWithSessionManagement(PaginationServiceImpl.java:281)
                    at com.atlassian.confluence.api.impl.pagination.PaginationServiceImpl.lambda$doRequestInTransaction$1(PaginationServiceImpl.java:263)
                    at com.atlassian.confluence.api.impl.ReadOnlyAndReadWriteTransactionConversionTemplate.executeInReadOnly(ReadOnlyAndReadWriteTransactionConversionTemplate.java:38)
                    at com.atlassian.confluence.api.impl.pagination.PaginationServiceImpl.doRequestInTransaction(PaginationServiceImpl.java:261)
                    at com.atlassian.confluence.api.impl.pagination.PaginationServiceImpl.doPaginationListRequest(PaginationServiceImpl.java:96)
                    at com.atlassian.confluence.api.service.pagination.PaginationService.performPaginationListRequest(PaginationService.java:113)
                    at com.atlassian.confluence.api.impl.service.content.typebinding.PageContentTypeApiSupport.getChildrenForThisType(PageContentTypeApiSupport.java:88)
                    at com.atlassian.confluence.api.impl.service.content.typebinding.PageContentTypeApiSupport.getChildrenForThisType(PageContentTypeApiSupport.java:47)
                    at com.atlassian.confluence.content.apisupport.BaseContentTypeApiSupport.getChildren(BaseContentTypeApiSupport.java:54)
                    at com.atlassian.confluence.content.apisupport.ContentTypeApiSupport.getFilteredChildren(ContentTypeApiSupport.java:50)
                    at com.atlassian.confluence.api.impl.service.content.factory.ChildSupport.getChildrenList(ChildSupport.java:135)
                    at com.atlassian.confluence.api.impl.service.content.ChildContentServiceImpl$ChildContentFinderImpl.fetchMany(ChildContentServiceImpl.java:99)

            Caused by: org.hibernate.HibernateException: Unable to resolve owner of loading collection [[com.atlassian.confluence.core.ContentEntityObject.contentProperties#1605644]] for second level caching
                    at org.hibernate.engine.loading.internal.CollectionLoadContext.addCollectionToCache(CollectionLoadContext.java:360)
                    at org.hibernate.engine.loading.internal.CollectionLoadContext.endLoadingCollection(CollectionLoadContext.java:299)
                    at org.hibernate.engine.loading.internal.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:224)
                    at org.hibernate.engine.loading.internal.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:198)
                    at org.hibernate.loader.Loader.endCollectionLoad(Loader.java:1257)
            G
            {noformat}
            h3. Workaround

            Copy is working if 10 child pages are under the page.

            If the page hierarchy cannot be changed, the following alternative workaround can be considered until Confluence can be upgraded:

             
             # Get the page id of the page you want to copy accessing the [page information|https://confluence.atlassian.com/conf85/view-page-information-1283359981.html] referred below as {*}$Opid${*}.
             # Get the page id of the destination parent page accessing the [page information|https://confluence.atlassian.com/conf85/view-page-information-1283359981.html] referred below as {*}$DPpid${*}.
             # (Optional) If the page hierarchy is copied under the same Confluence space, you need to set a page prefix which makes the new pages names unique, referred below as {*}$Pprefix${*}.
             # Run the following curl command, replacing accordingly {*}$CONFLUENCE_BASE_URL${*}, {*}$Opid${*}, {*}$DPpid${*}, {*}$Pprefix${*}, {*}$ADMIN${*},{*}$PASSWORD${*}.
            {code:java}
            curl '$CONFLUENCE_BASE_URL$/rest/page-hierarchy/copy' \
              -H 'content-type: application/json' \
              -u '$ADMIN$:$PASSWORD$' \
              --data-raw '{"copyAttachments":true,"copyPermissions":true,"copyLabels":true,"titleOptions":{"prefix":"$Pprefix$","search":"","replace":""},"originalPageId":"$Opid$","destinationPageId":"$DPpid$"}'
            {code}
             # If the above request is successfully submitted, a task id will be returned, referred below as {*}$TaskID${*}.
             # The progress of the task can be checked with the following rest api, replacing accordingly {*}$CONFLUENCE_BASE_URL${*}, {*}$TaskID${*}, {*}$ADMIN${*},{*}$PASSWORD${*}.
            {code:java}
            curl 'https://$CONFLUENCE_BASE_URL$/rest/api/longtask/$TaskID$&#39; \
            -u '$ADMIN$:$PASSWORD$'
            {code}
            Jacqueline Bietz made changes -
            Remote Link New: This issue links to "Page (Extranet)" [ 936855 ]
            Mark Ellis made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 936512 ]
            Akshay Rai made changes -
            Fix Version/s Original: 8.5.13 [ 108816 ]
            Akshay Rai made changes -
            Fix Version/s New: 8.5.14 [ 108954 ]
            Mark Ellis made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 932504 ]
            James Whitehead made changes -
            Fix Version/s Original: 9.0.0 [ 106328 ]
            James Whitehead made changes -
            Fix Version/s New: 9.0.1 [ 108911 ]
            Akshay Rai made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Waiting for Release [ 12075 ] New: Closed [ 6 ]
            SET Analytics Bot made changes -
            Support reference count Original: 8 New: 11

              854eef6f5746 Kusal Kithul-Godage
              c9b4597f5a24 Vishnu Prasad P S
              Affected customers:
              15 This affects my team
              Watchers:
              40 Start watching this issue

                Created:
                Updated:
                Resolved: