Can't move page after upgrading Confluence
Asked by Islam:

Hello! Function move page brake after upgrade Confluence Server to 7.19.5.

When i try move page i see:

2023-03-06 14:20:20,491 WARN \[http-nio-8090-exec-31\] \[engine.loading.internal.LoadContexts\] cleanup HHH000100: Fail-safe cleanup (collections) : org.hibernate.engine.loading.internal.CollectionLoadContext@74eec548\<rs=HikariProxyResultSet@1060139925 wrapping oracle.jdbc.driver.ForwardOnlyResultSet@25343c68\>  
-- referer: <https://confluence/pages/viewpage.action?pageId=99855260> \| url: /pages/movepage.action \| traceId: 0eb016050a9e0a8e  
2023-03-06 14:20:20,492 ERROR \[Long running task: Move Page\] \[confluence.util.longrunning.ConfluenceAbstractLongRunningTask\] run Long running task "Move Page" failed to run.  
-- url: /pages/movepage.action \| referer: <https://help.severstal.com/pages/viewpage.action?pageId=99855260> \| traceId: 0eb016050a9e0a8e \| userName: {USERNAME} \| action: movepage  
org.hibernate.exception.GenericJDBCException: could not initialize a collection: \[com.atlassian.confluence.pages.Page.children#69928793\]  
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47)  
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)  
at org.hibernate.loader.Loader.loadCollection(Loader.java:2411)  
at org.hibernate.loader.collection.plan.LegacyBatchingCollectionInitializerBuilder$LegacyBatchingCollectionInitializer.initialize(LegacyBatchingCollectionInitializerBuilder.java:88)  
at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:688)  
at org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:75)  
at org.hibernate.internal.SessionImpl.initializeCollection(SessionImpl.java:2223)  
at org.hibernate.collection.internal.AbstractPersistentCollection$4.doWork(AbstractPersistentCollection.java:570)  
at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:248)  
at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:566)  
at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:133)  
at org.hibernate.collection.internal.AbstractPersistentCollection$1.doWork(AbstractPersistentCollection.java:162)  
at org.hibernate.collection.internal.AbstractPersistentCollection$1.doWork(AbstractPersistentCollection.java:147)  
at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:248)  
at org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:146)  
at org.hibernate.collection.internal.PersistentBag.size(PersistentBag.java:261)  
at com.atlassian.confluence.pages.Page.hasChildren(Page.java:121)  
at com.atlassian.confluence.content.service.page.MovePageCommandImpl.executeInternal(MovePageCommandImpl.java:120)  
at com.atlassian.confluence.core.service.AbstractServiceCommand$ServiceCommandState$2.execute(AbstractServiceCommand.java:148)  
at com.atlassian.confluence.core.service.AbstractServiceCommand.execute(AbstractServiceCommand.java:60)  
at com.atlassian.confluence.content.service.page.LongRunningTaskMovePageCommandDecorator.runInternal(LongRunningTaskMovePageCommandDecorator.java:68)  
at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:26)  
at com.atlassian.confluence.util.longrunning.ManagedTask.run(ManagedTask.java:39)  
at com.atlassian.confluence.impl.util.concurrent.ConfluenceExecutors$ThreadLocalContextTaskWrapper.lambda$wrap$1(ConfluenceExecutors.java:90)  
at com.atlassian.confluence.vcache.VCacheRequestContextOperations.lambda$doInRequestContext$0(VCacheRequestContextOperations.java:50)  
at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContextInternal(VCacheRequestContextManager.java:84)  
at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:68)  
at com.atlassian.confluence.vcache.VCacheRequestContextOperations.doInRequestContext(VCacheRequestContextOperations.java:49)  
at com.atlassian.confluence.vcache.VCacheRequestContextOperations.lambda$withRequestContext$2(VCacheRequestContextOperations.java:66)  
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)  
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)  
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)  
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)  
at java.base/java.lang.Thread.run(Thread.java:834)  
Caused by: java.sql.SQLException: Closed Resultset: findColumn  
at oracle.jdbc.driver.InsensitiveScrollableResultSet.ensureOpen(InsensitiveScrollableResultSet.java:109)  
at oracle.jdbc.driver.InsensitiveScrollableResultSet.findColumn(InsensitiveScrollableResultSet.java:263)  
at oracle.jdbc.driver.GeneratedResultSet.getInt(GeneratedResultSet.java:554)  
at com.zaxxer.hikari.pool.HikariProxyResultSet.getInt(HikariProxyResultSet.java)  
at org.hibernate.type.descriptor.sql.IntegerTypeDescriptor$2.doExtract(IntegerTypeDescriptor.java:62)  
at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:47)  
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:261)  
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:257)  
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:247)  
at org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:333)  
at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2868)  
at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1747)  
at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1673)  
at org.hibernate.loader.Loader.getRow(Loader.java:1562)  
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:732)  
at org.hibernate.loader.Loader.processResultSet(Loader.java:991)  
at org.hibernate.loader.Loader.doQuery(Loader.java:949)  
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:341)  
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:311)  
at org.hibernate.loader.Loader.loadCollection(Loader.java:2404)  
... 31 more  
2023-03-06 14:20:20,492 WARN \[http-nio-8090-exec-31\] \[engine.loading.internal.CollectionLoadContext\] cleanup HHH000160: On CollectionLoadContext#cleanup, localLoadingCollectionKeys contained \[1\] entries  
-- referer: https://{confluence}/pages/viewpage.action?pageId=99855260 \| url: /pages/movepage.action \| traceId: 0eb016050a9e0a8e

Pls need help or consultation.


Answers:
author: Lei Wang
body: Hello [@Islam](/t5/user/viewprofilepage/user-id/4543041),

We appreciate you bringing this matter to our attention. Our investigation has revealed that this is a bug in Confluence.

The issue is a regression that occurred after a fix was made for [CONFSERVER-44950](https://jira.atlassian.com/browse/CONFSERVER-44950). The cause is believed to be **Hibernate objects being referenced from another session that has been closed** . A bug report has been created for this issue and can be accessed at the following link:

* <https://jira.atlassian.com/browse/CONFSERVER-82786>

Fortunately, we were able to fix this issue in the new Confluence LTS versions, including 7.13 and 7.19, as well as the new Confluence version 8.x.

Thanks!


author: Faisal
body: Hi Islam,

Can you elaborate more on the issue .

Are you trying to re-order the page ? or are you trying to Move page to another Space ?

comments: author: Islam
body: I trying to Move page to another Space


author: Faisal
body: Do you have permission on the other Space you are moving the page ? . Please check the below steps to see if you have the required permission .
> **Notes about permissions:**
>
> To move a page, you need the following permissions:
>
> * 'Add' permission on the page you are moving, and
> * 'View' permission on the page's parent page. So if you are moving the page to a different parent, you need 'View' permission on the new parent.
>
> To move a page into a different space, you also need:
>
> * 'Delete' permission on the space you are moving from, and
> * 'Add' permission on the space you are moving to.


author: Islam
body: yes all premission i have.

I see the following situation:  
After an unsuccessful attempt to move the page, the "Move" button disappears and the rights remain.  
That is, the page has all the rights, but there is no "move" button.


author: Islam
body: I also found a workaround:  
1. When moving, press arrange  
2. Select a position.  
3. Move page  
Then everything works. How can I fix this?


author: Robert Hellmann
body: Hi there,

we are experiencing the same issue. DC 7.19.6

Moving a page to other part of the same space.

movepage.action doesn?t show any errors, but UI does.

Reorder checkbox ticked seems to work.

Is there a bug tracked already?

BR Robert


Tags: confluence-server

server