History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRA-10132
Type: Task Task
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Scott Farquhar [Atlassian]
Reporter: Keith Brophy
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JIRA

Investigate ejb_location setting within App Server configuration

Created: 10/May/06 07:50 PM   Updated: 30/Nov/06 07:43 PM
Component/s: None
Affects Version/s: 3.6
Fix Version/s: 3.7

Time Tracking:
Original Estimate: 3 hours
Original Estimate - 3 hours
Remaining Estimate: 1 hour
Time Spent - 2 hours Remaining Estimate - 1 hour
Time Spent: 2 hours
Time Spent - 2 hours Remaining Estimate - 1 hour

File Attachments: 1. XML File data-sources.xml (1 kb)
2. Text File exception.txt (6 kb)
3. Zip Archive jra-10132-patch.zip (6 kb)

Issue Links:
Reference
 

Participants: Andreas Knecht [Atlassian], Jed Wesley-Smith [Atlassian], Keith Brophy, Nicolas Brough and Scott Farquhar [Atlassian]
Since last comment: 75 weeks, 3 days ago
Resolution Date: 30/Nov/06 07:43 PM
Labels:


 Description  « Hide
Need to investigate the ejb_location setting within the app server configurations.

At present, using Orion 2.0.2 and MS SQL Server, with the ejb_location setting configured in the data-sources.xml, results in errors regarding attempts to commit a transaction while in auto_commit mode.

This problem can be replicated while attempting a workflow migration (a JIRA managed transactional operation).

Need to investigate this setting on the other App Servers (e.g. Tomcat, Resin) and databases (e.g. Postgres, HSQL).

Also, investigate the need to set auto_commit to false while executing JIRA transactional operations - or does Ofbiz do this automatically.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Keith Brophy - 10/May/06 07:55 PM
The attached files include the exception encountered and a sample data-sources.xml file with the ejb_location setting configured.

Keith Brophy - 23/May/06 07:16 PM
Further testing with Orion 2.0.2 on the following databases with the ejb_location specified:
Database Driver Testing
MS SQL Server 2000 JTDS 1.0.2
MySQL 11.18 MySQL Connector 3.1.12
HSQL hsql 1.7.1 Patched
Postgres 7.3.4 pg73jdbc3

Transactions failed on both MS SQL Server and MySQL.


Keith Brophy - 23/May/06 08:06 PM
Also verified that setAutoCommit to false is called for transactions within OfBiz.

Keith Brophy - 25/Jul/06 06:22 PM
This is propbably a minor issue as it was only reported by one user - and it only affects Orion users.

Did some extensive testing - but there was no decision made as how to address this.

Would any of the transaction investigations Anton worked on with MS SQL Server apply here?


Jed Wesley-Smith [Atlassian] - 25/Sep/06 07:55 PM
This has been tracked down to the way that Orion returns Connections in some cases, where it will return Connections that have their autocommit mode set to false by default. We have some code in 3.6.x that assumes the autocommit mode is true, and never actually checks it or sets it explicitly. We are preparing a patch for 3.6.x and will fix this properly in 3.7.

Jed Wesley-Smith [Atlassian] - 25/Sep/06 08:37 PM
Attached is a patch that will fix this issue in Orion for MSSQL and mySQL. It specifically patches the importer and the indexing functions and is only relevant if the DataSource is specified in the data-sources.xml as a pooled-location (which it really should be).

This patch allows the use of pooled-location which is the preferred method of specifying the JIRA datasource. In 3.7 we will fix this properly and update the documentation to use pooled-location rather than ejb-location


Jed Wesley-Smith [Atlassian] - 25/Sep/06 08:55 PM
To apply the patch, please unzip [^JRA-10132-patch.zip] in the */dist-generic/atlassian-jira-3.6.3/WEB-INF directory of your WAR distribution (substitute atlassian-jira-3.6.3) for the appropriate 3.6 version you are running. The individual files will overwrite the classes as required.

The zip file contains two classes:

classes/com/atlassian/jira/action/admin/ImportParser.class 
classes/com/atlassian/jira/issue/index/MultiThreadedIssueIndexer.class

Please verify that these have been correctly overwritten.

You also must specify a pooled-location such as the following:

    <data-source
            class="com.evermind.sql.DriverManagerDataSource"
            name="JiraData"
            location="jdbc/core/JiraDS"
            pooled-location="jdbc/JiraDS"
            connection-driver="net.sourceforge.jtds.jdbc.Driver"
            username="jirauser"
            password="jirapassword"
            url="jdbc:jtds:sqlserver://sqlserver.mycompany.com:1433/jira"
            inactivity-timeout="30"
    />

where the pooled-location name is the one you specify in your entityengine.xml datasource's JNDI name.

After this, run your build.bat/build.sh to recreate the WAR file and redeploy.


Nicolas Brough - 31/Oct/06 06:51 AM
For the record, it happens in Enterprise 3.6.4 on Orion 2.0.2 / Jtds 1.2 / MS-SQL Server 2000.

We build Jira as an EAR, so I wasn't sure what I was doing, but I was able to unpack the fix over the top of the dist-generic after the build and it does fix it. Just an extra step to remember after I've run build.sh (until 3.7 is out).

Any idea if changing to a different version of Orion would fix it? I'm happy to jump to latest-stable if someone can recommend it?


Nicolas Brough - 31/Oct/06 04:03 PM
Right, I've got a "dev" Jira which fell over with this issue. Got it all working as above. Came to apply it to "Production", and thought "I'll just check I can replicate it after a quick backup".

And my Production Jira does not crash. It's got the same plugins, same dubious tweaks I wrote, same version of Orion, Jtds and Ms-SQL Server 2k, and about 3 weeks more data (we don't delete issues).

So I'm really happy - no need for patching! Just seems weird to me!


Andreas Knecht [Atlassian] - 30/Nov/06 07:43 PM
The fix for JRA-9492 also resolves the problems recored in this issue if a pooled datasource is used. For example:
<data-source
        class="com.evermind.sql.DriverManagerDataSource"
        name="JIRA database"
        location="jdbc/JiraCoreDS"
        xa-location="jdbc/xa/JiraXADS"
        pooled-location="jdbc/JiraDS"
        connection-driver="net.sourceforge.jtds.jdbc.Driver"
        username="sa"
        password="password"
        url="jdbc:jtds:sqlserver://192.168.0.169:1433/jiratest"
        inactivity-timeout="30"
    />

The JIRA 3.7 docs have been updated to reflect this change.