Confluence
  1. Confluence
  2. CONF-9959

Cannot upgrade from 2.2.10 and earlier to 2.6 without first having to upgrade to 2.5

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.4, 2.2.5, 2.2.6, 2.2.7, 2.2.8, 2.2.9, 2.2.10
    • Fix Version/s: 2.7.2
    • Labels:
      None
    • Last commented by user?:
      true
    • Internal Complexity:
      5
    • Internal Value:
      5

      Description

      Two customers have encountered this problem. CSP-5178 and CSP-12970.
      It appears when trying to upgrade from 2.2.10 or prior straight to 2.6, 2.6 does not realise that this version does not have a bandana table and does not try to create it.
      To workaround this issue, customers have to upgrade to 2.5 which will create the table then upgrade to 2.6.
      I have provided the mysql backup and home directory as given to me by the customer.
      Steps to reproduce
      1) Install confluence 2.2.9 standalone.
      2) Unzip the home directory (\\DEVFILES\Partha\Cases\CSP-5178\confluence.tar)to a location and point the standalone there.
      3) Unzip the mysql backup (\\DEVFILES\Partha\Cases\CSP-5178\bkup.sql.gz) and import into mysql (Command to import looks like this, change names as necessary: mysql -u username -ppassword database_name < FILE.sql)
      4) Modify the confluence.cfg.xml file to point to your imported db.
      5) Start confluence and check that it works and you can browse pages.
      6) Stop confluence
      7) Install 2.6 and point to the old home directory
      8) Start confluence. You should see table doesn't exist errors.

        Activity

        Hide
        Jun Yang added a comment -

        I encountered this problem too. See https://support.atlassian.com/browse/CSP-13595 .

        Show
        Jun Yang added a comment - I encountered this problem too. See https://support.atlassian.com/browse/CSP-13595 .
        Hide
        Mike Haller added a comment -

        Tried to upgrade from 2.3 to 2.7, same issue:

        2007-12-25 23:02:29,204 ERROR [http-8080-Processor25] [atlassian.confluence.event.ConfluenceEventManager] publishEvent An exception was encountered while processing the event: com.atlassian
        .confluence.event.events.admin.ConfluenceReadyEvent[source=com.atlassian.confluence.upgrade.impl.DefaultUpgradeManager@2e1972bf]
        org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: Could not execute query; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: T
        able 'confluence.bandana' doesn't exist
        Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'confluence.bandana' doesn't exist
        ...
        

        Could you please provide update-sql scripts to create the missing table(s)?
        Or do we need to downgrade from 2.7 back to 2.3 and then go through 2.5 to make this work? Please advice.

        Show
        Mike Haller added a comment - Tried to upgrade from 2.3 to 2.7, same issue: 2007-12-25 23:02:29,204 ERROR [http-8080-Processor25] [atlassian.confluence.event.ConfluenceEventManager] publishEvent An exception was encountered while processing the event: com.atlassian .confluence.event.events.admin.ConfluenceReadyEvent[source=com.atlassian.confluence.upgrade.impl.DefaultUpgradeManager@2e1972bf] org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: Could not execute query; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: T able 'confluence.bandana' doesn't exist Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'confluence.bandana' doesn't exist ... Could you please provide update-sql scripts to create the missing table(s)? Or do we need to downgrade from 2.7 back to 2.3 and then go through 2.5 to make this work? Please advice.
        Hide
        Paul Curren [Atlassian] added a comment -

        This is being scheduled for Confluence 2.7.1. There is no guarantee it will actually make 2.7.1 but we are going to aim for that.

        Show
        Paul Curren [Atlassian] added a comment - This is being scheduled for Confluence 2.7.1. There is no guarantee it will actually make 2.7.1 but we are going to aim for that.
        Hide
        Paul Curren [Atlassian] added a comment - - edited

        Mike, if it helps you any, the DDL to create the bandana table in MySQL is -

        CREATE TABLE 'bandana' (
          'BANDANAID' bigint(20) NOT NULL,
          'BANDANACONTEXT' varchar(255) default NULL,
          'BANDANAKEY' varchar(100) default NULL,
          'BANDANAVALUE' mediumtext,
          PRIMARY KEY  ('BANDANAID'),
          KEY 'band_context_idx' ('BANDANACONTEXT'),
          KEY 'band_key_idx' ('BANDANAKEY')
        )
        
        Show
        Paul Curren [Atlassian] added a comment - - edited Mike, if it helps you any, the DDL to create the bandana table in MySQL is - CREATE TABLE 'bandana' ( 'BANDANAID' bigint(20) NOT NULL, 'BANDANACONTEXT' varchar(255) default NULL, 'BANDANAKEY' varchar(100) default NULL, 'BANDANAVALUE' mediumtext, PRIMARY KEY ('BANDANAID'), KEY 'band_context_idx' ('BANDANACONTEXT'), KEY 'band_key_idx' ('BANDANAKEY') )
        Hide
        Paul Curren [Atlassian] added a comment -

        This fix did not make it into 2.7.1. It will be addressed in a later release.

        Show
        Paul Curren [Atlassian] added a comment - This fix did not make it into 2.7.1. It will be addressed in a later release.
        Hide
        Paul Curren [Atlassian] added a comment -

        When reproducing from a new 2.2.9 install this problem is not observed - the upgrade tasks all run as expected.

        However, it would seem that when using the data set referenced in this defect none of the upgrade tasks run (and this includes the schema upgrade).

        Show
        Paul Curren [Atlassian] added a comment - When reproducing from a new 2.2.9 install this problem is not observed - the upgrade tasks all run as expected. However, it would seem that when using the data set referenced in this defect none of the upgrade tasks run (and this includes the schema upgrade).
        Hide
        Paul Curren [Atlassian] added a comment - - edited

        Typically, and in this particular instance, you cannot upgrade from 2.2 straight to 2.6 or greater due to the license being expired. Presumably version 2.5 is working for people since it's build date is earlier and within a year of the license expiration date.

        What should happen in this circumstance is that the user cannot use Confluence, they are instead presented with a screen warning -

        Cannot proceed with upgrade. Your current license does not entitle you to upgrade to this version of Confluence. Please check that the support period of your license has not expired or that you have the correct partner license. If you wish to renew your license, please contact sales@atlassian.com. If you have a new license, please enter it on this page and restart.

        However, it would seem that the code path to this has some dependencies on the BANDANA table which doesn't exist since the upgrade has not run yet.

        The workaround is to renew your license in your current version prior to upgrading to a 2.6 or later version of Confluence.

        Going from 2.2.x to 2.5.x and then 2.6.x works since the 2.5 upgrade ensures the BANDANA table exists which allows the mechanism to warn about the license expiration to function. Presumably users then enter their new license at this point and everything works fine.

        Show
        Paul Curren [Atlassian] added a comment - - edited Typically, and in this particular instance, you cannot upgrade from 2.2 straight to 2.6 or greater due to the license being expired. Presumably version 2.5 is working for people since it's build date is earlier and within a year of the license expiration date. What should happen in this circumstance is that the user cannot use Confluence, they are instead presented with a screen warning - Cannot proceed with upgrade. Your current license does not entitle you to upgrade to this version of Confluence. Please check that the support period of your license has not expired or that you have the correct partner license. If you wish to renew your license, please contact sales@atlassian.com. If you have a new license, please enter it on this page and restart. However, it would seem that the code path to this has some dependencies on the BANDANA table which doesn't exist since the upgrade has not run yet. The workaround is to renew your license in your current version prior to upgrading to a 2.6 or later version of Confluence. Going from 2.2.x to 2.5.x and then 2.6.x works since the 2.5 upgrade ensures the BANDANA table exists which allows the mechanism to warn about the license expiration to function. Presumably users then enter their new license at this point and everything works fine.
        Hide
        Paul Curren [Atlassian] added a comment -

        In upgrading from 2.2.x directly to the latest Confluence release instead of bandana warnings you will see decorator table warnings like -

        [Filter: profiling] Using parameter [profile]
        [Filter: profiling] defaulting to off [autostart=false]
        [Filter: profiling] Turning filter off [profile=off]
        2008-01-30 15:44:42,202 INFO [main] [webwork.views.velocity.VelocityManager] loadConfiguration Initializing velocity using 'velocity.properties'
        2008-01-30 15:44:42,332 ERROR [main] [sf.hibernate.util.JDBCExceptionReporter] logExceptions Table 'conf22.decorator' doesn't exist
        2008-01-30 15:44:42,332 ERROR [main] [sf.hibernate.util.JDBCExceptionReporter] logExceptions Table 'conf22.decorator' doesn't exist
        2008-01-30 15:44:42,335 ERROR [main] [sf.hibernate.util.JDBCExceptionReporter] logExceptions Table 'conf22.decorator' doesn't exist
        2008-01-30 15:44:42,335 ERROR [main] [sf.hibernate.util.JDBCExceptionReporter] logExceptions Table 'conf22.decorator' doesn't exist
        2008-01-30 15:44:42,528 ERROR [main] [sf.hibernate.util.JDBCExceptionReporter] logExceptions Table 'conf22.decorator' doesn't exist
        2008-01-30 15:44:42,528 ERROR [main] [sf.hibernate.util.JDBCExceptionReporter] logExceptions Table 'conf22.decorator' doesn't exist
        2008-01-30 15:44:42,528 ERROR [main] [sf.hibernate.util.JDBCExceptionReporter] logExceptions Table 'conf22.decorator' doesn't exist
        2008-01-30 15:44:42,528 ERROR [main] [sf.hibernate.util.JDBCExceptionReporter] logExceptions Table 'conf22.decorator' doesn't exist
        

        This is the issue that will be resolved.

        Show
        Paul Curren [Atlassian] added a comment - In upgrading from 2.2.x directly to the latest Confluence release instead of bandana warnings you will see decorator table warnings like - [Filter: profiling] Using parameter [profile] [Filter: profiling] defaulting to off [autostart=false] [Filter: profiling] Turning filter off [profile=off] 2008-01-30 15:44:42,202 INFO [main] [webwork.views.velocity.VelocityManager] loadConfiguration Initializing velocity using 'velocity.properties' 2008-01-30 15:44:42,332 ERROR [main] [sf.hibernate.util.JDBCExceptionReporter] logExceptions Table 'conf22.decorator' doesn't exist 2008-01-30 15:44:42,332 ERROR [main] [sf.hibernate.util.JDBCExceptionReporter] logExceptions Table 'conf22.decorator' doesn't exist 2008-01-30 15:44:42,335 ERROR [main] [sf.hibernate.util.JDBCExceptionReporter] logExceptions Table 'conf22.decorator' doesn't exist 2008-01-30 15:44:42,335 ERROR [main] [sf.hibernate.util.JDBCExceptionReporter] logExceptions Table 'conf22.decorator' doesn't exist 2008-01-30 15:44:42,528 ERROR [main] [sf.hibernate.util.JDBCExceptionReporter] logExceptions Table 'conf22.decorator' doesn't exist 2008-01-30 15:44:42,528 ERROR [main] [sf.hibernate.util.JDBCExceptionReporter] logExceptions Table 'conf22.decorator' doesn't exist 2008-01-30 15:44:42,528 ERROR [main] [sf.hibernate.util.JDBCExceptionReporter] logExceptions Table 'conf22.decorator' doesn't exist 2008-01-30 15:44:42,528 ERROR [main] [sf.hibernate.util.JDBCExceptionReporter] logExceptions Table 'conf22.decorator' doesn't exist This is the issue that will be resolved.
        Hide
        Paul Curren [Atlassian] added a comment -

        Once Confluence 2.7.2 is released documentation for this issue will be made available at - http://confluence.atlassian.com/display/DOC/Upgrading+Beyond+Current+Licensed+Period

        Show
        Paul Curren [Atlassian] added a comment - Once Confluence 2.7.2 is released documentation for this issue will be made available at - http://confluence.atlassian.com/display/DOC/Upgrading+Beyond+Current+Licensed+Period

          People

          • Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Last commented:
              6 years, 12 weeks ago