Bug 1148214

Summary: [REGRESSION] Cannot reject a translation
Product: [Retired] Zanata Reporter: Damian Jansen <djansen>
Component: Component-LogicAssignee: Alex Eng <aeng>
Status: CLOSED CURRENTRELEASE QA Contact: Damian Jansen <djansen>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 3.5CC: dchen, zanata-bugs
Target Milestone: ---Keywords: Triaged
Target Release: 3.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-26 23:27:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Damian Jansen 2014-10-01 00:49:45 UTC
Description of problem:
The Confirm button on rejecting a translation no longer works. An exception is thrown:
10:40:32,138 ERROR [org.zanata.webtrans.server.SeamDispatch] (http-/127.0.0.1:8080-1) Error dispatching action: java.lang.ClassCastException: org.hibernate.action.internal.EntityIdentityInsertAction cannot be cast to org.hibernate.action.internal.EntityInsertAction: java.lang.ClassCastException: org.hibernate.action.internal.EntityIdentityInsertAction cannot be cast to org.hibernate.action.internal.EntityInsertAction

Version-Release number of selected component (if applicable):
3.5

How reproducible:
Easy always

Steps to Reproduce:
1. Go to any project where the user is a reviewer (or admin)
2. Select a version, language, document
3. On any translation target, enter some text and press the Reject (thumbs down) button

Actual results:
Nothing (except an exception)

Expected results:
Translation is set to rejected

Additional info:

Comment 2 Alex Eng 2014-10-01 01:42:28 UTC
Related to issue in http://stackoverflow.com/questions/7412252/hibernate-java-lang-classcastexception-org-hibernate-action-entityidentityinser. 

Saving works when I remove this line from standalone.xml
<property name="hibernate.order_inserts" value="true" />

Comment 3 Alex Eng 2014-10-01 01:55:48 UTC
Pull request:
https://github.com/zanata/zanata-server/pull/594

Comment 4 Alex Eng 2014-10-01 03:15:50 UTC
Updated pull request to target release:

https://github.com/zanata/zanata-server/pull/595

Comment 5 Damian Jansen 2014-10-01 05:32:09 UTC
Verified on 3.5.0-SNAPSHOT (git-jenkins-zanata-server-build+verify-nightly-release-1167-299-ga85e7f8)