We're updating the issue view to help you get more done. 

"net.sf.hibernate.ObjectNotFoundException: No row with the given identifier exists" when moving pages

Description

We are the developers of the Archiving Plugin for Confluence.

One of the functionality of our add-on (archiving pages) includes moving pages from one space to another and moving pages within a space. The algorithms we are using have not been changed for more than a year, but users running most recent Confluence version reported the following frequent error at page moves:

1 2 3 4 5 6 7 8 9 10 11 12 arongombas@arongombas-Latitude-E5420:~/New/support/nyu/application-logs$ grep -A 10 "ObjectNotFoundException" atlassian-confluence.log java.lang.RuntimeException: net.sf.hibernate.ObjectNotFoundException: No row with the given identifier exists: [this instance does not yet exist as a row in the database#382795802] at com.google.common.base.Throwables.propagate(Throwables.java:160) at com.atlassian.confluence.pages.DefaultPageManager.verifyPageHierarchy(DefaultPageManager.java:1058) at com.atlassian.confluence.pages.DefaultPageManager.doMovePageAsChild(DefaultPageManager.java:1005) at com.atlassian.confluence.pages.DefaultPageManager.lambda$null$15(DefaultPageManager.java:999) at com.atlassian.confluence.pages.DefaultPageManager.executeUnderLocks(DefaultPageManager.java:1912) at com.atlassian.confluence.pages.DefaultPageManager.lambda$movePageAsChild$16(DefaultPageManager.java:996) at com.atlassian.confluence.pages.DefaultPageManager.executeWithLogging(DefaultPageManager.java:1940) at com.atlassian.confluence.pages.DefaultPageManager.movePageAsChild(DefaultPageManager.java:1001) at sun.reflect.GeneratedMethodAccessor1715.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

It seems that newer Confluence version refresh the page-to-move and its new parent in the verifyPageHierarchy() method, which throws an exception if some error was found.

My guess is that this is related to corrupt data in the CONFANCESTORS table, referencing an ancestor or descendant that does not appear in the CONTENT table, but I cannot confirm it.

What does this mean exactly? What should we suggest our users to fix it?

Environment

None

Status

Assignee

Petro Semeniuk

Reporter

Aron Gombas [Midori]

Add-on Type

Server

Original Estimate

None

Components

Fix versions

Priority

Blocker