NullPointerException when uploading from client (tested with cs-CZ)

Description

1. Upload the attached .pot source to Zanata via ui
2. Download the project version xml
3. In command line, get the project files

1 $HOME/dev/zanata-client/zanata-cli/etc/scripts/zanata-cli -B -e pull --pull-type both --disable-ssl-cert --username admin --key 19768f442cff5ec51a480c2241cf98ee

4. Place the attached .po next to the source as cs-CZ.po
5. In command line

1 $HOME/dev/zanata-client/zanata-cli/etc/scripts/zanata-cli -e -X push -s . -t . --validate CONTENT --username admin --key 19768f442cff5ec51a480c2241cf98ee --url "http://localhost:8080/zanata/" --project-type gettext --push-type trans --file-types GETTEXT[po] --trans-dir . --project-config zanata.xml --src-dir . --merge-type import --locales cs-CZ

A null pointer exception occurs after Y is entered to proceed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 15:06:17,015 INFO [org.zanata.model.po.HPoTargetHeader] (pool-7-thread-1) persist entity: HPoTargetHeader(super=PoHeaderBase(comment=null, entries=PO-Revision-Date= Last-Translator= Language-Team=Czech (Czech Republic) Language=cs-CZ X-Generator=Zanata 3.9.0-SNAPSHOT Plural-Forms=nplurals\=3; plural\=(n\=\=1) ? 0 \: (n>\=2 && n<\=4) ? 1 \: 2 ), targetLanguage=HLocale(localeId=cs-CZ)) 15:06:17,100 ERROR [org.zanata.service.impl.TranslationServiceImpl] (pool-7-thread-1) exception saving translation batch: null 15:06:17,103 ERROR [org.zanata.async.AsyncTaskManager] (pool-7-thread-1) Exception when executing an asynchronous task.: org.zanata.exception.ZanataServiceException: Error during translation. at org.zanata.service.impl.TranslationServiceImpl.translateAllInDoc(TranslationServiceImpl.java:701) at org.zanata.service.impl.TranslationServiceImpl$Proxy$_$$_WeldSubclass.translateAllInDoc(Unknown Source) at org.zanata.service.impl.TranslationServiceImpl.translateAllInDocAsync(TranslationServiceImpl.java:552) at org.zanata.service.impl.TranslationServiceImpl$Proxy$_$$_WeldSubclass.translateAllInDocAsync$$super(Unknown Source) 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:498) at org.jboss.weld.interceptor.proxy.TerminalAroundInvokeInvocationContext.proceedInternal(TerminalAroundInvokeInvocationContext.java:49) at org.jboss.weld.interceptor.proxy.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:77) at org.zanata.async.AsyncMethodInterceptor.aroundInvoke(AsyncMethodInterceptor.java:113) 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:498) at org.jboss.weld.interceptor.reader.SimpleInterceptorInvocation$SimpleMethodInvocation.invoke(SimpleInterceptorInvocation.java:74) at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeAroundInvoke(InterceptorMethodHandler.java:84) at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeInterception(InterceptorMethodHandler.java:72) at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.invoke(InterceptorMethodHandler.java:56) at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:79) at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:68) at org.zanata.service.impl.TranslationServiceImpl$Proxy$_$$_WeldSubclass.translateAllInDocAsync(Unknown Source) at org.zanata.service.impl.TranslationServiceImpl$Proxy$_$$_WeldClientProxy.translateAllInDocAsync(Unknown Source) 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:498) at org.zanata.async.AsyncMethodInterceptor.lambda$aroundInvoke$1(AsyncMethodInterceptor.java:92) at org.zanata.async.AsyncTaskManager.lambda$startTask$0(AsyncTaskManager.java:115) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NullPointerException at org.zanata.service.impl.TranslationServiceImpl.saveBatch(TranslationServiceImpl.java:834) at org.zanata.service.impl.TranslationServiceImpl.lambda$translateAllInDoc$1(TranslationServiceImpl.java:692) at org.zanata.transaction.TransactionUtil.call(TransactionUtil.java:121) at org.zanata.transaction.TransactionUtil$Proxy$_$$_WeldClientProxy.call(Unknown Source) at org.zanata.transaction.TransactionUtil.runInTransaction(TransactionUtil.java:90) at org.zanata.service.impl.TranslationServiceImpl.translateAllInDoc(TranslationServiceImpl.java:692) ... 31 more

Environment

F22, firefox, release branch at 5a6f42d9dcee3b286ad88338e7df6675ee2393ff

Status

Assignee

Alex Eng

Reporter

Damian Jansen

Tested Version/s

None

Time tracking

0m

Components

Sprint

None

Fix versions

Affects versions

server-3.9.0

Priority

Medium