JIRA 3.9 Upgrade Guide

JIRA Documentation

Index

Upgrading from JIRA 3.8.1 to 3.9

Please follow the JIRA general upgrade instructions. Additionally, please note the following:

In this version, there has been a change to the database which may cause problems for some customers.

The Recommended Upgrade Method

If you follow the recommended export/import upgrade procedure you should not experience any problems!

Pointing JIRA 3.9 at an existing, non-empty database

Some customers have a good reason for not following the recommended upgrade method. Using this method may result in database errors in your logs. You can avoid this if you modify your table structure manually, but the procedure is different depending on whether you have already started JIRA.

To avoid this, BEFORE you upgrade JIRA using this method, you can just drop the qrtz_cron_triggers table. This table has not been used by JIRA before 3.9, so it should be empty.

If you have ALREADY started JIRA 3.9 using your existing database, you may see the following log messages when JIRA starts up:

2007-04-18 15:31:53,345 main WARN [core.entity.jdbc.DatabaseUtil] Column  "CRON_EXPERSSION" of table "public.qrtz_cron_triggers" of entity  "QRTZCronTriggers" exists in the database but has no corresponding field
2007-04-18 15:31:53,347 main WARN [core.entity.jdbc.DatabaseUtil] Entity  "QRTZCronTriggers" has 3 fields but table "public.qrtz_cron_triggers"  has 4 columns.

The reason for this is that we have incorrectly changed a column in the qrtz_cron_triggers table. The intention was to fix a misspelling, but all we did was remove an underscore ("_")! The old column name is "CRON_EXPERSSION". The new column name is "CRONEXPERSSION". Note that both columns spell the word "expression" incorrectly.

To remove the error message, you must remove the old column as it is redundant. This column will not contain any data. The following table shows all columns in the qrtz_cron_triggers table. Columns that should be present are in green and columns that should be deleted are in red.

Keep Keep Keep Delete
ID TRIGGER_ID CRONEXPERSSION CRON_EXPERSSION

To delete the column, you can use SQL, but this may be slightly different between databases. Here's how it might look:

alter table qrtz_cron_triggers drop column CRON_EXPERSSION;

The data in this table

If you have users who have subscribed to issue filters, note that existing SimpleTriggers (time intervals) will be automatically converted into CronTriggers during the JIRA upgrade. In some cases, there may not be an exact mapping of time intervals to Cron Expressions, and approximations will be made (e.g. 'Every 5 weeks' will be converted to 'Once a month'). If this happens, the JIRA upgrade process will send an email to the user to inform them of the new schedule.

Upgrading from JIRA 3.8 and earlier

In addition to the above, please read the Upgrade Guide for every version you are skipping during the upgrade. The complete list of Upgrade Guides is available here.

Labels

 
  1. May 09, 2007

    Tom Moore says:

    needs to be: alter table qrtzcrontriggers drop column cronExperssion; \\

    needs to be:

    alter table qrtz_cron_triggers drop column cronExperssion;

    1. May 29, 2007

      Chris Mountford says:

      Hi Tom, Sorry, that's not right. Be careful. Note that there are two misspelt c...

      Hi Tom,

      Sorry, that's not right. Be careful. Note that there are two misspelt columns as Matthew indicates below.

      One of these columns (cronExperssion with no "_") may contain data after the upgrade. The CRON_EXPERSSION column has always been redundant.

      I know this is confusing and will update this page to be clearer.

      1. May 31, 2007

        Tom Moore says:

        Ok.. but your mysql command line above is still missing the underscores for the ...

        Ok.. but your mysql command line above is still missing the underscores for the table and columns.  It should be

        alter table qrtz_cron_triggers drop column CRON_EXPERSSION;

        1. May 31, 2007

          Anton Mazkovoi says:

          Thanks for the note. It was a formatting problem with the code macro. I have cha...

          Thanks for the note. It was a formatting problem with the code macro. I have changed it to work.

  2. May 29, 2007

    Matthew Janulewicz says:

    Should this be: \\ alter table qrtzcrontriggers drop column CRONEXPRESSION; \\ M...

    Should this be:

    alter table qrtz_cron_triggers drop column CRON_EXPRESSION;

    My cronExpression column has stuff in it, while my CRON_EXPRESSION column does not.

    -mattyj

  3. May 29, 2007

    Royce Wong says:

    For me, in my 3.8 install, the QRTZCRONTRIGGERS table has 3 columns: "ID" NUMBER...

    For me, in my 3.8 install, the QRTZ_CRON_TRIGGERS table has 3 columns:

    "ID" NUMBER(18,0) NOT NULL ENABLE,
    "TRIGGER_ID" NUMBER(18,0),
    "CRON_EXPERSSION" VARCHAR2(255 BYTE),

    I dropped CRON_EXPERSSION column then I ran JIRA 3.9, it gave me these errors:
    Error occurred during export before upgrade: Error in action: com.atlassian.jira.action.admin.DataExport@117e53b, result: error Error exporting data: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT ID, trigger_id, cronExperssion FROM jira.qrtz_cron_triggers (ORA-00904: "CRONEXPERSSION": invalid identifier
    )
    _ If necessary, auto-export can be disabled; see http://www.atlassian.com/software/jira/docs/latest/upgrade/autoexport.html_
    com.atlassian.core.AtlassianCoreException: Error in action: com.atlassian.jira.action.admin.DataExport@117e53b, result: error Error exporting data: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT ID, trigger_id, cronExperssion FROM jira.qrtz_cron_triggers (ORA-00904: "CRONEXPERSSION": invalid identifier
    )

    So, I added the column CRONEXPERSSION varchar(255) to QRTZ_CRON_TRIGGERS table and ran JIRA 3.9 again, and this time no error. I don't know if this is a good fix and I hope someone from Atlassian can verify it. Instead of dropping the column, should it be renaming it from CRON_EXPERSSION to CRONEXPERSSION?

    Also, watch for the spelling, the column name IS CRONEXPERSSION, not cronexpression.

    1. May 29, 2007

      Chris Mountford says:

      Hi Royce, It looks like something went wrong when JIRA started up because the C...

      Hi Royce,

      It looks like something went wrong when JIRA started up because the CRONEXPERSSION column was missing when the automatic data export ran.

      Why this happened is puzzling. We have not had any support requests about it, so my guess is either:

      1. the user that JIRA authenticates as does not have the alter table permission whereas your user account does. If this is so, you should see error messages in the log with the timestamp of the time when you first started JIRA 3.9
      2. the schema setting in your database client is different to the one set in the entityengine.xml file for JIRA.

      I wouldn't expect any further problems in your case, but if you do, please raise a support request at http://support.atlassian.com/

      Regards,

      Chris.