Bug 1056655 - Error reading or updating a topic: thread is already associated with a transaction
Summary: Error reading or updating a topic: thread is already associated with a transa...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: PressGang CCMS
Classification: Community
Component: Web-UI
Version: 3.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 1.4
Assignee: pressgang-ccms-dev
QA Contact:
URL:
Whiteboard:
: 1056695 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-22 16:17 UTC by sgilda
Modified: 2014-01-29 06:39 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-01-29 06:39:55 UTC
Embargoed:


Attachments (Terms of Use)

Description sgilda 2014-01-22 16:17:36 UTC
Description of problem:
To recreate: 
1. I edited topic 252.
2. I uppercased all instances of ZIP, including the title.
3. I clicked 'Save' and entered a comment.
4. I get an Alert with the following message:

An error occurred on the server. Please try again and if this problem persists, please log a bug.

javax.transaction.NotSupportedException: BaseTransaction.checkTransactionState - ARJUNA016051: thread is already associated with a transaction!
Version-Release number of selected component (if applicable):

I tried to access a different topic and am not able to open any to edit. I get the same message on the read.

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Matthew Casperson 2014-01-22 21:09:27 UTC
Possible fix has been checked in at https://github.com/pressgang-ccms/PressGangCCMSREST/blob/devel/src/main/java/org/jboss/pressgang/ccms/server/rest/v1/base/BaseRESTv1.java#L1478

I have deployed this version to the dev server for testing.

Comment 4 Matthew Casperson 2014-01-22 22:08:30 UTC
*** Bug 1056695 has been marked as a duplicate of this bug. ***

Comment 5 Lee Newson 2014-01-22 22:55:00 UTC
The actual commit is here (incase that class changes in anyway): https://github.com/pressgang-ccms/PressGangCCMSREST/commit/3db1f5a3a8928002316daf6a1f3ca7af39950bf7

Comment 6 Lee Newson 2014-01-23 00:21:56 UTC
Did some testing this morning and it appears to fix the "thread is already associated with a transaction", however it doesn't take into account that the transaction might not have been active. This was then throwing exceptions if for example the expand content wasn't valid json, so i've re-added the status check but removed the rollback status conditions.

See: https://github.com/pressgang-ccms/PressGangCCMSREST/commit/01958eb69df859c0c8893ca0a20bfe57fe4e5afd

Comment 8 Lee Newson 2014-01-29 06:39:55 UTC
Moving to CLOSED CURRENTRELEASE as we've been using this fix for a week on the test server without issues. It has also been active in production for 4 business days.


Note You need to log in before you can comment on or make changes to this bug.