-
Bug
-
Resolution: Won't Fix
-
Medium
-
None
-
6.3, 6.3.15, 7.0.10
-
6.03
-
15
-
Severity 2 - Major
-
-
Error when attempting to upgrade JIRA
Symptoms:
The following appears in JIRA's logs:
2014-08-01 10:33:05,318 main INFO [atlassian.jira.upgrade.UpgradeManagerImpl] Performing Upgrade Task: Insert sequence for event type 2014-08-01 10:33:05,322 main ERROR [atlassian.jira.upgrade.UpgradeManagerImpl] Exception thrown during upgrade: Invalid object name 'jiraeventtype'. java.sql.SQLException: Invalid object name 'jiraeventtype'. at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368) at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2820) at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2258) at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:632) at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:477) at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:776) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at com.atlassian.jira.upgrade.tasks.util.Sequences.update(Sequences.java:36) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build6320.doUpgrade(UpgradeTask_Build6320.java:41)
Cause:
Upgrade tasks that update sequences do not correctly apply schema name to table when the schema is named "jira". This has recently been triggered by an upgrade task in JIRA 6.3, however it's possible it could affect any future upgrade tasks which contain an update to a sequence.
Steps to reproduce
- Install a version of JIRA earlier than JIRA 6.3 on MS SQL Server, making sure that the schema JIRA is installed in is called "jira", and the default schema of the user JIRA connects to MS SQL Server is something other than "jira", for example "dbo" (which is the default). JIRA actually encounters problems if the default schema is not set to "dbo".
- Make sure it's all working fine
- Upgrade to 6.3 or above
- Watch the atlassian-jira.log file for the error above
Workaround:
One of the following works around the issue:
Option 1
- Change schema name to something other than "jira". Update the dbconfig.xml file according to the changes.
Option 2
- Stop JIRA
- Change the default schema of the database user JIRA is using to be "jira"
- Start JIRA
- Allow the uprade task to complete - some things in JIRA will be broken such as the streams plugin
- Stop JIRA
- Remove the directories <jira-home>/plugins/bundled-plugins and <jira-home>/plugins/.osgi-plugins
- Change the default schema back to "dbo"
- Start JIRA
- JIRA should be working again
Related Content
This issue appears to be related to JRA-25270