JIRA
Install
Admin
Use
Search JIRA documentation:

Installing JIRA on Caucho Resin 2.1

PDF
PDF

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.

Warning
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, internationalization 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.

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

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.1 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.).

Note
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. Configure JIRA

3.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.

3.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. 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.

5. 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.

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).

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.