Bug 1193297
| Summary: | [mvn] When transLang is missing from glossary-push compendium PO file, error message "transLang is required" should be shown instead of NullPointerException | ||
|---|---|---|---|
| Product: | [Retired] Zanata | Reporter: | Ding-Yi Chen <dchen> |
| Component: | Component-Maven | Assignee: | Patrick Huang <pahuang> |
| Status: | CLOSED UPSTREAM | QA Contact: | Zanata-QA Mailling List <zanata-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | client-3.4 | CC: | zanata-bugs |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-07-29 02:47:18 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: | |||
*** Bug 987211 has been marked as a duplicate of this bug. *** Well, it seems like CSV glossary also require transLang as well. Migrated; check JIRA for bug status: http://zanata.atlassian.net/browse/ZNTA-192 |
When pushing a compendium PO file and transLang is missing from glossary-push, error message "transLang is required" should be shown instead of NullPointerException Version-Release number of selected component (if applicable): zanata-maven-plugin:3.4.1:glossary-push [INFO] client API version: 3.4.1, server API version: 3.6.0-SNAPSHOT [WARNING] client API version is 3.4.1, but server API version is 3.6.0-SNAPSHOT Server Zanata 3.6.0-SNAPSHOT (git-server-3.5.1-149-g7745558) Steps to Reproduce: 1. Assume COMPENDIUM_PO_FILE be the compendium file you want to push, Run: mvn -e org.zanata:zanata-maven-plugin:glossary-push -Dzanata.glossaryFile=$COMPENDIUM_PO_FILE Actual: [ERROR] Failed to execute goal org.zanata:zanata-maven-plugin:3.4.1:glossary-push (default-cli) on project standalone-pom: Zanata mojo exception: NullPointerException -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.zanata:zanata-maven-plugin:3.4.1:glossary-push (default-cli) on project standalone-pom: Zanata mojo exception at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216) 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:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213) at org.apache.maven.cli.MavenCli.main(MavenCli.java:157) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: org.apache.maven.plugin.MojoExecutionException: Zanata mojo exception at org.zanata.maven.ConfigurableMojo.execute(ConfigurableMojo.java:142) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) ... 19 more Caused by: java.lang.NullPointerException at org.zanata.common.LocaleId.<init>(LocaleId.java:34) at org.zanata.client.commands.glossary.push.GlossaryPushCommand.getLocaleFromMap(GlossaryPushCommand.java:95) at org.zanata.client.commands.glossary.push.GlossaryPushCommand.<init>(GlossaryPushCommand.java:77) at org.zanata.maven.GlossaryPushMojo.initCommand(GlossaryPushMojo.java:111) at org.zanata.maven.GlossaryPushMojo.initCommand(GlossaryPushMojo.java:41) at org.zanata.maven.ConfigurableMojo.runCommand(ConfigurableMojo.java:149) at org.zanata.maven.ConfigurableMojo.execute(ConfigurableMojo.java:140) ... 21 more Expected: Error message: transLang is required Additional: CSV glossary file does not require transLang, so transLang should be mandatory only to PO files.