Uploaded image for project: 'Crowd Data Center'
  1. Crowd Data Center
  2. CWD-3655

Upgrading from 2.0.x to 2.6.x and above due to invalid column name is_local

    • Icon: Bug Bug
    • Resolution: Timed out
    • Icon: Medium Medium
    • None
    • 2.7, 2.6.4
    • None
    • None

      Steps to Reproduce

      1. Install Crowd 2.0.6 using SQL Server
      2. Upgrade Crowd to 2.7.x via automatic database upgrade

      Expected Results

      Upgrade should be successful

      Actual Results

      Upgrade fails with the following errors:

      2013-09-25 20:49:23,018 main INFO [crowd.manager.upgrade.UpgradeManagerImpl] Running upgrade task for build - 427: Updating the local column in cwd_group from null to false
      2013-09-25 20:49:23,064 main WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 207, SQLState: 42S22
      2013-09-25 20:49:23,064 main ERROR [org.hibernate.util.JDBCExceptionReporter] Invalid column name 'is_local'.
      2013-09-25 20:49:23,067 main ERROR [crowd.manager.upgrade.UpgradeManagerImpl] could not execute update query; SQL [update cwd_group set is_local='F' where is_local is null]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute update query
      org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute update query; SQL [update cwd_group set is_local='F' where is_local is null]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute update query
      	at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:635)
      	at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
      

      Crowd 2.0.x does not have is_local column in cwd_group table. However, during the upgrade, Crowd is trying to modify all null values in is_local column, which is non-existent

      Environment Information

      Tested by upgrading from 2.0.6 to 2.6.4 and from 2.0.6 to 2.7

      Findings

      This issue does not occur in MySQL-based Crowd. During the upgrade, the is_local column is added before Crowd tries to modify data in this column.

      Workarounds

      You can do one of the following:

      • Upgrade to Crowd 2.3.x first before upgrading to Crowd 2.6.x and above
      • Upgrade via XML data transfer

            [CWD-3655] Upgrading from 2.0.x to 2.6.x and above due to invalid column name is_local

            Monique Khairuliana (Inactive) made changes -
            Workflow Original: Simplified Crowd Development Workflow v2 - restricted [ 1510277 ] New: JAC Bug Workflow v3 [ 3365614 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Owen made changes -
            Workflow Original: Simplified Crowd Development Workflow v2 [ 1393391 ] New: Simplified Crowd Development Workflow v2 - restricted [ 1510277 ]
            Owen made changes -
            Workflow Original: Crowd Development Workflow v2 [ 558741 ] New: Simplified Crowd Development Workflow v2 [ 1393391 ]
            joe made changes -
            Resolution New: Timed out [ 10 ]
            Status Original: Needs Verification [ 10004 ] New: Resolved [ 5 ]
            joe made changes -
            Status Original: Open [ 1 ] New: Needs Verification [ 10004 ]
            AmaliaA made changes -
            Description Original: h4. Steps to Reproduce
            # Install Crowd 2.0.6 using SQL Server
            # Upgrade Crowd to 2.7.x via [automatic database upgrade|https://confluence.atlassian.com/display/CROWD/Upgrading+Crowd+via+Automatic+Database+Upgrade]

            h4. Expected Results
            Upgrade should be successful

            h4. Actual Results
            Upgrade fails with the following errors:
            {code}2013-09-25 20:49:23,018 main INFO [crowd.manager.upgrade.UpgradeManagerImpl] Running upgrade task for build - 427: Updating the local column in cwd_group from null to false
            2013-09-25 20:49:23,064 main WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 207, SQLState: 42S22
            2013-09-25 20:49:23,064 main ERROR [org.hibernate.util.JDBCExceptionReporter] Invalid column name 'is_local'.
            2013-09-25 20:49:23,067 main ERROR [crowd.manager.upgrade.UpgradeManagerImpl] could not execute update query; SQL [update cwd_group set is_local='F' where is_local is null]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute update query
            org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute update query; SQL [update cwd_group set is_local='F' where is_local is null]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute update query
            at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:635)
            at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
            {code}

            Crowd 2.0.x does not have {{is_local}} column in {{cwd_group}} table. However, during the upgrade, Confluence is trying to modify all null values in {{is_local}} column, which is non-existent

            h4. Environment Information
            Tested by upgrading from 2.0.6 to 2.6.4 and from 2.0.6 to 2.7

            h4. Findings
            This issue does not occur in MySQL-based Crowd. During the upgrade, the {{is_local}} column is added *before* Confluence tries to modify data in this column.

            h4. Workarounds
            You can do one of the following:
            * Upgrade to Crowd 2.3.x first before upgrading to Crowd 2.6.x and above
            * Upgrade via [XML data transfer|https://confluence.atlassian.com/display/CROWD/Upgrading+Crowd+via+XML+Data+Transfer]
            New: h4. Steps to Reproduce
            # Install Crowd 2.0.6 using SQL Server
            # Upgrade Crowd to 2.7.x via [automatic database upgrade|https://confluence.atlassian.com/display/CROWD/Upgrading+Crowd+via+Automatic+Database+Upgrade]

            h4. Expected Results
            Upgrade should be successful

            h4. Actual Results
            Upgrade fails with the following errors:
            {code}2013-09-25 20:49:23,018 main INFO [crowd.manager.upgrade.UpgradeManagerImpl] Running upgrade task for build - 427: Updating the local column in cwd_group from null to false
            2013-09-25 20:49:23,064 main WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 207, SQLState: 42S22
            2013-09-25 20:49:23,064 main ERROR [org.hibernate.util.JDBCExceptionReporter] Invalid column name 'is_local'.
            2013-09-25 20:49:23,067 main ERROR [crowd.manager.upgrade.UpgradeManagerImpl] could not execute update query; SQL [update cwd_group set is_local='F' where is_local is null]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute update query
            org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute update query; SQL [update cwd_group set is_local='F' where is_local is null]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute update query
            at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:635)
            at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
            {code}

            Crowd 2.0.x does not have {{is_local}} column in {{cwd_group}} table. However, during the upgrade, Crowd is trying to modify all null values in {{is_local}} column, which is non-existent

            h4. Environment Information
            Tested by upgrading from 2.0.6 to 2.6.4 and from 2.0.6 to 2.7

            h4. Findings
            This issue does not occur in MySQL-based Crowd. During the upgrade, the {{is_local}} column is added *before* Crowd tries to modify data in this column.

            h4. Workarounds
            You can do one of the following:
            * Upgrade to Crowd 2.3.x first before upgrading to Crowd 2.6.x and above
            * Upgrade via [XML data transfer|https://confluence.atlassian.com/display/CROWD/Upgrading+Crowd+via+XML+Data+Transfer]
            joe made changes -
            Affects Version/s Original: 2.0.6 [ 15395 ]
            AmaliaA made changes -
            Regular Expression New: Invalid\scolumn\sname\s\'is\_local\'
            AmaliaA created issue -

              Unassigned Unassigned
              asanusi AmaliaA
              Affected customers:
              1 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: