|
|
|
[
Permlink
| « Hide
]
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.
Further testing with Orion 2.0.2 on the following databases with the ejb_location specified:
Transactions failed on both MS SQL Server and MySQL. Also verified that setAutoCommit to false is called for transactions within OfBiz.
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? 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.
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 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. 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? 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! The fix for
<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. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||