We hit the same problem at a client's and found the same fix.  I'm
going to look into seeing if plastic can at least detect when this
situation can happen.

On Sat, Oct 15, 2011 at 4:55 AM, Christian Riedel
<cr.ml...@googlemail.com> wrote:
> Found the cause!
>
> Tapestry5-jQuery adds, beside others, a custom Import-Worker:
>
>    @Contribute(ComponentClassTransformWorker2.class)
>    @Primary
>    public static void  
> addWorker(OrderedConfiguration<ComponentClassTransformWorker2> configuration,
> [...]
>        configuration.addInstance("ImportJQueryUIWorker", 
> ImportJQueryUIWorker.class, "before:Import");
> [...]
>    }
>
> See the order-constraint? It seems to happen randomly that sometimes this 
> worker gets called before Tapestry's "RenderPhaseMethodWorker", which is 
> added right before the "ImportWorker" in TapestryModule.
> Changing the configuration to something more exact like this, fixes the 
> problem:
>        configuration.addInstance("ImportJQueryUIWorker", 
> ImportJQueryUIWorker.class, "before:Import", "after:RenderPhase");
>
>
> The ImportJQueryUIWorker tried to advice a setupRender method that was not 
> augmented/created or so by the RenderPhaseMethodWorker. Calling this before 
> RenderPhaseMethodWorker does seems to break everything:
>        
> plasticClass.introduceMethod(TransformConstants.SETUP_RENDER_DESCRIPTION);
>
> The question now: could RenderPhaseMethodWorker throw an error, show a 
> warning or something like that in case such contribution breaks the default 
> behaviour? Or maybe the documentation should be updated and say how important 
> it is not to add any worker before the RenderPhase-Worker that calls 
> "plasticClass.introduceMethod" for a render phase method :-)
>
> Anyway, the bug is fixed and I hope a Tapestry-Dev will have a look at this 
> and improve Tapestry in a way that this may not happen so easily again!
>
> Cheers
> Christian
>
>
>
>
> Am 03.10.2011 um 15:27 schrieb Christian Riedel:
>
>> Hi there,
>>
>> my application behaves not as expected. All @SetupRender methods seem to be 
>> ignored, they aren't getting executed, which leads to numerous exceptions 
>> within all components.
>>
>> In the last couple of days this issue randomly occurred. When I restart the 
>> server a couple of time the problem goes away.
>>
>> I'm using the 5.3-beta-16 (just upgraded from beta-10). I tried to debug 
>> RenderPhaseMethodWorker just a minute ago but this time the application 
>> starts normally and all @SetupRender methods are called as expected. I don't 
>> know where to debug else or how I can reproduce this bug. It's too random at 
>> the moment.
>> IIRC there was a bug with platic and some race conditions, maybe that's the 
>> source of the problem?
>>
>> Regards
>> Christian
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to