Error on starting Jira 5.2.5 after upgrade from 4.4.4

Philippe Leménager
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 23, 2013

Hello,

I've just upgraded my test server from V 4.4.4 to V 5.2.5 and trying to access myserver:8080, I encountered this error :

Error occurred during export before upgrade: Erreur d'exportation de données : org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT ID, issueid, MIMETYPE, FILENAME, CREATED, FILESIZE, AUTHOR, zip, thumbnailable FROM jiratest.fileattachment (Unknown column 'zip' in 'field list')
If necessary, auto-export can be disabled; see http://www.atlassian.com/software/jira/docs/latest/upgrade/autoexport.html
com.atlassian.core.AtlassianCoreException:
Erreur d'exportation de données : org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT ID, issueid, MIMETYPE, FILENAME, CREATED, FILESIZE, AUTHOR, zip, thumbnailable FROM jiratest.fileattachment (Unknown column 'zip' in 'field list')
at com.atlassian.jira.bean.export.AutoExportImpl.exportData(AutoExportImpl.java:109)
at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeeded(UpgradeManagerImpl.java:371)
at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeededAndAllowed(UpgradeManagerImpl.java:327)
at com.atlassian.jira.upgrade.UpgradeLauncher.checkIfUpgradeNeeded(UpgradeLauncher.java:101)
at com.atlassian.jira.upgrade.UpgradeLauncher.start(UpgradeLauncher.java:49)
at com.atlassian.jira.startup.DefaultJiraLauncher$3.run(DefaultJiraLauncher.java:107)

Columns "zip" and "thumbnailable" don't exist in "fileattachment" table. They don't exist in the production database too, that is still in 4.4.4 version.

Are they new columns added in version 5.x ? Is the error due to a malfunction process during database upgrade ?

3 answers

1 accepted

0 votes
Answer accepted
Philippe Leménager
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 24, 2013

Finally, I've found the source of my problem !

In dbconfig.xml, I had the name of the database in the tag <schema-name> and with MySQL RDBMS, it MUST be empty.

After set it to null and restart, it ALTERs tables instead of CREATE them and now my test server is OK.

Problem solved !

0 votes
Philippe Leménager
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 24, 2013

I have downgraded to 4.4.4 version and tried to upgrade again to 5.2.5 and I encountered the same problem. Upgrade seems to success but when jira restarts after upgrade, it tries to CREATE tables instead of ALTER them then it fails because tables already exists in database. I can see this kind of messages in catalina.out log :

2013-01-25 10:45:29,919 localhost-startStop-1 WARN [core.entity.jdbc.DatabaseUtil] Entity "Action" has no table in the database
2013-01-25 10:45:30,033 localhost-startStop-1 ERROR [core.entity.jdbc.DatabaseUtil] Could not create table "jiratest.jiraaction"
2013-01-25 10:45:30,034 localhost-startStop-1 ERROR [core.entity.jdbc.DatabaseUtil] SQL Exception while executing the following:
CREATE TABLE jiratest.jiraaction (ID DECIMAL(18,0) NOT NULL, issueid DECIMAL(18,0), AUTHOR VARCHAR(255), actiontype VARCHAR(255), actionlevel VARCHAR(255), rolelevel DECIMAL(18,0), actionbody LONGTEXT, CREATED DATETIME, UPDATEAUTHOR VARCHAR(255), UPDATED DATETIME, actionnum DECIMAL(18,0), CONSTRAINT PK_jiraaction PRIMARY KEY (ID))
Error was: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'jiraaction' already exists

Then when trying to access new version of Jira, I encounter the problem described in my first message.

I will now try to do a new install (instead of an upgrade) with an empty database and restore datas from production server in XML format. Do you think it can be done like that ?

0 votes
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 23, 2013

Yes, those columns should have been added on upgrading. Try dropping all the tables in the test db and do another import, and keep the log. If there are any problems you can investigate them.

Philippe Leménager
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 23, 2013

How can I "do another import" ? Do you mean launch again the upgrade process ?

Suggest an answer

Log in or Sign up to answer