Schema Update could not Complete
Symptoms
While upgrading Confluence, the process stops with an error message stating execute could not complete schema update
The following appears in the atlassian-confluence.log
:
2014-08-08 14:34:09,409 ERROR [localhost-startStop-1] [hibernate.tool.hbm2ddl.SchemaUpdate] execute Unsuccessful: alter table BODYCONTENT add constraint FKA898D4778DD41734 foreign key (CONTENTID) references CONTENT
2014-08-08 14:34:09,419 ERROR [localhost-startStop-1] [hibernate.tool.hbm2ddl.SchemaUpdate] execute ORA-02298: cannot validate (CONFLUENCE35.FKA898D4778DD41734) - parent keys not found
2014-08-08 14:34:09,423 ERROR [localhost-startStop-1] [hibernate.tool.hbm2ddl.SchemaUpdate] execute could not complete schema update
Cause
The upgrade process failed while trying to process corrupted orphaned pages.
Resolution
To verify this is the issue, we can use the following SQL query:
SELECT bodycontentid FROM bodycontent WHERE contentid NOT IN (SELECT contentid FROM content);
If there are any results they can be removed using:
DELETE FROM bodycontent WHERE bodycontentid IN (SELECT bodycontentid FROM bodycontent WHERE contentid NOT IN (SELECT contentid FROM content));
As this involves directly modifying the database, ensure you backup the database before making any changes.
Last modified on Mar 30, 2016
Powered by Confluence and Scroll Viewport.