Documentation for JIRA 4.4. Documentation for other versions of JIRA is available too.

Skip to end of metadata
Go to start of metadata

Background

JIRA needs to know what kind of database it will be using, in order to generate database tables of the correct data types, and to generate correctly formatted SQL. The database type is specified in atlassian-jira/WEB-INF/classes/entityengine.xml (JIRA Standalone), or edit-webapp/WEB-INF/classes/entityengine.xml (JIRA WAR/Webapp):

In this example, JIRA expects to use HSQLDB (the default for JIRA Standalone).

If you've got it wrong ...

If you forgot to edit the entityengine.xml file (see the documentation), then follow these steps to recover:

1. Fix the type in entityengine.xml

  • If you are using JIRA Standalone, edit atlassian-jira/WEB-INF/classes/entityengine.xml, and correct the database type (valid types are listed in entityengine.xml). See the Using External Databases with JIRA Standalone guide to check if you haven't made other mistakes.
  • If you're running JIRA as an EAR/WAR distribution, you need to:
    • Edit edit-webapp/WEB-INF/classes/entityengine.xml and fix the type, as above.
    • Run build.bat or build.sh in the root, to rebuild the JIRA webapp.
    • Deploy the rebuilt webapp into your app server.

2. Fix the database

Is this the first time you have run JIRA?

If so, the database has been created incorrectly. Specifically, table columns have been created with incorrect data types, and you will see warnings like these in the logs:

The solution is to drop (delete) and recreate the database. When next restarted with the correct data types, JIRA will recreate the tables correctly.

Upgrading JIRA?

This situation is potentially problematic, because the newer version of JIRA may have added tables or columns with incorrect data types to your existing database schema.

The safest solution is to start a new database, and import an XML backup made before the upgrade.

If for some reason, you cannot import an XML backup (eg. your upgraded instance has been in production for a few days and contains new data), it is generally possible to patch the database by hand with SQL 'alter table' statements. Please review the log files for information on what types JIRA expects, and what is actually present. JIRA will print this information every time it starts up. If in doubt, attach the logs and other relevant information to a support request on our support system.

Other situations

If this is not the first time JIRA has loaded, and you are not upgrading, you probably do not need to fix the data. After fixing the entityengine.xml file, restart and check the logs for errors. If there are none, the database is fine.

Need help?

Please create a support request and attach the startup logs, your current entityengine.xml file, and any other information relevant.

  • No labels