Bug 1009768 - [zanata-cli] proper error message when version does not exist
Summary: [zanata-cli] proper error message when version does not exist
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Zanata
Classification: Retired
Component: Component-zanata-client
Version: 3.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: Damian Jansen
QA Contact: Zanata-QA Mailling List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-19 06:10 UTC by Ding-Yi Chen
Modified: 2015-07-29 03:27 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-07-29 03:27:41 UTC


Attachments (Terms of Use)

Description Ding-Yi Chen 2013-09-19 06:10:00 UTC
Description of problem:
When pushing content with a non exist project-version, the error message shows:

[ERROR] Execution failed:
org.jboss.resteasy.spi.NotImplementedYetException
        at org.jboss.resteasy.client.core.BaseClientResponse.getLocation(BaseClientResponse

User might get wrong idea that pushing is not implement.

Version-Release number of selected component (if applicable):
zanata-cli-3.1.2
Zanata version 3.0.4-SNAPSHOT (20130919-0001)

How reproducible:
Always

Steps to Reproduce:
1. Pull or download an existing project-version
2. In zanata.xml, change <project-version> to
   <project-version>NOTEXIST</project-version>
3. zanata-cli  push -s . -t.

Actual results:
[ERROR] Failed to execute goal org.zanata:zanata-maven-plugin:3.1.2:push (default-cli) on project standalone-pom: Zanata mojo exception: NotImplementedYetException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.zanata:zanata-maven-plugin:3.1.2:push (default-cli) on project standalone-pom: Zanata mojo exception
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Zanata mojo exception
        at org.zanata.maven.ConfigurableMojo.execute(ConfigurableMojo.java:141)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 19 more
Caused by: org.jboss.resteasy.spi.NotImplementedYetException
        at org.jboss.resteasy.client.core.BaseClientResponse.getLocation(BaseClientResponse.java:698)
        at org.zanata.rest.client.ClientUtility.checkResult(ClientUtility.java:26)
        at org.zanata.client.commands.PushPullCommand.getDocListForProjectIterationFromServer(PushPullCommand.java:202)
        at org.zanata.client.commands.PushPullCommand.getQualifiedDocNamesForCurrentModuleFromServer(PushPullCommand.java:173)
        at org.zanata.client.commands.push.PushCommand.getObsoleteDocsInModuleFromServer(PushCommand.java:495)
        at org.zanata.client.commands.push.PushCommand.pushCurrentModule(PushCommand.java:332)
        at org.zanata.client.commands.push.PushCommand.run(PushCommand.java:207)
        at org.zanata.maven.ConfigurableMojo.runCommand(ConfigurableMojo.java:166)
        at org.zanata.maven.AbstractPushPullMojo.runCommand(AbstractPushPullMojo.java:41)
        at org.zanata.maven.ConfigurableMojo.execute(ConfigurableMojo.java:137)
        ... 21 more

Expected results:
Error message: Version NONEXIST does not exist for Project XXX.

Additional info:

Comment 1 Ding-Yi Chen 2015-03-23 02:38:03 UTC
with zanata-maven-plugin-3.4.2, zanata-server-3.6.0

It showed
[ERROR] Operation failed: Error status 404 Not Found returned

It will be better to show
(Project or version not found)

Comment 2 Zanata Migrator 2015-07-29 03:27:41 UTC
Migrated; check JIRA for bug status: http://zanata.atlassian.net/browse/ZNTA-275


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