Tuesday, March 2, 2010

JIRA WAR Tomcat Installation

I have been trying to setup a single Tomcat 6.0.x server to maintain a number of project lifecycle apps. One of these apps is JIRA. I found documentation that described how to setup JIRA as an EAR/WAR. However the method defined involved copying was a number of jar files into the Tomcat server lib directory that I was uncomfortable with. I wanted to keep the number of jars going into the server lib folder to a minimum. After some work, the only jar I had to put in the tomcat/lib folder was the MySQL JDBC driver.

The following instructions describe the steps that I took to achieve this.

  • MacOSX (Snow Leopard)
  • JIRA version 4.0.2
  • MySQL

1. Download the EAR/WAR version of JIRA (NOTE if it isn't visible on the downloads page then look for the small link that says "Show All" rather than just recommended.

2. Once downloaded, unpack the archive to a folder. From now on know as $JIRA_INSTALL. According to the Atlassian website there have been reported problems with the Windows extractor not extracting all files and a similar situation with WinRAR. Try using WinZip or another alternative.

3. Download and install mysql. This is beyond the scope of this post but there are plenty of good howto's and tutorials out there on how to do it.

4. Once my sql is installed we need to create a user for our jira database. Run the following commands to create the user replacing the changeme100 with your desired password:

5. Now we need to create the jira db. Log into MySQL as an administrator and run the following commands replacing the changeme100 with your desired password:

CREATE DATABSE jiradb character set utf8;
CREATE USER 'jira'@'localhost' IDENTIFIED BY 'changeme100';

6. Download the mysql Connector/J JDBC driver and place the jar file in your $CATALINA_HOME/lib folder.

7. Open $JIRA_INSTALL/edit-webapp/WEB-INF/class/entityengine.xml in a text editor and change the

<datasource name="defaultDS" class="org.ofbiz.core.entity.GenericHelperDAO" keys="false" indices="false" start="true">
<jndi-jdbc name="default">


<datasource name="defaultDS" class="org.ofbiz.core.entity.GenericHelperDAO" keys="false" indices="false" check="" start="true">
<jndi-jdbc name="default">

8. Open $JIRA_INSTALL/edit-webapp/WEB-INF/classes/jira-application.properties in a text editor and change the "jira.home" property near the top of the file to an absolute folder. I'm using /usr/share/jira.

10. Download the required Tomcat jars for JIRA to work. Unzip the folder and copy the contents (jar files) into the $JIRA_INSTALL/webapp/WEB-INF/lib folder.

11. Create a new folder called META-INF in the $JIRA_INSTALL/edit-webapp/META-INF folder and then create a new file called context.xml inside it. Open this file up in a text editor and add the following contents:

<context path="/jira">
<resource name="jdbc/JiraDS" auth="Container" type="javax.sql.DataSource" username="jira" password="changeme100" driverclassname="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost/jiradb"/>

<resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction" factory="org.objectweb.jotm.UserTransactionFactory" timeout="60">
<manager pathname=""/>

12. Now in a command window go to the $JIRA_INSTALL folder and run build.bat (Windows) or ./build.sh (Unix/Linux/Mac).

13. Once the build is complete copy the $JIRA_INSTALL/dist-tomcat/atlassian-jira-4.0.2.war to your $CATALINA_HOME/webapps folder

14. You should now be able to start up your tomcat instance and browse to http://localhost:8080/jira.

Please let me know if you have any issues or problems :)


  1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Java developer learn from Java Training in Chennai. or learn thru Java Online Training from India . Nowadays Java has tons of job opportunities on various vertical industry.

  2. Really very nice blog information for this one and more technical skills are improve,i like that kind of post.
    Best Devops online Training
    Online DevOps Certification Course - Gangboard

  3. It seems you are so busy in last month. The detail you shared about your work and it is really impressive that's why i am waiting for your post because i get the new ideas over here and you really write so well.

    Selenium training in Chennai
    Selenium training in Bangalore
    Selenium training in Pune
    Selenium Online training
    Selenium training in bangalore

  4. Thank you for benefiting from time to focus on this kind of, I feel firmly about it and also really like comprehending far more with this particular subject matter. In case doable, when you get know-how, is it possible to thoughts modernizing your site together with far more details? It’s extremely useful to me
    online Python training
    python training in chennai

  5. Saved as a favorite, I really like your site! See this website: How To Password Protect Folder In 10 Minutes And Still Look Your Best

  6. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
    Selenium Training in Electronic City

  7. Whatever we gathered information from the blogs, we should implement that in practically then only we can understand that exact thing clearly, but it’s no need to do it, because you have explained the concepts very well. It was crystal clear, keep sharing..
    Java Training in Chennai
    Java Training in Coimbatore
    Java Training in Bangalore