tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoff Callender (JIRA)" <...@tapestry.apache.org>
Subject [jira] Commented: (TAPESTRY-696) Race condition during page loading can cause anomoylous exceptions related to annotations
Date Sat, 07 Apr 2007 14:52:32 GMT

    [ https://issues.apache.org/jira/browse/TAPESTRY-696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487405
] 

Geoff Callender commented on TAPESTRY-696:
------------------------------------------

Just had this error again, and have found a way to create it at will.  I have only seen it
occuring on my Border component.  The conditions are:

1. disable-caching=true
2. double-clicked on page's submit button.
3. listener detected second submit (uses flow token pattern) and threw PageRedirectException(...)
before first submit got as far as activating new page (I put a Thread.sleep in the middle
of the listener to make sure of this during testing).  
4. first submit now tries to activate a page - it can be returning to same page, activating
another, performing a callback, whatever, as long as that page has the same component - in
my case the Border component.

For me the exception occurred on an @InjectState annotation in the Border, but when I moved
the annotated field out of Border and into my base page the exception then occurred on the
@Parameter annotation in the Border.

The problem doesn't happen with Firefox on Windows or OS X, because it seems to prevent the
second submit by disabling the button, but it does happen with Safari 2.0.4 on OS X 10.4 and
IE 6.0 on Win XP.

> Race condition during page loading can cause anomoylous exceptions related to annotations
> -----------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-696
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-696
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 4.0
>            Reporter: Howard M. Lewis Ship
>         Assigned To: Howard M. Lewis Ship
>            Priority: Blocker
>             Fix For: 4.0
>
>
> Been seeing a trickle of thsee on the mailing lists, under load, Tapestry may try to
enhance the same class twice and the annotations (many of which work by modifying the in-memory
component specification) cause exceptions as they conflict with themselves.
> Error: An error occured processing annotation
> @org.apache.tapestry.annotations.InjectState(value=visit) of public
> abstract com.mcelroy.auth.Visit
> com.mcelroy.auth.component.Border.getVisitObject(): Property visitObject
> has already been accounted for by the element at Annotation
> @org.apache.tapestry.annotations.InjectState(value=visit) of public
> abstract com.mcelroy.auth.Visit
> com.mcelroy.auth.component.Border.getVisitObject().
> Am I doing something wrong here?  I can transition from page-to-page
> without any trouble as long as I'm not entering the app through the
> external service.
> In case it's useful, here's the full stack trace:
>    *
> org.apache.tapestry.spec.ComponentSpecification.claimProperty(ComponentSpecification.java:674)
>    *
> org.apache.tapestry.spec.ComponentSpecification.addInjectSpecification(ComponentSpecification.java:645)
>    *
> org.apache.tapestry.annotations.InjectStateAnnotationWorker.performEnhancement(InjectStateAnnotationWorker.java:49)
>    *
> org.apache.tapestry.annotations.AnnotationEnhancementWorker.performMethodEnhancement(AnnotationEnhancementWorker.java:125)
>    *
> org.apache.tapestry.annotations.AnnotationEnhancementWorker.performMethodEnhancement(AnnotationEnhancementWorker.java:108)
>    *
> org.apache.tapestry.annotations.AnnotationEnhancementWorker.performEnhancement(AnnotationEnhancementWorker.java:68)
>    *
> $EnhancementWorker_106b7b9f8bb.performEnhancement($EnhancementWorker_106b7b9f8bb.java)
>    *
> $EnhancementWorker_106b7b9f8bd.performEnhancement($EnhancementWorker_106b7b9f8bd.java)
>    *
> $EnhancementWorker_106b7b9f89d.performEnhancement($EnhancementWorker_106b7b9f89d.java)
>    *
> org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getComponentConstructor(ComponentConstructorFactoryImpl.java:79)
>    *
> $ComponentConstructorFactory_106b7b9f888.getComponentConstructor($ComponentConstructorFactory_106b7b9f888.java)
>    *
> org.apache.tapestry.pageload.PageLoader.instantiateComponent(PageLoader.java:565)
>    *
> org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.java:515)
>    *
> $IPageLoader_106b7b9f882.createImplicitComponent($IPageLoader_106b7b9f882.java)
>    *
> $IPageLoader_106b7b9f883.createImplicitComponent($IPageLoader_106b7b9f883.java)
>    *
> org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.createImplicitComponent(ComponentTemplateLoaderLogic.java:218)
>    *
> org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(ComponentTemplateLoaderLogic.java:172)
>    *
> org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(ComponentTemplateLoaderLogic.java:111)
>    *
> org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.loadTemplate(ComponentTemplateLoaderLogic.java:88)
>    *
> org.apache.tapestry.services.impl.ComponentTemplateLoaderImpl.loadTemplate(ComponentTemplateLoaderImpl.java:60)
>    *
> $ComponentTemplateLoader_106b7b9f88c.loadTemplate($ComponentTemplateLoader_106b7b9f88c.java)
>    *
> org.apache.tapestry.pageload.PageLoader.loadTemplateForComponent(PageLoader.java:671)
>    * org.apache.tapestry.BaseComponent.readTemplate(BaseComponent.java:77)
>    * org.apache.tapestry.BaseComponent.finishLoad(BaseComponent.java:107)
>    * $ViewProfile_41.finishLoad($ViewProfile_41.java)
>    * org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:473)
>    * org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:642)
>    * $IPageLoader_106b7b9f882.loadPage($IPageLoader_106b7b9f882.java)
>    * $IPageLoader_106b7b9f883.loadPage($IPageLoader_106b7b9f883.java)
>    * org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:118)
>    * $IPageSource_106b7b9f7ed.getPage($IPageSource_106b7b9f7ed.java)
>    *
> org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:265)
>    * org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:248)
>    * com.mcelroy.auth.pages.Login.activateExternalPage(Login.java:216)
>    *
> org.apache.tapestry.engine.ExternalService.service(ExternalService.java:160)
>    * $IEngineService_106b7b9f87a.service($IEngineService_106b7b9f87a.java)
>    *
> org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:65)
>    *
> org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:248)
>    *
> org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:60)
>    *
> $WebRequestServicer_106b7b9f84d.service($WebRequestServicer_106b7b9f84d.java)
>    *
> org.apache.tapestry.services.impl.DisableCachingFilter.service(DisableCachingFilter.java:48)
>    *
> $WebRequestServicerFilter_106b7b9f84f.service($WebRequestServicerFilter_106b7b9f84f.java)
>    *
> $WebRequestServicer_106b7b9f851.service($WebRequestServicer_106b7b9f851.java)
>    *
> $WebRequestServicer_106b7b9f849.service($WebRequestServicer_106b7b9f849.java)
>    *
> org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:56)
>    *
> $ServletRequestServicer_106b7b9f82d.service($ServletRequestServicer_106b7b9f82d.java)
>    *
> org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
>    *
> $ServletRequestServicerFilter_106b7b9f829.service($ServletRequestServicerFilter_106b7b9f829.java)
>    *
> $ServletRequestServicer_106b7b9f82f.service($ServletRequestServicer_106b7b9f82f.java)
>    *
> org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
>    *
> $ServletRequestServicerFilter_106b7b9f827.service($ServletRequestServicerFilter_106b7b9f827.java)
>    *
> $ServletRequestServicer_106b7b9f82f.service($ServletRequestServicer_106b7b9f82f.java)
>    *
> org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
>    *
> $ServletRequestServicerFilter_106b7b9f82b.service($ServletRequestServicerFilter_106b7b9f82b.java)
>    *
> $ServletRequestServicer_106b7b9f82f.service($ServletRequestServicer_106b7b9f82f.java)
>    *
> $ServletRequestServicer_106b7b9f821.service($ServletRequestServicer_106b7b9f821.java)
>    *
> org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:141)
>    *
> org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:97)
>    * javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>    * javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>    * org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427)
>    *
> org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:475)
>    *
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
>    * org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
>    *
> org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:635)
>    * org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
>    * org.mortbay.http.HttpServer.service(HttpServer.java:954)
>    * org.mortbay.http.HttpConnection.service(HttpConnection.java:814)
>    * org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:981)
>    * org.mortbay.http.HttpConnection.handle(HttpConnection.java:831)
>    *
> org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
>    * org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
>    * org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Mime
View raw message