TM merge will fail on having TM from TMX import

Description

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 2017-05-11 23:55:08,235 WARN [org.zanata.service.impl.TranslationMemoryServiceImpl] (default task-26) Lucene query returned 20 results (out of approx 2136). Increasing zanata.tm.max.results might produce more matches. at org.jboss.weld.interceptor.proxy.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:77) at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at org.zanata.service.impl.TransMemoryMergeServiceImpl.createRequest(TransMemoryMergeServiceImpl.java:161) at org.zanata.service.impl.TransMemoryMergeServiceImpl.executeMerge(TransMemoryMergeServiceImpl.java:126) at org.zanata.service.impl.TransMemoryMergeServiceImpl$Proxy$_$$_WeldSubclass.executeMerge$$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) 2017-05-11 23:55:08,242 ERROR [org.zanata.webtrans.server.SeamDispatch] (default task-26) Error dispatching action: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at org.apache.deltaspike.jpa.impl.transaction.ResourceLocalTransactionStrategy.execute(ResourceLocalTransactionStrategy.java:133) at org.apache.deltaspike.jpa.impl.transaction.TransactionalInterceptor.executeInTransaction(TransactionalInterceptor.java:57) at sun.reflect.GeneratedMethodAccessor469.invoke(Unknown Source) 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.TransMemoryMergeServiceImpl$Proxy$_$$_WeldSubclass.executeMerge(Unknown Source) at org.zanata.service.impl.TransMemoryMergeServiceImpl$Proxy$_$$_WeldClientProxy.executeMerge(Unknown Source) at org.zanata.webtrans.server.rpc.TransMemoryMergeHandler.execute(TransMemoryMergeHandler.java:52) at org.zanata.webtrans.server.rpc.TransMemoryMergeHandler.execute(TransMemoryMergeHandler.java:35) at org.zanata.webtrans.server.rpc.TransMemoryMergeHandler$Proxy$_$$_WeldClientProxy.execute(Unknown Source)

Environment

None

Status

Assignee

Unassigned

Reporter

Patrick Huang

Labels

None

Tested Version/s

None

Fix versions

Priority

unspecified