This page last changed on Aug 17, 2009 by rosie@atlassian.com.

This page has general notes on installing JIRA on Resin.

 

keep-alive bug with Apache 2 affecting JIRA performance

On http://jira.atlassian.com (running Resin behind Apache), we found that Resin was serving each hit with a Connection: Close header. This meant that for each resource requested (image, CSS, html etc) the browser needed to open a new connection, slowing things down.

This turned out to be a bug in Resin when used with Apache. We upgraded to Resin 3.0.19 and this fixed the problem. Resources are now served with Connection: Keep-Alive.

To check if you are experiencing this problem, download livehttpheaders for Firefox, and look at the response headers for a JIRA page request.

Error on startup using schema name 'JIRA'

On startup, Jira reports that tables are missing from the database even though the database contains the specified tables. The problem only occurs with tables whose names start with "jira" No such errors are reported for other tables. Here is the reported exception in the logs:

2006-10-04 16:57:56,959 [core.entity.jdbc.DatabaseUtil] Entity "Action" has no table in the database
2006-10-04 16:57:56,972 [core.entity.jdbc.DatabaseUtil] Could not create table "JIRA.jiraaction"
2006-10-04 16:57:56,973 [core.entity.jdbc.DatabaseUtil] SQL Exception while executing the following:
CREATE TABLE JIRA.jiraaction (ID DECIMAL(18,0) NOT NULL, issueid DECIMAL(18,0), AUTHOR VARCHAR(255), actiontype VARCHAR(255), actionlevel VARCHAR(255), actionbody CLOB, CREATED TIMESTAMP, actionnum DECIMAL(18,0), CONSTRAINT PK_jiraaction PRIMARY KEY (ID))
Error was: com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -601, SQLSTATE: 42710, SQLERRMC: JIRA.JIRAACTION;TABLE
2006-10-04 16:57:56,974 [core.entity.jdbc.DatabaseUtil] Entity "EventType" has no table in the database
2006-10-04 16:57:56,976 [core.entity.jdbc.DatabaseUtil] Could not create table "JIRA.jiraeventtype"
2006-10-04 16:57:56,977 [core.entity.jdbc.DatabaseUtil] SQL Exception while executing the following:
CREATE TABLE JIRA.jiraeventtype (ID DECIMAL(18,0) NOT NULL, TEMPLATE_ID DECIMAL(18,0), NAME VARCHAR(255), DESCRIPTION CLOB, TYPE VARCHAR(60), CONSTRAINT PK_jiraeventtyp PRIMARY KEY (ID))
Error was: com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -601, SQLSTATE: 42710, SQLERRMC: JIRA.JIRAEVENTTYPE;TABLE
2006-10-04 16:57:56,979 [core.entity.jdbc.DatabaseUtil] Entity "Issue" has no table in the database
2006-10-04 16:57:56,981 [core.entity.jdbc.DatabaseUtil] Could not create table "JIRA.jiraissue"
2006-10-04 16:57:56,981 [core.entity.jdbc.DatabaseUtil] SQL Exception while executing the following:
CREATE TABLE JIRA.jiraissue (ID DECIMAL(18,0) NOT NULL, pkey VARCHAR(255), PROJECT DECIMAL(18,0), REPORTER VARCHAR(255), ASSIGNEE VARCHAR(255), issuetype VARCHAR(255), SUMMARY VARCHAR(255), DESCRIPTION CLOB, ENVIRONMENT CLOB, PRIORITY VARCHAR(255), RESOLUTION VARCHAR(255), issuestatus VARCHAR(255), CREATED TIMESTAMP, UPDATED TIMESTAMP, DUEDATE TIMESTAMP, VOTES DECIMAL(18,0), TIMEORIGINALESTIMATE DECIMAL(18,0), TIMEESTIMATE DECIMAL(18,0), TIMESPENT DECIMAL(18,0), WORKFLOW_ID DECIMAL(18,0), SECURITY DECIMAL(18,0), FIXFOR DECIMAL(18,0), COMPONENT DECIMAL(18,0), CONSTRAINT PK_jiraissue PRIMARY KEY (ID))
Error was: com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -601, SQLSTATE: 42710, SQLERRMC: JIRA.JIRAISSUE;TABLE
2006-10-04 16:57:56,984 [core.entity.jdbc.DatabaseUtil] Entity "Permission" has no table in the database
2006-10-04 16:57:56,986 [core.entity.jdbc.DatabaseUtil] Could not create table "JIRA.jiraperms"
2006-10-04 16:57:56,986 [core.entity.jdbc.DatabaseUtil] SQL Exception while executing the following:
CREATE TABLE JIRA.jiraperms (ID DECIMAL(18,0) NOT NULL, permtype DECIMAL(18,0), projectid DECIMAL(18,0), groupname VARCHAR(255), CONSTRAINT PK_jiraperms PRIMARY KEY (ID))
Error was: com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -601, SQLSTATE: 42710, SQLERRMC: JIRA.JIRAPERMS;TABLE
2006-10-04 16:57:56,990 [core.entity.jdbc.DatabaseUtil] Entity "Workflow" has no table in the database
2006-10-04 16:57:56,992 [core.entity.jdbc.DatabaseUtil] Could not create table "JIRA.jiraworkflows"
2006-10-04 16:57:56,992 [core.entity.jdbc.DatabaseUtil] SQL Exception while executing the following:
CREATE TABLE JIRA.jiraworkflows (ID DECIMAL(18,0) NOT NULL, workflowname VARCHAR(255), creatorname VARCHAR(255), DESCRIPTOR CLOB, ISLOCKED VARCHAR(60), CONSTRAINT PK_jiraworkflow PRIMARY KEY (ID))
Error was: com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -601, SQLSTATE: 42710, SQLERRMC: JIRA.JIRAWORKFLOWS;TABLE
2006-10-04 16:57:56,993 [core.entity.jdbc.DatabaseUtil] Table named "JIRAACTION" exists in the database but has no corresponding entity

We got this error just after installation and first restart. This was before we went to the Jira start up page.

We noticed that the problem only occurs with schema name "JIRA" - no errors were reported when we used another schema like "JIRATEST".

Error when restoring from backup XML using Resin 3.0.x

Importing a backup XML via (Administration -> Import & Export -> Backup Data to XML) produces the following error on Resin 3.0.19

[11:25:27.312] Closing dangling connections.  All connections must have a close() in a finally block.
[11:25:27.312] java.lang.IllegalStateException: Connection UserConnection[com.caucho.sql.ManagedConnectionImpl@12398ed] was not closed. Connections must have a close() in a finally block.

which was a bug raised here. Upgrading to Resin 3.0.21 seems to have fixed this.

JIRA and SOAP on Resin

Symptom

The WSDL generated by JIRA on the Resin application server is invalid. Attempting to parse it gives you an error like this (using Axis as the client):

WSDLException (at /wsdl:definitions/types): faultCode=INVALID_WSDL: Encountered illegal extension element 'types' in the context of a 'javax.wsdl.Definition'. Extension elements must be in a namespace other than WSDL's.:

Cause

The default XML parser included with the Resin application server is incompatible with the Axis SOAP library, and causes Axis to generate an invalid WSDL file. You can find information about this issue here:

Solution

The solution is to override Resin's default XML parser by placing the following within the <server> section of resin.conf:

<system-property javax.xml.parsers.DocumentBuilderFactory="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/>
<system-property javax.xml.parsers.SAXParserFactory="org.apache.xerces.jaxp.SAXParserFactoryImpl"/>

(You can also make this configuration per web-app by putting it in the <web-app> section. For more information see this page: JAXP - specifying XML and XSLT implementations)

The Confluence issue for this error is here:

Trusted Application feature fails on Resin 2.1.x

Symptom

As reported in this issue, if theTrusted Application feature is not working and the following is seen in the logs

WARN [atlassian.seraph.filter.TrustedApplicationsFilter] Failed to login trusted application: confluence1234567 due to:
    com.atlassian.security.auth.trustedapps.InvalidCertificateException: TestTrustedApplicationClient.id
    cause: java.lang.SecurityException: JCE cannot authenticate the provider BC

The important bit is: java.lang.SecurityException: JCE cannot authenticate the provider BC

To diagnose you can [turn on DEBUG logging|link] for the com.atlassian.seraph package to see the stack trace in the log. If the following is shown:

Caused by: java.lang.SecurityException: JCE cannot authenticate the provider BC
	at javax.crypto.Cipher.getInstance(DashoA12275)
	at javax.crypto.Cipher.getInstance(DashoA12275)
	at com.atlassian.security.auth.trustedapps.BouncyCastleEncryptionProvider.decodeEncryptedCertificate(BouncyCastleEncryptionProvider.java:123)
	... 29 more
Caused by: java.util.jar.JarException: Class is on the bootclasspath
	at javax.crypto.SunJCE_d.a(DashoA12275)
	at javax.crypto.SunJCE_b.b(DashoA12275)
	at javax.crypto.SunJCE_b.a(DashoA12275)
	... 32 more

and the bcprov jar is definitely not on the boot class path, the problem is caused by an errant ClassLoader that defines the class without providing a valid ProtectionDomain object. Essentially, security provider classes must be loaded using the correct ClassLoader method.

Solution

The solution is to add the Bouncy Castle security provider jar to the application server classpath. For Resin this means to add bcprov-jdk14-138.jar to the server/lib directory.


add your notes

Document generated by Confluence on Oct 06, 2009 00:31