Bug 917897 - AlreadyClosedException when new document uploaded and translated
Summary: AlreadyClosedException when new document uploaded and translated
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Zanata
Classification: Retired
Component: Component-Logic
Version: development
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 2.2
Assignee: Alex Eng
QA Contact: Ding-Yi Chen
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-05 04:04 UTC by Sean Flanigan
Modified: 2013-11-27 03:35 UTC (History)
2 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2013-11-27 03:24:40 UTC


Attachments (Terms of Use)
Server log showing exception (199.13 KB, text/plain)
2013-03-05 04:04 UTC, Sean Flanigan
no flags Details

Description Sean Flanigan 2013-03-05 04:04:45 UTC
Created attachment 705279 [details]
Server log showing exception

Description of problem:
See the attached log for the exception.  I haven't been able to come up with a minimal test case, but my best guess is below.

Version-Release number of selected component (if applicable):
2.2.2-SNAPSHOT

How reproducible:
Unknown

Steps to Reproduce:
1. Use the editor to translate some strings (also primes the TM cache)
2. Upload a new document (eg ODT file)
3. Translate some strings in the new document
4. Observe the server.log
  
Actual results:
ERROR: AlreadyClosedException in server.log

Expected results:
No warnings or errors in log.

Additional info:
Also affects 2.2

Comment 1 Sean Flanigan 2013-03-05 04:09:00 UTC
See https://github.com/zanata/zanata/commit/a3f0083ad66c8556488f236451db3ee1b4d15d83

Fix is in release and integration/master branches.

Comment 3 Ding-Yi Chen 2013-03-06 01:33:00 UTC
Tested with Zanata version 2.2.2-SNAPSHOT (20130306-0020)

Now the error become java.util.ConcurrentModificationException

Reassigned
=======================

2013-03-06 11:27:46,743 INFO  [org.zanata.service.impl.TranslatedTextFlowFilter] (http-0.0.0.0-8080-11) Finished loading docIdSet for locale zh-Hant in 546.0 μs
2013-03-06 11:27:46,861 WARN  [org.zanata.service.impl.TranslatedTextFlowFilter] (http-0.0.0.0-8080-5) IndexReader for locale zh-Hant is closed; removing cached DocIdSet
2013-03-06 11:27:46,862 ERROR [org.jboss.seam.transaction.SynchronizationRegistry] (http-0.0.0.0-8080-5) Exception processing transaction Synchronization after completion
java.util.ConcurrentModificationException
        at java.util.WeakHashMap$HashIterator.nextEntry(WeakHashMap.java:762)
        at java.util.WeakHashMap$KeyIterator.next(WeakHashMap.java:795)
        at org.zanata.service.impl.TranslatedTextFlowFilter.onTranslationStateChange(TranslatedTextFlowFilter.java:123)
        at org.zanata.service.impl.TranslationStateCacheImpl.updateFilterCache(TranslationStateCacheImpl.java:119)
        at org.zanata.service.impl.TranslationStateCacheImpl.textFlowStateUpdated(TranslationStateCacheImpl.java:105)
        at sun.reflect.GeneratedMethodAccessor604.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
        at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
        at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
        at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
        at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
        at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
        at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
        at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
        at org.zanata.service.impl.TranslationStateCacheImpl_$$_javassist_seam_39.textFlowStateUpdated(TranslationStateCacheImpl_$$_javassist_seam_39.java)
        at org.zanata.service.impl.TranslationServiceImpl.postTranslate(TranslationServiceImpl.java:251)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
        at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)
        at org.jboss.seam.Component.callComponentMethod(Component.java:2279)
        at org.jboss.seam.core.Events.raiseEvent(Events.java:85)
        at org.jboss.seam.async.AsynchronousEvent$1.process(AsynchronousEvent.java:33)
        at org.jboss.seam.async.Asynchronous$ContextualAsynchronousRequest.run(Asynchronous.java:80)
        at org.jboss.seam.async.AsynchronousEvent.execute(AsynchronousEvent.java:27)
        at org.jboss.seam.async.TransactionSuccessEvent.afterCompletion(TransactionSuccessEvent.java:24)
        at org.jboss.seam.transaction.SynchronizationRegistry.afterTransactionCompletion(SynchronizationRegistry.java:42)
        at org.jboss.seam.transaction.SeSynchronizations.afterTransactionCommit(SeSynchronizations.java:37)
        at org.jboss.seam.transaction.UTTransaction.commit(UTTransaction.java:57)
        at org.jboss.seam.util.Work.workInTransaction(Work.java:72)
        at org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:91)
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
        at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
        at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
        at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
        at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
        at org.zanata.service.impl.TranslationServiceImpl_$$_javassist_seam_36.translate(TranslationServiceImpl_$$_javassist_seam_36.java)
        at org.zanata.webtrans.server.rpc.UpdateTransUnitHandler.doTranslation(UpdateTransUnitHandler.java:80)
        at org.zanata.webtrans.server.rpc.UpdateTransUnitHandler.execute(UpdateTransUnitHandler.java:74)
        at org.zanata.webtrans.server.rpc.UpdateTransUnitHandler.execute(UpdateTransUnitHandler.java:52)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
        at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
        at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
        at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
        at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
        at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
        at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
        at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
        at org.zanata.webtrans.server.rpc.UpdateTransUnitHandler_$$_javassist_seam_88.execute(UpdateTransUnitHandler_$$_javassist_seam_88.java)
        at org.zanata.webtrans.server.SeamDispatch.doExecute(SeamDispatch.java:164)
        at org.zanata.webtrans.server.SeamDispatch.execute(SeamDispatch.java:136)
        at sun.reflect.GeneratedMethodAccessor1253.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
        at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
        at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
        at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
        at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
        at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
        at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
        at org.zanata.webtrans.server.SeamDispatch_$$_javassist_seam_11.execute(SeamDispatch_$$_javassist_seam_11.java)
        at org.zanata.webtrans.server.DispatchServiceImpl.execute(DispatchServiceImpl.java:22)
        at sun.reflect.GeneratedMethodAccessor1252.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
        at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
        at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
        at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
        at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
        at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
        at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
        at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
        at org.zanata.webtrans.server.DispatchServiceImpl_$$_javassist_seam_69.execute(DispatchServiceImpl_$$_javassist_seam_69.java)
        at sun.reflect.GeneratedMethodAccessor1251.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.jboss.seam.remoting.gwt.GWTToSeamAdapter.callWebRemoteMethod(GWTToSeamAdapter.java:100)
        at org.jboss.seam.remoting.gwt.GWTService.RPC_invokeAndEncodeResponse(GWTService.java:544)
        at org.jboss.seam.remoting.gwt.GWTService.processCall(GWTService.java:206)
        at org.jboss.seam.remoting.gwt.GWTService$1.process(GWTService.java:120)
        at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:65)
        at org.jboss.seam.remoting.gwt.GWTService.getResource(GWTService.java:105)
        at org.jboss.seam.servlet.SeamResourceServlet.service(SeamResourceServlet.java:80)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
        at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
        at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
        at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
        at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
        at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
        at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
        at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
        at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
        at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
        at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
        at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.zanata.seam.interceptor.MonitoringWrapper.doFilter(MonitoringWrapper.java:70)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.zanata.servlet.GWTCacheControlFilter.doFilter(GWTCacheControlFilter.java:63)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.internalProcess(ActiveRequestResponseCacheValve.java:74)
        at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:47)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:599)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
        at java.lang.Thread.run(Thread.java:662)

Comment 4 Alex Eng 2013-03-06 22:25:31 UTC
fixed in version 2.2.2 and 2.3

See 
https://github.com/zanata/zanata/commit/cdf750f67a2e54023e77d7e73110e56242103c59

Comment 5 Ding-Yi Chen 2013-03-07 01:02:44 UTC
VERIFIED with Zanata version 2.2.2-SNAPSHOT (20130307-0842)

Comment 6 Ding-Yi Chen 2013-03-08 01:31:22 UTC
VERIFIED with Zanata version 2.3-SNAPSHOT (20130308-0035)

Comment 7 Sean Flanigan 2013-11-27 03:15:14 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 8 Sean Flanigan 2013-11-27 03:16:41 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 9 Sean Flanigan 2013-11-27 03:18:35 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 10 Sean Flanigan 2013-11-27 03:24:40 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 11 Sean Flanigan 2013-11-27 03:33:15 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 12 Sean Flanigan 2013-11-27 03:35:31 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.


Note You need to log in before you can comment on or make changes to this bug.