Bug 1030220

Summary: Unxpected error when doing CopyTrans before refresh the page.
Product: [Retired] Zanata Reporter: Ding-Yi Chen <dchen>
Component: Component-CopyTransAssignee: Alex Eng <aeng>
Status: CLOSED WORKSFORME QA Contact: Zanata-QA Mailling List <zanata-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.1CC: djansen, zanata-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-29 05:33:45 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:
Attachments:
Description Flags
Stack trace of exception none

Description Ding-Yi Chen 2013-11-14 08:04:58 UTC
Description of problem:
After creating version and uploading source file with client.
Without refresh the version view, Following unexpected error has occurred.


Version-Release number of selected component (if applicable):
Zanata version 3.2-SNAPSHOT (20131114-0037)

How reproducible:
Always, 

Steps to Reproduce:
1. Create a Version using web UI.
   You should see "no content" for all languages in project version view.
2. Upload source files with maven client (it does not matter whether -Dzanata.copyTrans=true or false)
3. Back to web browser
   You should see "no content" for all languages (i.e. DO NOT REFRESH).
4. Click "Copy Translation"

Actual results:
Error message: An unexpected error has occurred. Please report this problem with details of what you were attempting. 

Expected results:
Start copying translation.

Additional info:

Server log:
17:50:58,226 WARN  [org.zanata.service.impl.CopyTransServiceImpl] (DefaultQuartzScheduler_Worker-1) exception during copy trans: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.zanata.model.HDocument.textFlows, could not initialize proxy - no Session
        at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:566) [hibernate-core.jar:4.2.0.Final-redhat-1]
        at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:186) [hibernate-core.jar:4.2.0.Final-redhat-1]
        at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:545) [hibernate-core.jar:4.2.0.Final-redhat-1]
        at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:124) [hibernate-core.jar:4.2.0.Final-redhat-1]
        at org.hibernate.collection.internal.PersistentList.iterator(PersistentList.java:138) [hibernate-core.jar:4.2.0.Final-redhat-1]
        at org.zanata.service.impl.CopyTransServiceImpl$1.work(CopyTransServiceImpl.java:154) [classes:]
        at org.zanata.service.impl.CopyTransServiceImpl$1.work(CopyTransServiceImpl.java:1) [classes:]
        at org.jboss.seam.util.Work.workInTransaction(Work.java:61) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.zanata.service.impl.CopyTransServiceImpl.copyTransForLocale(CopyTransServiceImpl.java:181) [classes:]
        at org.zanata.service.impl.CopyTransServiceImpl.copyTransForDocument(CopyTransServiceImpl.java:436) [classes:]
        at org.zanata.service.impl.CopyTransServiceImpl.copyTransForIteration(CopyTransServiceImpl.java:455) [classes:]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_24]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.6.0_24]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.6.0_24]
        at java.lang.reflect.Method.invoke(Method.java:622) [rt.jar:1.6.0_24]
        at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:79) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:196) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:114) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.zanata.service.impl.CopyTransServiceImpl_$$_javassist_seam_51.copyTransForIteration(CopyTransServiceImpl_$$_javassist_seam_51.java) [classes:]
        at org.zanata.async.tasks.IterationCopyTransTask.callCopyTrans(IterationCopyTransTask.java:67) [classes:]
        at org.zanata.async.tasks.CopyTransTask.call(CopyTransTask.java:68) [classes:]
        at org.zanata.async.tasks.CopyTransTask.call(CopyTransTask.java:1) [classes:]
        at org.zanata.async.AsynchronousTaskExecutor$1.execute(AsynchronousTaskExecutor.java:75) [classes:]
        at org.jboss.seam.security.Identity.runAs(Identity.java:743) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.jboss.seam.security.RunAsOperation.run(RunAsOperation.java:75) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.zanata.async.AsynchronousTaskExecutor.runAsynchronously(AsynchronousTaskExecutor.java:96) [classes:]
        at sun.reflect.GeneratedMethodAccessor947.invoke(Unknown Source) [:1.6.0_24]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.6.0_24]
        at java.lang.reflect.Method.invoke(Method.java:622) [rt.jar:1.6.0_24]
        at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.jboss.seam.async.AsynchronousInterceptor.aroundInvoke(AsynchronousInterceptor.java:52) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:196) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:114) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.zanata.async.AsynchronousTaskExecutor_$$_javassist_seam_83.runAsynchronously(AsynchronousTaskExecutor_$$_javassist_seam_83.java) [classes:]
        at sun.reflect.GeneratedMethodAccessor946.invoke(Unknown Source) [:1.6.0_24]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.6.0_24]
        at java.lang.reflect.Method.invoke(Method.java:622) [rt.jar:1.6.0_24]
        at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.jboss.seam.async.AsynchronousInvocation$1.process(AsynchronousInvocation.java:62) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.jboss.seam.async.Asynchronous$ContextualAsynchronousRequest.run(Asynchronous.java:80) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.jboss.seam.async.AsynchronousInvocation.execute(AsynchronousInvocation.java:44) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.jboss.seam.async.QuartzDispatcher$QuartzJob.execute(QuartzDispatcher.java:243) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
        at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-1.6.5.jar:1.6.5]
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525) [quartz-1.6.5.jar:1.6.5]

Comment 1 Damian Jansen 2014-07-29 03:39:53 UTC
Created attachment 922011 [details]
Stack trace of exception

Tested 3.5.0-SNAPSHOT (git-server-3.4.2-201-ge0afdde) - still an issue, but the exception has changed. Attached.

Comment 2 Damian Jansen 2014-07-29 05:33:45 UTC
Correction: exception was not related to copytrans. Feature works as expected.