This page last changed on Jun 15, 2009 by rosie@atlassian.com.

These instructions will help you install JIRA on Caucho Resin.

This document is relevant to Resin 2.1.1, 2.1.2 and 2.1.8. For Resin 3.x, see this guide.

JIRA does not fully work with Resin 2.1.9 to 2.1.11, due to a Resin bug. See this issue detailing the problems. Similarly, internationalisation is broken on Resin 2.1.x — see this bug.

Please let us know if you have any problems (or it works with other versions) on the mailing list.

Resin is free for all non-commercial and development use - which makes it a great test environment for JIRA. Both JIRA and Resin can be setup in many ways — this is just one configuration that we have found works consistently for us.

On this page:

1. Install Resin

(if you don't already have Resin installed)

Download Resin from http://www.caucho.com/download/index.xtp and expand the distribution to a directory.

2. Configure Resin

2.1 Add extra Resin jars

Resin does not come with a few libraries that JIRA needs to run properly. These files have been placed in a zip file that you can download here. Unzip the jars in this file into the resin/lib directory.

2.2 Define database connection

You'll need to add a datasource for JIRA to use. The configuration of this datasource depends on which database you are using. Basically you need to copy your JDBC driver JAR file into the resin/lib directory and edit conf/resin.conf as follows (this example uses a hsql database):

          <resource-ref>
            <res-ref-name>jdbc/xa/JiraXADS</res-ref-name>
            <res-type>javax.sql.XADataSource</res-type>
            <init-param driver-name="org.hsqldb.jdbcDriver"/>
            <init-param url="jdbc:hsqldb:C:\database\jiraresindb"/>
            <init-param user="sa"/>
            <init-param password=""/>
        </resource-ref>

(If you are using a different database, please see the Resin DB Configuration guide for more information on datasources in Resin and the full configuration syntax).

We have had reports of problems when using Resin 2.1.12's bundled MySQL JDBC driver, so please use the "Connector/J" driver from the MySQL site.

3. Install JIRA

Download and unzip JIRA (but not with XP's unzipper nor the default tar utility on Solaris). Ensure that you download the WAR/EAR version, not the Standalone version that is recommended on the Downloads page.

Avoid the Windows XP built-in unzip tool! The built-in unzip tool in Windows XP is broken — it silently fails to extract files with long names (see JRA-2153 ). Other users have also reported problems using WinRAR. Please use another tool like WinZIP to unpack JIRA.
Avoid the Solaris default tar utility! On Solaris, please use GNU tar to unpack JIRA in order to handle long filenames. Do not use the Solaris default tar utility.

A new directory containing JIRA will be created, hereafter referred to as $JIRA_INSTALL.

If you are using Linux/UNIX: A dedicated user should be created to run JIRA, as JIRA runs as the user it is invoked under and therefore can potentially be abused. Here is an example of how to create a dedicated user to run JIRA in Linux:
$ sudo /usr/sbin/useradd --create-home --home-dir /usr/local/jira --shell /bin/bash jira

4. Configure JIRA

4.1 Modify transaction factory attribute

Modify the transaction factory in the entityengine.xml file, located in the edit-webapp/WEB-INF/classes directory.

Ensure that the <transaction-factory> tag looks like this (By default, JIRA's entityengine.xml should already look like the following):

<transaction-factory
      class="org.ofbiz.core.entity.transaction.JNDIFactory">
      <user-transaction-jndi jndi-server-name="default"
        jndi-name="java:comp/UserTransaction"/>
      <transaction-manager-jndi jndi-server-name="default"
        jndi-name="java:comp/UserTransaction"/>
</transaction-factory>
        

Note that in Resin java:comp/UserTransaction is a synonym for java:comp/TransactionManager.

4.2 Modify datasource attributes

Adjust database settings as appropriate. Change the database type to be the type you are using.

Here's the relevant section of the entityengine.xml file, as appropriate for the HSQL datasource configured in Resin above (the sections you might need to alter are in bold):

<datasource name="defaultDS"
    field-type-name="hsql"
    helper-class="org.ofbiz.core.entity.GenericHelperDAO"
    check-on-start="true"
    use-foreign-keys="false"
    use-foreign-key-indices="false"
    check-fks-on-start="false"
    check-fk-indices-on-start="false"
    add-missing-on-start="true">
    <jndi-jdbc jndi-server-name="default"
        jndi-name="java:comp/env/jdbc/xa/JiraXADS"/>
</datasource>

Make sure you change the jndi-name, as the default value is incorrect.

4.3 Set JIRA Home

To specify the location of your JIRA Home Directory (note that you need to do this before you build JIRA):

You can specify any location on a disk for your JIRA home directory. Please be sure to specify an absolute path.

Please note that you cannot use the same JIRA home directory for multiple instances of JIRA. We recommend that you do not specify your JIRA home directory inside your installation directory, to prevent information from being accidentally lost during major operations (e.g. backing up and restoring instances).

5. Build JIRA

Now build JIRA by typing build (Windows) or ./build.sh (Unix) on the command-line. This will produce the web application to deploy in the dist-generic directory.

6. Deploy JIRA in Resin

You can add the JIRA WAR to resin/resin.conf manually, or just copy it to the resin/webapps directory.

Placing the WAR in the resin/webapps directory should cause Resin to deploy it automatically when Resin starts.

7. Set mail.mime.decodeparameters

The following system property must be set in order for the JIRA mail handler to work correctly with emails from RFC 2231-compliant mail clients:

mail.mime.decodeparameters=true

System properties are set in different ways depending on your application server.

8. Start Resin

Start Resin if it is not already started (run httpd.exe in the resin/bin directory).

JIRA should now be accessible at http://yourhost.com/(insert name of your WAR file). Follow the Setup Wizard.

Troubleshooting

If certain pages break with errors like this:

        Note: sun.tools.javac.Main has been deprecated.
        /jira/secure/views/browser/browseproject.jsp:34: Variable pageContext may
        not have been initialized.
        pageContext.write(_jsp_string4, 0, _jsp_string4.length);
        ^
      

The solution is to change Resin's compiler from 'internal' to 'javac'. See this Resin FAQ for more background.

User-contributed notes

Have experiences to share with Resin and JIRA? We welcome your thoughts. Please see the user-contributed Resin notes.


jira-jars-resin.zip (application/zip)
Document generated by Confluence on Oct 06, 2009 00:31