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

Upgrade to 5.2 or above on Oracle fails with "Table 'X' has more than one primary key" if another schema exists containing a shared table name

XMLWordPrintable

      Symptoms

      When upgrading, the task fails with a message like:

      2013-10-15 08:05:27,164 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized Upgrade failed, application will not start: Upgrade task com.atlassian.confluence.upgrade.upgradetask.LowerCaseUsernameReferencesUpgradeTask@90580fa failed during the SCHEMA_UPGRADE phase due to: Table 'NOTIFICATIONS' has more than one primary key
      com.atlassian.confluence.upgrade.UpgradeException: Upgrade task com.atlassian.confluence.upgrade.upgradetask.LowerCaseUsernameReferencesUpgradeTask@90580fa failed during the SCHEMA_UPGRADE phase due to: Table 'NOTIFICATIONS' has more than one primary key
      

      This is due to the Hibernate bug https://hibernate.atlassian.net/browse/HHH-2208, which is fixed, but Confluence still uses an old version including this bug. Ordinarily, the workaround of creating a schema-local "all_objects" view has prevented issues which have come up, however in this case, that workaround does not work.

      Steps to Reproduce

      1. Install Confluence into multiple schemas in the same Oracle database at a version below 5.2
      2. Attempt to upgrade one of them to 5.2

      Workaround

      Follow the steps in the KB article Upgrade Failed with "Table '<Table Name>' has more than one primary key" Error Message

              Unassigned Unassigned
              dmason David Mason (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: