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

Upgrade fail when FK9228242D16994414 is missing from the spaces table

XMLWordPrintable

      Summary

      The Confluence upgrade from 5.6.x to 5.10.x failed if the FK9228242D16994414 constraint missing from space table. The upgrade failed because Confluence is attempting to delete the constraint which does not exist in the table.

      Step to replicate

      1. Drop the FK9228242D16994414 from the spaces table
        ALTER TABLE spaces
          DROP FOREIGN KEY FK9228242D16994414
        
      2. Upgrade the Confluence from 5.6.x to 5.10.x

      Expected Result

      The upgrade is successful

      Observed Result

      The upgrade failed with the following error.The error indicate that the Confluence hit into NullPointerException when it try to delete the FK9228242D16994414 constraint which does not exist. By right the Confluence should have detected that the constraint is missing and skip the constraint deletion task since it doesn't affect the end result of the upgrade.

      2016-09-15 04:31:27,243 ERROR [localhost-startStop-1] [atlassian.confluence.plugin.PluginFrameworkContextListener] launchUpgrades Upgrade failed, application will not start: Upgrade task com.atlassian.confluence.upgrade.upgradetask.DropSpaceGroupTablesUpgradeTask@27091f57 failed during the SCHEMA_UPGRADE phase due to: null
      com.atlassian.confluence.upgrade.UpgradeException: Upgrade task com.atlassian.confluence.upgrade.upgradetask.DropSpaceGroupTablesUpgradeTask@27091f57 failed during the SCHEMA_UPGRADE phase due to: null
      	at com.atlassian.confluence.upgrade.AbstractUpgradeManager.executeUpgradeStep(AbstractUpgradeManager.java:229)
      	at com.atlassian.confluence.upgrade.AbstractUpgradeManager.runSchemaUpgradeTasks(AbstractUpgradeManager.java:185)
      	at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:140)
      	at com.atlassian.confluence.plugin.PluginFrameworkContextListener.launchUpgrades(PluginFrameworkContextListener.java:118)
      	at com.atlassian.confluence.plugin.PluginFrameworkContextListener.contextInitialized(PluginFrameworkContextListener.java:77)
      	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4842)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
      	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
      	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.NullPointerException
      	at com.atlassian.confluence.upgrade.upgradetask.DropSpaceGroupTablesUpgradeTask.doUpgrade(DropSpaceGroupTablesUpgradeTask.java:68)
      

      Workaround:

      Add the constraint back to the spaces table.

      ALTER TABLE spaces 
      ADD CONSTRAINT FK9228242D16994414
      FOREIGN KEY (SPACEGROUPID)
      REFERENCES spacegroups(SPACEGROUPID);
      

              Unassigned Unassigned
              jcheok Jing Hwa Cheok (Inactive)
              Votes:
              4 Vote for this issue
              Watchers:
              17 Start watching this issue

                Created:
                Updated:
                Resolved: