Hmm... just took a look at the code again and I think I see the problem.

///// This creates the method body if your class doesn't already implement it:
transformation.addImplementedInterface(RequestParameterExtractor.class);

TransformMethodSignature extractMethod = new
TransformMethodSignature(Modifier.PUBLIC,
    "Map<String, String>", "extractRequestParameters", null, null);

/////  This is probably commented out because it always returns.
// if (transformation.isDeclaredMethod(extractMethod)) {
//    return;
// }

///// This is apparently trying to re-create the method.
transformation.getOrCreateMethod(extractMethod).addAdvice(new
ComponentMethodAdvice(){

You should call transformation.findMethods(filter); instead of
getOrCreateMethod. I'm not sure why the getOrCreate is trying to
implement the method if it's already there, but I'd guess it has
something to do with your new TransformMethodSignature.

Josh

On Tue, Sep 14, 2010 at 10:20 AM, Markus Feindler
<markus.feind...@gmx.de> wrote:
> �...@christoph:
> Same Error
>
> @Josh
> Yes, I also removed the Generic Map from the Interface.
>
> Just checked in debug method: the method indeed already exists (breakpoint:
> line 1443 InternalClassTransformationImpl). But how come? Its never added
> through my code.
>>
>> Did you take the type parameters off of the interface too (return a
>> raw map)? Have you looked at with a debugger? Stick a breakpoint right
>> before the exception and take a look at the methods in the ctclass.
>>
>> I can't look at it now but I'll try to reproduce the problem tonight.
>>
>> Josh
>>
>>
>> On Tue, Sep 14, 2010 at 9:47 AM, Markus Feindler<markus.feind...@gmx.de>
>>  wrote:
>>>
>>>  Just tried, does not work :(.
>>>>
>>>> Have you tried without specify Generic types ?
>>>>
>>>> 2010/9/13 Christophe Cordenier<christophe.corden...@gmail.com>
>>>>
>>>>> Oh, this is maybe due to generics...
>>>>>
>>>>> 2010/9/13 Markus Feindler<markus.feind...@gmx.de>
>>>>>
>>>>>> public interface RequestParameterExtractor {
>>>>>>    Map<String, String>    extractRequestParameters();
>>>>>> }
>>>>>>
>>>>>> is not equal to:
>>>>>>
>>>>>>
>>>>>>     TransformMethodSignature extractMethod = new
>>>>>> TransformMethodSignature(Modifier.PUBLIC,
>>>>>>            "Map<String, String>", "extractRequestParameters", null,
>>>>>> null);
>>>>>>
>>>>>> ?
>>>>>>
>>>>>>
>>>>>>  Everything looks good ... The only thing i see is that the method
>>>>>>>
>>>>>>> signature
>>>>>>> is not exactly the same as the one declared in the interface.
>>>>>>>
>>>>>>> 2010/9/13 Markus Feindler<markus.feind...@gmx.de>
>>>>>>>
>>>>>>>   Am 13.09.2010 22:18, schrieb Thiago H. de Paula Figueiredo:
>>>>>>>>
>>>>>>>>  On Mon, 13 Sep 2010 17:02:02 -0300, Christophe Cordenier<
>>>>>>>>
>>>>>>>>> christophe.corden...@gmail.com>     wrote:
>>>>>>>>>
>>>>>>>>>  Please, Can you provide your Tapestry Module class that
>>>>>>>>> contributes
>>>>>>>>> your
>>>>>>>>>
>>>>>>>>>> worker ?
>>>>>>>>>>
>>>>>>>>>>  And the worker itself? It seems two different worker instances
>>>>>>>>>> are
>>>>>>>>>
>>>>>>>>> trying
>>>>>>>>> to add the same method to the same page class.
>>>>>>>>>
>>>>>>>>>  files attached! appreciate your help.
>>>>>>>>>
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>>>>>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>>>>>>
>>>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>>>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>>>>
>>>>>>
>>>>> --
>>>>> Regards,
>>>>> Christophe Cordenier.
>>>>>
>>>>> Committer on Apache Tapestry 5
>>>>> Co-creator of wooki @wookicentral.com
>>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



-- 
--
http://www.bodylabgym.com - a private, by appointment only, one-on-one
health and fitness facility.
--
http://www.ectransition.com - Quality Electronic Cigarettes at a
reasonable price!
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

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

Reply via email to