Unable to Setup Database for Jira - Database is not empty

Shawn Wallack November 28, 2018

I am attempting the Atlassian DragonSlayer challenge and a experiencing a problem setting up Jira.

I did the following:

  1. Installed Oracle JDK.
  2. Installed PostGreSQL
  3. Installed JIRA 6.3.15 (Windows 64 Bit)

When attempting to setup Jira in Chrome with the settings set forth in the Dragon Slayer instructions, I get the following error when I click "Test Connection" or "Next": 

"You have specified a database that is not empty, please specify an empty database."

I just installed this database a few minutes ago, so I'm not sure why it wouldn't be empty. 

I tried using the JIRA Configuration Tool with the same settings to circumvent the problem. In that tool, when I click "Test Connection," the connection works (great!). However, when I click "Save," I get a different error:

..\atlassian-jira\WEB-INF\classes\jira-application.properties (Access is denied)

I cannot get past this. The documentation on these errors has not proved helpful to me. Any suggestions?

4 answers

1 accepted

0 votes
Answer accepted
Shawn Wallack November 30, 2018

It turned out to be a conflict with versions. O ended up uninstalling everything and reinstalling everything. That resolved this problem. Now I can't get into Confluence. I posted a different question for that.

1 vote
Felix Lehner February 24, 2020

So I had the same Problem. The solution was to delete the extensions (pg_buffercache, pg_stat_statements) in my Postgres-Database. jfyi

0 votes
oswaldo zapata July 29, 2019

when installing drivers ensure to use the right for your database version, I installed for mysql 5.7 this one mysql-connector-java-8.0.17.tar.gz but then I was getting always the your database is not empty error, so then I followed the recomendatios  on https://confluence.atlassian.com/adminjiraserver/connecting-jira-applications-to-mysql-5-7-966063305.html 

 section 2. Copy the MySQL JDBC driver   mysql-connector-java-5.1.47.zip

then my installation just worked perfect 

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 29, 2018

The fact you see that access is denied message is an indication that the user account you are utilizing to run the config utility does not have the filesystem permissions needed to save that file to that directory on the operating system.   And if the config utility can't save files, then you won't have a JIRAHOME set, and Jira won't know where your database settings are (kept in $JIRAHOME/dbconfig.xml file).   So it seems clear to me that your first problem (database) is actually being caused by the second problem (file system permissions).

Being this is a windows system, the way I would recommend trying to get past this problem would be to first make sure you're logged into Windows with an administrator account, and then right click on the config.bat file and choose 'Run as Administrator'.  I have seen Windows UAC be the culprit when the config utility cannot function as expected in cases like this.

If Windows has UAC settings turned up really high, you might get a warning prompt of some kind that you will need to accept to make sure that your account can run that utility in a manner where it can create/save changes in the directories needed.   If this still does not help, I'd recommend trying to Turn off UAC in Windows and try to run the utility again.

Suggest an answer

Log in or Sign up to answer