Uploaded image for project: 'Jira Server and Data Center'
  1. Jira Server and Data Center
  2. JRASERVER-26064

Upgrade problem from 4.3.x and below to 4.4.x and above with MSSQL

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Medium
    • Resolution: Duplicate
    • Affects Version/s: 4.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      Hi,
      We came across a problem today with upgrading JIRA.

      So when a customer is upgrading to 4.4.x with an empty schema name:
      In dbconfig.xml:

      <schema-name></schema-name>

      then the following error occurs :

      Exception thrown during upgrade: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT pkey, PROJECT, REPORTER, ASSIGNEE, issuetype, SUMMARY, DESCRIPTION, ENVIRONMENT, PRIORITY, RESOLUTION, issuestatus, CREATED, UPDATED, DUEDATE, RESOLUTIONDATE, VOTES, WATCHES, TIMEORIGINALESTIMATE, TIMEESTIMATE, TIMESPENT, WORKFLOW_ID, SECURITY, FIXFOR, COMPONENT FROM jiraissue WHERE ID=? (Ungültiger Spaltenname 'WATCHES'.)
      com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT pkey, PROJECT, REPORTER, ASSIGNEE, issuetype, SUMMARY, DESCRIPTION, ENVIRONMENT, PRIORITY, RESOLUTION, issuestatus, CREATED, UPDATED, DUEDATE, RESOLUTIONDATE, VOTES, WATCHES, TIMEORIGINALESTIMATE, TIMEESTIMATE, TIMESPENT, WORKFLOW_ID, SECURITY, FIXFOR, COMPONENT FROM jiraissue WHERE ID=? (Ungültiger Spaltenname 'WATCHES'.)
      	at com.atlassian.jira.issue.managers.DefaultIssueManager.getIssue(DefaultIssueManager.java:110)
      	at com.atlassian.jira.issue.managers.DefaultIssueManager.getIssueObject(DefaultIssueManager.java:265)
      	at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build633.processCustomFieldOptions(UpgradeTask_Build633.java:181)
      	at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build633.doUpgrade(UpgradeTask_Build633.java:92)
      	at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeTaskSuccess(UpgradeManagerImpl.java:609)
      	at com.atlassian.jira.upgrade.UpgradeManagerImpl.runUpgradeTasks(UpgradeManagerImpl.java:496)
      	at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgrade(UpgradeManagerImpl.java:426)
      	at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeeded(UpgradeManagerImpl.java:370)
      	at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeededAndAllowed(UpgradeManagerImpl.java:309)
      	at com.atlassian.jira.upgrade.UpgradeLauncher.checkIfUpgradeNeeded(UpgradeLauncher.java:100)
      	at com.atlassian.jira.upgrade.UpgradeLauncher.start(UpgradeLauncher.java:49)
      	at com.atlassian.jira.startup.DefaultJiraLauncher$3.run(DefaultJiraLauncher.java:103)
      	at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrEnqueue(DatabaseConfigurationManagerImpl.java:250)
      	at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrWhenDatabaseActivated(DatabaseConfigurationManagerImpl.java:149)
      	at com.atlassian.jira.startup.DefaultJiraLauncher.postDbLaunch(DefaultJiraLauncher.java:94)
      	at com.atlassian.jira.startup.DefaultJiraLauncher.access$100(DefaultJiraLauncher.java:24)
      	at com.atlassian.jira.startup.DefaultJiraLauncher$1.run(DefaultJiraLauncher.java:61)
      	at com.atlassian.jira.util.devspeed.JiraDevSpeedTimer.run(JiraDevSpeedTimer.java:33)
      	at com.atlassian.jira.startup.DefaultJiraLauncher.start(DefaultJiraLauncher.java:56)
      	at com.atlassian.jira.startup.LauncherContextListener$1.create(LauncherContextListener.java:68)
      	at com.atlassian.jira.startup.LauncherContextListener$1.create(LauncherContextListener.java:63)
      	at com.atlassian.multitenant.impl.MultiTenantComponentMapImpl.get(MultiTenantComponentMapImpl.java:121)
      	at com.atlassian.multitenant.impl.MultiTenantComponentMapImpl.onTenantStart(MultiTenantComponentMapImpl.java:165)
      	at com.atlassian.multitenant.impl.DefaultMultiTenantManager$1.consume(DefaultMultiTenantManager.java:134)
      	at com.atlassian.multitenant.impl.DefaultMultiTenantManager$1.consume(DefaultMultiTenantManager.java:131)
      	at com.atlassian.multitenant.impl.DefaultMultiTenantManager.runForEachListener(DefaultMultiTenantManager.java:256)
      	at com.atlassian.multitenant.impl.DefaultMultiTenantManager.startTenant(DefaultMultiTenantManager.java:130)
      	at com.atlassian.multitenant.impl.DefaultMultiTenantManager.startAll(DefaultMultiTenantManager.java:203)
      	at com.atlassian.jira.startup.LauncherContextListener.contextInitialized(LauncherContextListener.java:96)
      	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205)
      	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704)
      	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
      	at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
      	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
      	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
      	at org.apache.catalina.core.StandardService.start(StandardService.java:525)
      	at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
      	at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
      	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
      Caused by: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT pkey, PROJECT, REPORTER, ASSIGNEE, issuetype, SUMMARY, DESCRIPTION, ENVIRONMENT, PRIORITY, RESOLUTION, issuestatus, CREATED, UPDATED, DUEDATE, RESOLUTIONDATE, VOTES, WATCHES, TIMEORIGINALESTIMATE, TIMEESTIMATE, TIMESPENT, WORKFLOW_ID, SECURITY, FIXFOR, COMPONENT FROM jiraissue WHERE ID=? (Ungültiger Spaltenname 'WATCHES'.)
      	at org.ofbiz.core.entity.jdbc.SQLProcessor.executeQuery(SQLProcessor.java:605)
      	at org.ofbiz.core.entity.GenericDAO.select(GenericDAO.java:497)
      	at org.ofbiz.core.entity.GenericDAO.select(GenericDAO.java:464)
      	at org.ofbiz.core.entity.GenericHelperDAO.findByPrimaryKey(GenericHelperDAO.java:78)
      	at org.ofbiz.core.entity.GenericDelegator.findByPrimaryKey(GenericDelegator.java:543)
      	at org.ofbiz.core.entity.GenericDelegator.findByPrimaryKey(GenericDelegator.java:578)
      	at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at com.atlassian.multitenant.impl.MultiTenantComponentFactoryImpl$AbstractMultiTenantAwareInvocationHandler.invokeInternal(MultiTenantComponentFactoryImpl.java:181)
      	at com.atlassian.multitenant.impl.MultiTenantComponentFactoryImpl$MultiTenantAwareMethodInterceptor.intercept(MultiTenantComponentFactoryImpl.java:230)
      	at org.ofbiz.core.entity.GenericDelegator$$EnhancerByCGLIB$$c07020d8.findByPrimaryKey()
      	at com.atlassian.jira.issue.managers.DefaultIssueManager.getIssue(DefaultIssueManager.java:106)
      	... 43 more
      
      

      The upgrade log show:

      2011-10-20 18:20:32,428 main WARN      [core.entity.jdbc.DatabaseUtil] Entity "Action" has no table in the database
      2011-10-20 18:20:32,443 main ERROR      [core.entity.jdbc.DatabaseUtil] Could not create table "jiraaction"
      2011-10-20 18:20:32,443 main ERROR      [core.entity.jdbc.DatabaseUtil] SQL Exception while executing the following:
      CREATE TABLE jiraaction (ID NUMERIC NOT NULL, issueid NUMERIC, AUTHOR NVARCHAR(255), actiontype NVARCHAR(255), actionlevel NVARCHAR(255), rolelevel NUMERIC, actionbody NTEXT, CREATED DATETIME, UPDATEAUTHOR NVARCHAR(255), UPDATED DATETIME, actionnum NUMERIC, CONSTRAINT PK_jiraaction PRIMARY KEY (ID))
      Error was: java.sql.SQLException: In der Datenbank ist bereits ein Objekt mit dem Namen 'jiraaction' vorhanden.
      2011-10-20 18:20:32,443 main WARN      [core.entity.jdbc.DatabaseUtil] Entity "Application" has no table in the database
      2011-10-20 18:20:32,443 main ERROR      [core.entity.jdbc.DatabaseUtil] Could not create table "cwd_application"
      2011-10-20 18:20:32,443 main ERROR      [core.entity.jdbc.DatabaseUtil] SQL Exception while executing the following:
      CREATE TABLE cwd_application (ID NUMERIC NOT NULL, application_name NVARCHAR(255), lower_application_name NVARCHAR(255), created_date DATETIME, updated_date DATETIME, active int, description NVARCHAR(255), application_type NVARCHAR(255), credential NVARCHAR(255), CONSTRAINT PK_cwd_application PRIMARY KEY (ID))
      Error was: java.sql.SQLException: In der Datenbank ist bereits ein Objekt mit dem Namen 'cwd_application' vorhanden.
      

      The workaround for the problem is :

      Option 1:
      1. Create a new, clean database. Use the schema name 'jiraschema'.
      2. Make sure to follow the instruction on http://confluence.atlassian.com/display/JIRA/Connecting+JIRA+to+SQL+Server+2008#ConnectingJIRAtoSQLServer2008-2CreateandConfiguretheSQLServerDatabase
      3. Restore the backup of your current database to this db/schema.
      4. Use the configuration tool in your 4.3.3 install to add the schema name to your configuration file.
      5. Try the upgrade again.

      Option 2:
      Alternatively, you can use the XML backup method for upgrading:

      1. Make a XML backup of your 4.3.3 JIRA instance.
      2. Run the setup wizard (connect it to a new, clean database) and log in in the new instance.
      3. Restore the backup in the 4.4.3 instance.
      4. Stop JIRA, copy the attachments folder from 4.3.3 home to 4.4.3 home folder.

      Regards,
      Ruchi

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              rtandon@atlassian.com Ruchi Tandon
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: