You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Christian Riedel <cr...@googlemail.com> on 2011/10/15 13:55:04 UTC

Re: @SetupRender not called

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-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: @SetupRender not called

Posted by Denis Stepanov <de...@gmail.com>.
It's probably the same issue as https://issues.apache.org/jira/browse/TAP5-1752

Denis

Feb 1, 2012 v 5:12 PM, Howard Lewis Ship:

> Going to need a lot more data, including the exact production platform
> (OS, JDK, app server, etc.) and maybe some code samples.  If I can't
> reproduce it, I can't fix it!
> 
> On Wed, Feb 1, 2012 at 7:52 AM, Emmanuel DEMEY <de...@gmail.com> wrote:
>> Hi everyone
>> 
>> I get the same issue yesterday, and I spent a lot of time to find the
>> problem. I forgot about this existing post.
>> 
>> Howard : Did you find something to avoid this issue ? It will be interesting
>> to add this issue into the release note of the 5.3 release ? in the breaking
>> changes part ? What do you thing ?
>> 
>> Manu
>> 
>> --
>> View this message in context: http://tapestry.1045711.n5.nabble.com/SetupRender-not-called-tp4864848p5447884.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@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-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 


Re: @SetupRender not called

Posted by Howard Lewis Ship <hl...@gmail.com>.
Going to need a lot more data, including the exact production platform
(OS, JDK, app server, etc.) and maybe some code samples.  If I can't
reproduce it, I can't fix it!

On Wed, Feb 1, 2012 at 7:52 AM, Emmanuel DEMEY <de...@gmail.com> wrote:
> Hi everyone
>
> I get the same issue yesterday, and I spent a lot of time to find the
> problem. I forgot about this existing post.
>
> Howard : Did you find something to avoid this issue ? It will be interesting
> to add this issue into the release note of the 5.3 release ? in the breaking
> changes part ? What do you thing ?
>
> Manu
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/SetupRender-not-called-tp4864848p5447884.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@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-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: @SetupRender not called

Posted by Emmanuel DEMEY <de...@gmail.com>.
Hi everyone

I get the same issue yesterday, and I spent a lot of time to find the
problem. I forgot about this existing post. 

Howard : Did you find something to avoid this issue ? It will be interesting
to add this issue into the release note of the 5.3 release ? in the breaking
changes part ? What do you thing ? 

Manu

--
View this message in context: http://tapestry.1045711.n5.nabble.com/SetupRender-not-called-tp4864848p5447884.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: @SetupRender not called

Posted by Howard Lewis Ship <hl...@gmail.com>.
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...@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-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@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-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org