Schema Update could not Complete

Still need help?

The Atlassian Community is here for you.

Ask the community

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

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.