Bug 867657 - [Maven Client] org.apache.maven.lifecycle.LifecycleExecutionException when pushing
[Maven Client] org.apache.maven.lifecycle.LifecycleExecutionException when pu...
Status: CLOSED CURRENTRELEASE
Product: Zanata
Classification: Community
Component: Component-Maven (Show other bugs)
development
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 2.0
Assigned To: Carlos Munoz
Ding-Yi Chen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-17 20:18 EDT by Ding-Yi Chen
Modified: 2012-11-07 01:18 EST (History)
1 user (show)

See Also:
Fixed In Version: 1.8.0-SNAPSHOT (20121022-1434)
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-07 01:18:18 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Error message (6.16 KB, text/plain)
2012-10-17 20:18 EDT, Ding-Yi Chen
no flags Details

  None (edit)
Description Ding-Yi Chen 2012-10-17 20:18:35 EDT
Created attachment 629133 [details]
Error message

Description of problem:

When push with maven client, followiong error messages appears.
[ERROR] Failed to execute goal org.zanata:zanata-maven-plugin:1.8.0-SNAPSHOT:push (default-cli) on project null: Zanata mojo exception: Failed while pushing document: [] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.zanata:zanata-maven-plugin:1.8.0-SNAPSHOT:push (default-cli) on project null: Zanata mojo exception


Version-Release number of selected component (if applicable):
Zanata version 1.8.0-SNAPSHOT (20121018-0030)
Client: [INFO] client API version: 1.8.0-SNAPSHOT, server API version: 1.8.0-SNAPSHOT


How reproducible:
Always

Steps to Reproduce:
1. Download a sufficient large project, such as freeciv (http://www.cazfi.net/freeciv/translations/S2_5/)
2. mvn -e zanata:push
  
Actual results:
Error message: [ERROR] Failed to execute goal org.zanata:zanata-maven-plugin:1.8.0-SNAPSHOT:push (default-cli) on project null: Zanata mojo exception: Failed while pushing document: [] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.zanata:zanata-maven-plugin:1.8.0-SNAPSHOT:push (default-cli) on project null: Zanata mojo exception


Expected results:
Success without any error.

Additional info:
Comment 1 Carlos Munoz 2012-10-17 21:49:13 EDT
This is a problem with the way Seam runs asynchronous processes. The asynchronous process doesn't inherit the contexts from the invocation that started it. Hence, no session information is carried forward and the push fails as the security checks for some of the activities might fail. 

Added a way to specify the identity with which to run the async process (so far only works with the REST API).

See:
https://github.com/zanata/zanata/commit/2c5ef50c198e43b4db9ae89cbdb2f82c8d3cb15d
Comment 2 Ding-Yi Chen 2012-10-18 02:21:43 EDT
Tested with Zanata version 1.8.0-SNAPSHOT (20121018-1429).

The push still  failed when pushing from different terminal with translation.

The error is not always reproduceable, but frequent enough.

Step to reproduce

1. Prepare project freeciv:
   a. Create project freeciv
   b. Create version master
   c. wget http://www.cazfi.net/freeciv/translations/S2_5/freeciv.pot
   d. wget http://www.cazfi.net/freeciv/translations/S2_5/zh-CN.po.bz2
      bunzip2 zh-CN.po.bz2
      mkdir zh-Hans
      mv zh-CN.po zh-Hans/freeciv.po
   e. wget http://www.cazfi.net/freeciv/translations/S2_5/zh-TW.po.bz2
      bunzip2 zh-TW.po.bz2
      mkdir zh-Hant
      mv zh-TW.po zh-Hant/freeciv.po
   f. Editing zanata.xml and pom.xml accordingly
2. Open 2 terminal
3. On terminal 1, run:
   mvn -B -e zanata:push -Dzanata.pushType=both
4. No need to wait for step 3 finish, on terminal 2, run:
   mvn -B -e zanata:push -Dzanata.pushType=both

Actual:
[ERROR] Failed to execute goal org.zanata:zanata-maven-plugin:1.8.0-SNAPSHOT:push (default-cli) on project null: Zanata mojo exception: Failed while pushing document translations: [] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.zanata:zanata-maven-plugin:1.8.0-SNAPSHOT:push (default-cli) on project null: Zanata mojo exception


Expected:
Push without error

Reassigned.
Comment 3 Carlos Munoz 2012-10-19 01:20:49 EDT
It seems large documents (in this case translated documents) were still generating transaction timeouts on the server. The server will now break up client translation pushes into several transactions to avoid this problem. This means that errors or client cancellations will not rollback all changes to that point. It also means that subsequent pushes of the same document will not repeat any work already done.

See:
https://github.com/zanata/zanata/commit/c11c40ccc4bd0c15834ab1a93a9a52c326ebf680
Comment 4 Ding-Yi Chen 2012-10-22 02:25:22 EDT
VERIFIED with Zanata version 1.8.0-SNAPSHOT (20121022-1434)
[INFO] client API version: 1.8.0-SNAPSHOT, server API version: 1.8.0-SNAPSHOT
Comment 5 Sean Flanigan 2012-11-07 01:18:18 EST
Fix released in Zanata 2.0.

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