JIRA DVCS Plugin Install Fails after Upgrade
Symptoms
When upgrading the DVCS plugin from 0.4 to 1.0.3, the JIRA throws SQL exceptions in the logs looking for a 'PASSWORD' column.
The following appears in the atlassian-jira.log
:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'PASSWORD' in 'field list'
com.atlassian.activeobjects.internal.ActiveObjectsSqlException: There was a SQL exception thrown by the Active Objects library:
Database:
- name:MySQL
- version:5.0.91-community-nt
- minor version:0
- major version:5
Driver:
- name:MySQL-AB JDBC Driver
- version:mysql-connector-java-5.1.10 ( Revision: ${svn.Revision} )
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'PASSWORD' in 'field list'
at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.create(EntityManagedActiveObjects.java:105)
at com.atlassian.jira.plugins.dvcs.activeobjects.v2.To_04_ActiveObjectsV2Migrator.upgrade(To_04_ActiveObjectsV2Migrator.java:53)
at com.atlassian.activeobjects.internal.ActiveObjectUpgradeManagerImpl$1.doInTransaction(ActiveObjectUpgradeManagerImpl.java:81)
at com.atlassian.activeobjects.internal.ActiveObjectUpgradeManagerImpl$1.doInTransaction(ActiveObjectUpgradeManagerImpl.java:76)
at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:25)
at com.atlassian.jira.DefaultHostContextAccessor.doInTransaction(DefaultHostContextAccessor.java:34) <+2> (DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
Cause
The upgrade of the Bitbucket connector v0.4 to the DVCS Connector v1.0.3 may have failed to upgrade the active object database tables properly resulting in SQL errors.
Workaround
Verify which tables are being used by the Plugin by checking the Plugin Data Storage page which can be found here:
Administration >> System >> Advanced >> Plugin Data Storage
For the DVCS plugin, the affected tables are:
ao_e8b6cc_issue_mapping
ao_e8b6cc_issue_mapping_v2
ao_e8b6cc_project_mapping
ao_e8b6cc_project_mapping_v2
One you have confirmed which Active Object tables are being used by the plugin,
Always back up your data before performing any modification to the database. If possible, try your modifications on a test server.
- Disable the plugin
- Bring down the JIRA instance
- Using your database tools, remove the affected tables
- Bring up the JIRA instance and enable the plugin and allow it to recreate the tables