org.zanata.exception.ZanataServiceException: A document was not found.

JIRA | Sean Flanigan | 1 year ago
  1. 0

    Description of problem: When pushing a translation, if the source document doesn't exist, the client error message is unhelpful: Caused by: java.lang.RuntimeException: Failed while pushing document translations: [] at org.zanata.client.commands.push.PushCommand.pushTargetDocToServer(PushCommand.java:526) at org.zanata.client.commands.push.PushCommand.access$100(PushCommand.java:49) at org.zanata.client.commands.push.PushCommand$1.visit(PushCommand.java:348) at org.zanata.client.commands.push.AbstractGettextPushStrategy.visitTranslationResources(AbstractGettextPushS at org.zanata.client.commands.push.PushCommand.pushCurrentModule(PushCommand.java:341) at org.zanata.client.commands.push.PushCommand.run(PushCommand.java:197) at org.zanata.maven.ConfigurableMojo.runCommand(ConfigurableMojo.java:158) at org.zanata.maven.PushPullMojo.runCommand(PushPullMojo.java:33) at org.zanata.maven.ConfigurableMojo.execute(ConfigurableMojo.java:129) ... 21 more Whereas a more useful error message is generated in the server log: 2013-02-12 00:42:08,559 ERROR [org.zanata.process.AsynchronousExecutor] (DefaultQuartzScheduler_Worker-5) Exception with long running process: A document was not found. 2013-02-12 00:42:08,559 ERROR [org.zanata.rest.service.AsynchronousProcessResourceService] (DefaultQuartzScheduler_Worker-5) Error pushing translations org.zanata.exception.ZanataServiceException: A document was not found. at org.zanata.service.impl.TranslationServiceImpl.translateAllInDoc(TranslationServiceImpl.java:438) at org.zanata.service.impl.TranslationServiceImpl.translateAllInDoc(TranslationServiceImpl.java:411) ... at org.zanata.service.impl.TranslationServiceImpl_$$_javassist_seam_45.translateAllInDoc(TranslationServiceImpl_$$_javassist_seam_45.java) at org.zanata.rest.service.AsynchronousProcessResourceService$3.run(AsynchronousProcessResourceService.java:267) at org.zanata.rest.service.AsynchronousProcessResourceService$3.run(AsynchronousProcessResourceService.java:253) at org.zanata.process.AsynchronousExecutor.runAsynchronously(AsynchronousExecutor.java:61) ... at org.zanata.process.AsynchronousExecutor_$$_javassist_seam_54.runAsynchronously(AsynchronousExecutor_$$_javassist_seam_54.java) Version-Release number of selected component (if applicable): zanata-maven-plugin:2.0.1:push Zanata version 2.1.5-SNAPSHOT (20130212-0019). How reproducible: Steps to Reproduce: 1. mvn -e org.zanata:zanata-maven-plugin:2.0.1:push -Dzanata.pushType=trans Actual results: A generic error message: "Failed while pushing document translations: []" Expected results: Error message indicating that the source document does not exist Additional info:

    JIRA | 1 year ago | Sean Flanigan
    org.zanata.exception.ZanataServiceException: A document was not found.

    Root Cause Analysis

    1. org.zanata.exception.ZanataServiceException

      A document was not found.

      at org.zanata.service.impl.TranslationServiceImpl.translateAllInDoc()
    2. org.zanata.service
      TranslationServiceImpl.translateAllInDoc
      1. org.zanata.service.impl.TranslationServiceImpl.translateAllInDoc(TranslationServiceImpl.java:438)
      2. org.zanata.service.impl.TranslationServiceImpl.translateAllInDoc(TranslationServiceImpl.java:411)
      2 frames