You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Tat leung <ta...@comcast.net> on 2006/05/07 21:52:15 UTC

Tapernate-Example HiveMindAutowireWorker Problem

Hi All,

I am using Tapernate and HiveMindAutowireWorker and 
HiveMindAutowireWorkerFactory from the Tapernate example in my 
applicaiton.  The XML in my hivemind.xml file and the auto-wire classes 
are taken from the Tapernate example:

    <service-point id="AutowireWorkerFactory"
            interface="org.apache.hivemind.ServiceImplementationFactory"
            parameters-occurs="none">
        <invoke-factory>
            <construct 
class="org.apache.tapestry.enhance.HiveMindAutowireWorkerFactory" />
        </invoke-factory>
    </service-point>

    <service-point id="AutowireWorker" 
interface="org.apache.tapestry.enhance.EnhancementWorker">
        <invoke-factory service-id="AutowireWorkerFactory" />
    </service-point>

    <contribution configuration-id="tapestry.enhance.EnhancementWorkers">
        <command before="tapestry.enhance.abstract-property"
            after="tapestry.enhance.dispatch-inject"
            id="inject-autowire" object="service:AutowireWorker" />
    </contribution>

This is working as expected when there is no exception.  But when the 
application throws any exception, it is causing the following exception 
in the log file.  Has anyone encounter this problem?

Thanks!
Tat

org.apache.hivemind.ApplicationRuntimeException: Property delegate has 
already been claimed by a different enhancement worker.
    at 
org.apache.tapestry.enhance.EnhancementOperationImpl.claimProperty(EnhancementOperationImpl.java:241)
    at 
org.apache.tapestry.enhance.ParameterPropertyWorker.addParameter(ParameterPropertyWorker.java:117)
    at 
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(ParameterPropertyWorker.java:81)
    at 
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(ParameterPropertyWorker.java:53)
    at 
$EnhancementWorker_10b103b1964.performEnhancement($EnhancementWorker_10b103b1964.java)
    at 
$EnhancementWorker_10b103b197c.performEnhancement($EnhancementWorker_10b103b197c.java)
    at 
$EnhancementWorker_10b103b195a.performEnhancement($EnhancementWorker_10b103b195a.java)
    at 
org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getComponentConstructor(ComponentConstructorFactoryImpl.java:97)
    at 
$ComponentConstructorFactory_10b103b1947.getComponentConstructor($ComponentConstructorFactory_10b103b1947.java)
    at 
org.apache.tapestry.pageload.PageLoader.instantiateComponent(PageLoader.java:531)
    at 
org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.java:481)
    at 
$IPageLoader_10b103b1937.createImplicitComponent($IPageLoader_10b103b1937.java)
    at 
$IPageLoader_10b103b1938.createImplicitComponent($IPageLoader_10b103b1938.java)
    at 
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.createImplicitComponent(ComponentTemplateLoaderLogic.java:218)
    at 
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(ComponentTemplateLoaderLogic.java:172)
    at 
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(ComponentTemplateLoaderLogic.java:111)
    at 
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.loadTemplate(ComponentTemplateLoaderLogic.java:88)
    at 
org.apache.tapestry.services.impl.ComponentTemplateLoaderImpl.loadTemplate(ComponentTemplateLoaderImpl.java:60)
    at 
$ComponentTemplateLoader_10b103b194b.loadTemplate($ComponentTemplateLoader_10b103b194b.java)
    at 
org.apache.tapestry.pageload.PageLoader.loadTemplateForComponent(PageLoader.java:648)
    at org.apache.tapestry.BaseComponent.readTemplate(BaseComponent.java:77)
    at org.apache.tapestry.BaseComponent.finishLoad(BaseComponent.java:107)
    at $Exception_7.finishLoad($Exception_7.java)
    at 
org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:439)
    at org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:613)
    at $IPageLoader_10b103b1937.loadPage($IPageLoader_10b103b1937.java)
    at $IPageLoader_10b103b1938.loadPage($IPageLoader_10b103b1938.java)
    at org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:120)
    at $IPageSource_10b103b1897.getPage($IPageSource_10b103b1897.java)
    at 
org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:268)
    at 
org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:251)
    at 
org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionPresenterImpl.java:40)
    at 
$ExceptionPresenter_10b103b18a3.presentException($ExceptionPresenter_10b103b18a3.java)
    at 
org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngine.java:121)
    at 
org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:280)
    at 
org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:60)
    at 
$WebRequestServicer_10b103b1907.service($WebRequestServicer_10b103b1907.java)
    at 
$WebRequestServicer_10b103b1903.service($WebRequestServicer_10b103b1903.java)


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


RE: Tapernate-Example HiveMindAutowireWorker Problem

Posted by James Carman <ja...@carmanconsulting.com>.
Do you have logging turned all the way up?  I need to see what it's actually
adding auto-wire enhancements to.  Just search your log messages for
"auto-wire" and it should tell you what pages/components that it's
autowiring.  Can you paste that stuff into an email? 




-----Original Message-----
From: Tat leung [mailto:tatleung@comcast.net] 
Sent: Sunday, May 07, 2006 6:59 PM
To: Tapestry users
Subject: Re: Tapernate-Example HiveMindAutowireWorker Problem

Chris,

In my page class, I have the following abstract methods:

    public abstract Contact getContact();
    public abstract void setContact(Contact contact);

    public abstract String getConfirmPassword();
    public abstract void setConfirmPassword(String confirmPassword);

    public abstract String getErrorMessage();
    public abstract void setErrorMessage(String message);

    public abstract ContactDAO getContactDAO();

    @InjectPage("RegistrationSuccess")
    public abstract RegistrationSuccess getRegistrationSuccess();

While comparing my class with the methods in the EditMessage.java class, 
both seem to follow the same pattern.  One strange thing about it is 
that all pages are having the same problem, even those with very simple 
page classes and do not have abstract methods.  When I remove the 
auto-wiring XML fragment from the hivemodule.xml file, everything seems 
to be normal (excepted that the coded that depend on the auto-wiring is 
no longer working).

I tried what Mark suggested without much success and cannot confirm what 
Mark has reported.

As always, thanks for your help!
Tat

James Carman wrote:
> Hmmmm.  That's weird.  But, thanks for the tip.  I've submitted the code
as
> a patch to Tapestry.  So, I need to figure out how to get it working.  So,
> what you're saying is that if the auto-wiring stuff is inside a jar file
and
> not part of your application's hivemodule.xml file, then it bombs?
>
> -----Original Message-----
> From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
> Sent: Sunday, May 07, 2006 5:21 PM
> To: Tapestry users
> Subject: Re: Tapernate-Example HiveMindAutowireWorker Problem
> Importance: High
>
> I had that very same problem when I tried to package the Tapernate
> auto-wiring stuff in a drop-in jar. It said that one of the parameters of
> the Shell component has already been claimed by a different enhancement
> worker.
>
> When I just put the service definition and configuration contribution into
> my application's "root" module descriptor everything works fine.
>
>
>   
>> --- Ursprüngliche Nachricht ---
>> Von: Tat leung <ta...@comcast.net>
>> An: Tapestry users <us...@tapestry.apache.org>
>> Betreff: Tapernate-Example HiveMindAutowireWorker Problem
>> Datum: Sun, 07 May 2006 12:52:15 -0700
>>
>> Hi All,
>>
>> I am using Tapernate and HiveMindAutowireWorker and 
>> HiveMindAutowireWorkerFactory from the Tapernate example in my 
>> applicaiton.  The XML in my hivemind.xml file and the auto-wire classes 
>> are taken from the Tapernate example:
>>
>>     <service-point id="AutowireWorkerFactory"
>>             interface="org.apache.hivemind.ServiceImplementationFactory"
>>             parameters-occurs="none">
>>         <invoke-factory>
>>             <construct 
>> class="org.apache.tapestry.enhance.HiveMindAutowireWorkerFactory" />
>>         </invoke-factory>
>>     </service-point>
>>
>>     <service-point id="AutowireWorker" 
>> interface="org.apache.tapestry.enhance.EnhancementWorker">
>>         <invoke-factory service-id="AutowireWorkerFactory" />
>>     </service-point>
>>
>>     <contribution configuration-id="tapestry.enhance.EnhancementWorkers">
>>         <command before="tapestry.enhance.abstract-property"
>>             after="tapestry.enhance.dispatch-inject"
>>             id="inject-autowire" object="service:AutowireWorker" />
>>     </contribution>
>>
>> This is working as expected when there is no exception.  But when the 
>> application throws any exception, it is causing the following exception 
>> in the log file.  Has anyone encounter this problem?
>>
>> Thanks!
>> Tat
>>
>> org.apache.hivemind.ApplicationRuntimeException: Property delegate has 
>> already been claimed by a different enhancement worker.
>>     at 
>>
>>     
>
org.apache.tapestry.enhance.EnhancementOperationImpl.claimProperty(Enhanceme
> ntOperationImpl.java:241)
>   
>>     at 
>>
>>     
>
org.apache.tapestry.enhance.ParameterPropertyWorker.addParameter(ParameterPr
> opertyWorker.java:117)
>   
>>     at 
>>
>>     
>
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
> eterPropertyWorker.java:81)
>   
>>     at 
>>
>>     
>
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
> eterPropertyWorker.java:53)
>   
>>     at 
>>
>>     
>
$EnhancementWorker_10b103b1964.performEnhancement($EnhancementWorker_10b103b
> 1964.java)
>   
>>     at 
>>
>>     
>
$EnhancementWorker_10b103b197c.performEnhancement($EnhancementWorker_10b103b
> 197c.java)
>   
>>     at 
>>
>>     
>
$EnhancementWorker_10b103b195a.performEnhancement($EnhancementWorker_10b103b
> 195a.java)
>   
>>     at 
>>
>>     
>
org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getCompone
> ntConstructor(ComponentConstructorFactoryImpl.java:97)
>   
>>     at 
>>
>>     
>
$ComponentConstructorFactory_10b103b1947.getComponentConstructor($ComponentC
> onstructorFactory_10b103b1947.java)
>   
>>     at 
>>
>>     
>
org.apache.tapestry.pageload.PageLoader.instantiateComponent(PageLoader.java
> :531)
>   
>>     at 
>>
>>     
>
org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.j
> ava:481)
>   
>>     at 
>>
>>     
>
$IPageLoader_10b103b1937.createImplicitComponent($IPageLoader_10b103b1937.ja
> va)
>   
>>     at 
>>
>>     
>
$IPageLoader_10b103b1938.createImplicitComponent($IPageLoader_10b103b1938.ja
> va)
>   
>>     at 
>>
>>     
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.createImplici
> tComponent(ComponentTemplateLoaderLogic.java:218)
>   
>>     at 
>>
>>     
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
> nentTemplateLoaderLogic.java:172)
>   
>>     at 
>>
>>     
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
> nentTemplateLoaderLogic.java:111)
>   
>>     at 
>>
>>     
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.loadTemplate(
> ComponentTemplateLoaderLogic.java:88)
>   
>>     at 
>>
>>     
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderImpl.loadTemplate(C
> omponentTemplateLoaderImpl.java:60)
>   
>>     at 
>>
>>     
>
$ComponentTemplateLoader_10b103b194b.loadTemplate($ComponentTemplateLoader_1
> 0b103b194b.java)
>   
>>     at 
>>
>>     
>
org.apache.tapestry.pageload.PageLoader.loadTemplateForComponent(PageLoader.
> java:648)
>   
>>     at
>> org.apache.tapestry.BaseComponent.readTemplate(BaseComponent.java:77)
>>     at
>> org.apache.tapestry.BaseComponent.finishLoad(BaseComponent.java:107)
>>     at $Exception_7.finishLoad($Exception_7.java)
>>     at 
>>
>>     
>
org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:4
> 39)
>   
>>     at
>> org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:613)
>>     at $IPageLoader_10b103b1937.loadPage($IPageLoader_10b103b1937.java)
>>     at $IPageLoader_10b103b1938.loadPage($IPageLoader_10b103b1938.java)
>>     at
>> org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:120)
>>     at $IPageSource_10b103b1897.getPage($IPageSource_10b103b1897.java)
>>     at 
>> org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:268)
>>     at 
>> org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:251)
>>     at 
>>
>>     
>
org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionP
> resenterImpl.java:40)
>   
>>     at 
>>
>>     
>
$ExceptionPresenter_10b103b18a3.presentException($ExceptionPresenter_10b103b
> 18a3.java)
>   
>>     at 
>>
>>     
>
org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngi
> ne.java:121)
>   
>>     at 
>>
org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:280)
>>     at 
>>
>>     
>
org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngin
> eTerminator.java:60)
>   
>>     at 
>>
>>     
>
$WebRequestServicer_10b103b1907.service($WebRequestServicer_10b103b1907.java
> )
>   
>>     at 
>>
>>     
>
$WebRequestServicer_10b103b1903.service($WebRequestServicer_10b103b1903.java
> )
>   
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>     
>
>   




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


Re: Tapernate-Example HiveMindAutowireWorker Problem

Posted by Tat leung <ta...@comcast.net>.
Chris,

In my page class, I have the following abstract methods:

    public abstract Contact getContact();
    public abstract void setContact(Contact contact);

    public abstract String getConfirmPassword();
    public abstract void setConfirmPassword(String confirmPassword);

    public abstract String getErrorMessage();
    public abstract void setErrorMessage(String message);

    public abstract ContactDAO getContactDAO();

    @InjectPage("RegistrationSuccess")
    public abstract RegistrationSuccess getRegistrationSuccess();

While comparing my class with the methods in the EditMessage.java class, 
both seem to follow the same pattern.  One strange thing about it is 
that all pages are having the same problem, even those with very simple 
page classes and do not have abstract methods.  When I remove the 
auto-wiring XML fragment from the hivemodule.xml file, everything seems 
to be normal (excepted that the coded that depend on the auto-wiring is 
no longer working).

I tried what Mark suggested without much success and cannot confirm what 
Mark has reported.

As always, thanks for your help!
Tat

James Carman wrote:
> Hmmmm.  That's weird.  But, thanks for the tip.  I've submitted the code as
> a patch to Tapestry.  So, I need to figure out how to get it working.  So,
> what you're saying is that if the auto-wiring stuff is inside a jar file and
> not part of your application's hivemodule.xml file, then it bombs?
>
> -----Original Message-----
> From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
> Sent: Sunday, May 07, 2006 5:21 PM
> To: Tapestry users
> Subject: Re: Tapernate-Example HiveMindAutowireWorker Problem
> Importance: High
>
> I had that very same problem when I tried to package the Tapernate
> auto-wiring stuff in a drop-in jar. It said that one of the parameters of
> the Shell component has already been claimed by a different enhancement
> worker.
>
> When I just put the service definition and configuration contribution into
> my application's "root" module descriptor everything works fine.
>
>
>   
>> --- Ursprüngliche Nachricht ---
>> Von: Tat leung <ta...@comcast.net>
>> An: Tapestry users <us...@tapestry.apache.org>
>> Betreff: Tapernate-Example HiveMindAutowireWorker Problem
>> Datum: Sun, 07 May 2006 12:52:15 -0700
>>
>> Hi All,
>>
>> I am using Tapernate and HiveMindAutowireWorker and 
>> HiveMindAutowireWorkerFactory from the Tapernate example in my 
>> applicaiton.  The XML in my hivemind.xml file and the auto-wire classes 
>> are taken from the Tapernate example:
>>
>>     <service-point id="AutowireWorkerFactory"
>>             interface="org.apache.hivemind.ServiceImplementationFactory"
>>             parameters-occurs="none">
>>         <invoke-factory>
>>             <construct 
>> class="org.apache.tapestry.enhance.HiveMindAutowireWorkerFactory" />
>>         </invoke-factory>
>>     </service-point>
>>
>>     <service-point id="AutowireWorker" 
>> interface="org.apache.tapestry.enhance.EnhancementWorker">
>>         <invoke-factory service-id="AutowireWorkerFactory" />
>>     </service-point>
>>
>>     <contribution configuration-id="tapestry.enhance.EnhancementWorkers">
>>         <command before="tapestry.enhance.abstract-property"
>>             after="tapestry.enhance.dispatch-inject"
>>             id="inject-autowire" object="service:AutowireWorker" />
>>     </contribution>
>>
>> This is working as expected when there is no exception.  But when the 
>> application throws any exception, it is causing the following exception 
>> in the log file.  Has anyone encounter this problem?
>>
>> Thanks!
>> Tat
>>
>> org.apache.hivemind.ApplicationRuntimeException: Property delegate has 
>> already been claimed by a different enhancement worker.
>>     at 
>>
>>     
> org.apache.tapestry.enhance.EnhancementOperationImpl.claimProperty(Enhanceme
> ntOperationImpl.java:241)
>   
>>     at 
>>
>>     
> org.apache.tapestry.enhance.ParameterPropertyWorker.addParameter(ParameterPr
> opertyWorker.java:117)
>   
>>     at 
>>
>>     
> org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
> eterPropertyWorker.java:81)
>   
>>     at 
>>
>>     
> org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
> eterPropertyWorker.java:53)
>   
>>     at 
>>
>>     
> $EnhancementWorker_10b103b1964.performEnhancement($EnhancementWorker_10b103b
> 1964.java)
>   
>>     at 
>>
>>     
> $EnhancementWorker_10b103b197c.performEnhancement($EnhancementWorker_10b103b
> 197c.java)
>   
>>     at 
>>
>>     
> $EnhancementWorker_10b103b195a.performEnhancement($EnhancementWorker_10b103b
> 195a.java)
>   
>>     at 
>>
>>     
> org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getCompone
> ntConstructor(ComponentConstructorFactoryImpl.java:97)
>   
>>     at 
>>
>>     
> $ComponentConstructorFactory_10b103b1947.getComponentConstructor($ComponentC
> onstructorFactory_10b103b1947.java)
>   
>>     at 
>>
>>     
> org.apache.tapestry.pageload.PageLoader.instantiateComponent(PageLoader.java
> :531)
>   
>>     at 
>>
>>     
> org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.j
> ava:481)
>   
>>     at 
>>
>>     
> $IPageLoader_10b103b1937.createImplicitComponent($IPageLoader_10b103b1937.ja
> va)
>   
>>     at 
>>
>>     
> $IPageLoader_10b103b1938.createImplicitComponent($IPageLoader_10b103b1938.ja
> va)
>   
>>     at 
>>
>>     
> org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.createImplici
> tComponent(ComponentTemplateLoaderLogic.java:218)
>   
>>     at 
>>
>>     
> org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
> nentTemplateLoaderLogic.java:172)
>   
>>     at 
>>
>>     
> org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
> nentTemplateLoaderLogic.java:111)
>   
>>     at 
>>
>>     
> org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.loadTemplate(
> ComponentTemplateLoaderLogic.java:88)
>   
>>     at 
>>
>>     
> org.apache.tapestry.services.impl.ComponentTemplateLoaderImpl.loadTemplate(C
> omponentTemplateLoaderImpl.java:60)
>   
>>     at 
>>
>>     
> $ComponentTemplateLoader_10b103b194b.loadTemplate($ComponentTemplateLoader_1
> 0b103b194b.java)
>   
>>     at 
>>
>>     
> org.apache.tapestry.pageload.PageLoader.loadTemplateForComponent(PageLoader.
> java:648)
>   
>>     at
>> org.apache.tapestry.BaseComponent.readTemplate(BaseComponent.java:77)
>>     at
>> org.apache.tapestry.BaseComponent.finishLoad(BaseComponent.java:107)
>>     at $Exception_7.finishLoad($Exception_7.java)
>>     at 
>>
>>     
> org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:4
> 39)
>   
>>     at
>> org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:613)
>>     at $IPageLoader_10b103b1937.loadPage($IPageLoader_10b103b1937.java)
>>     at $IPageLoader_10b103b1938.loadPage($IPageLoader_10b103b1938.java)
>>     at
>> org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:120)
>>     at $IPageSource_10b103b1897.getPage($IPageSource_10b103b1897.java)
>>     at 
>> org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:268)
>>     at 
>> org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:251)
>>     at 
>>
>>     
> org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionP
> resenterImpl.java:40)
>   
>>     at 
>>
>>     
> $ExceptionPresenter_10b103b18a3.presentException($ExceptionPresenter_10b103b
> 18a3.java)
>   
>>     at 
>>
>>     
> org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngi
> ne.java:121)
>   
>>     at 
>> org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:280)
>>     at 
>>
>>     
> org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngin
> eTerminator.java:60)
>   
>>     at 
>>
>>     
> $WebRequestServicer_10b103b1907.service($WebRequestServicer_10b103b1907.java
> )
>   
>>     at 
>>
>>     
> $WebRequestServicer_10b103b1903.service($WebRequestServicer_10b103b1903.java
> )
>   
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>     
>
>   


RE: Tapernate-Example HiveMindAutowireWorker Problem

Posted by Mark Lehmacher <ma...@gmx.de>.
A little correction, the Shell delegate parameter is of type IRender, not
IValidationDelegate.

> --- Ursprüngliche Nachricht ---
> Von: "Mark Lehmacher" <ma...@gmx.de>
> An: "Tapestry users" <us...@tapestry.apache.org>
> Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem
> Datum: Mon, 8 May 2006 12:30:51 +0200 (MEST)
> 
> Yup, that's what I am saying.
> 
> Looks like it's wiring component parameters as well:
> 
> 5705 HiveMindAutowireWorker:performEnhancement [DEBUG] Creating auto-wired
> accessor for property delegate on component
> classpath:/org/apache/tapestry/html/Shell.jwc, line 22, column 96
> 5856 HiveMindAutowireWorker:performEnhancement [DEBUG] Creating auto-wired
> accessor for property delegate on component
> classpath:/org/apache/tapestry/html/Shell.jwc, line 22, column 96
> 
> With the result of getting this error:
> 
> Error at classpath:/org/apache/tapestry/html/Shell.jwc, line 78, column
> 20:
> Error adding property delegate to class org.apache.tapestry.html.Shell:
> Property delegate has already been claimed by a different enhancement
> worker.
> 
> 
> So my uneducated guess is that somewhere in the depths of tapestry there
> might be a service which implements IValidationDelegate and it's gets
> wired
> to the component parameter. Looks like the order gets somehow fucked-up,
> because at the point at which the autowire stuff comes in all parameter
> properties should have already been claimed.  So it probably has to do
> with
> the configuration contribution taking place in the seperate module
> descriptor within my drop-in jar.
> 
> 
> > --- Ursprüngliche Nachricht ---
> > Von: "James Carman" <ja...@carmanconsulting.com>
> > An: "'Tapestry users'" <us...@tapestry.apache.org>
> > Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem
> > Datum: Sun, 7 May 2006 18:25:17 -0400
> > 
> > Hmmmm.  That's weird.  But, thanks for the tip.  I've submitted the code
> > as
> > a patch to Tapestry.  So, I need to figure out how to get it working. 
> So,
> > what you're saying is that if the auto-wiring stuff is inside a jar file
> > and
> > not part of your application's hivemodule.xml file, then it bombs?
> > 
> > -----Original Message-----
> > From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
> > Sent: Sunday, May 07, 2006 5:21 PM
> > To: Tapestry users
> > Subject: Re: Tapernate-Example HiveMindAutowireWorker Problem
> > Importance: High
> > 
> > I had that very same problem when I tried to package the Tapernate
> > auto-wiring stuff in a drop-in jar. It said that one of the parameters
> of
> > the Shell component has already been claimed by a different enhancement
> > worker.
> > 
> > When I just put the service definition and configuration contribution
> into
> > my application's "root" module descriptor everything works fine.
> > 
> > 
> > > --- Ursprüngliche Nachricht ---
> > > Von: Tat leung <ta...@comcast.net>
> > > An: Tapestry users <us...@tapestry.apache.org>
> > > Betreff: Tapernate-Example HiveMindAutowireWorker Problem
> > > Datum: Sun, 07 May 2006 12:52:15 -0700
> > > 
> > > Hi All,
> > > 
> > > I am using Tapernate and HiveMindAutowireWorker and 
> > > HiveMindAutowireWorkerFactory from the Tapernate example in my 
> > > applicaiton.  The XML in my hivemind.xml file and the auto-wire
> classes 
> > > are taken from the Tapernate example:
> > > 
> > >     <service-point id="AutowireWorkerFactory"
> > >            
> interface="org.apache.hivemind.ServiceImplementationFactory"
> > >             parameters-occurs="none">
> > >         <invoke-factory>
> > >             <construct 
> > > class="org.apache.tapestry.enhance.HiveMindAutowireWorkerFactory" />
> > >         </invoke-factory>
> > >     </service-point>
> > > 
> > >     <service-point id="AutowireWorker" 
> > > interface="org.apache.tapestry.enhance.EnhancementWorker">
> > >         <invoke-factory service-id="AutowireWorkerFactory" />
> > >     </service-point>
> > > 
> > >     <contribution
> > configuration-id="tapestry.enhance.EnhancementWorkers">
> > >         <command before="tapestry.enhance.abstract-property"
> > >             after="tapestry.enhance.dispatch-inject"
> > >             id="inject-autowire" object="service:AutowireWorker" />
> > >     </contribution>
> > > 
> > > This is working as expected when there is no exception.  But when the 
> > > application throws any exception, it is causing the following
> exception 
> > > in the log file.  Has anyone encounter this problem?
> > > 
> > > Thanks!
> > > Tat
> > > 
> > > org.apache.hivemind.ApplicationRuntimeException: Property delegate has
> > > already been claimed by a different enhancement worker.
> > >     at 
> > >
> >
>
org.apache.tapestry.enhance.EnhancementOperationImpl.claimProperty(Enhanceme
> > ntOperationImpl.java:241)
> > >     at 
> > >
> >
>
org.apache.tapestry.enhance.ParameterPropertyWorker.addParameter(ParameterPr
> > opertyWorker.java:117)
> > >     at 
> > >
> >
>
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
> > eterPropertyWorker.java:81)
> > >     at 
> > >
> >
>
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
> > eterPropertyWorker.java:53)
> > >     at 
> > >
> >
>
$EnhancementWorker_10b103b1964.performEnhancement($EnhancementWorker_10b103b
> > 1964.java)
> > >     at 
> > >
> >
>
$EnhancementWorker_10b103b197c.performEnhancement($EnhancementWorker_10b103b
> > 197c.java)
> > >     at 
> > >
> >
>
$EnhancementWorker_10b103b195a.performEnhancement($EnhancementWorker_10b103b
> > 195a.java)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getCompone
> > ntConstructor(ComponentConstructorFactoryImpl.java:97)
> > >     at 
> > >
> >
>
$ComponentConstructorFactory_10b103b1947.getComponentConstructor($ComponentC
> > onstructorFactory_10b103b1947.java)
> > >     at 
> > >
> >
>
org.apache.tapestry.pageload.PageLoader.instantiateComponent(PageLoader.java
> > :531)
> > >     at 
> > >
> >
>
org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.j
> > ava:481)
> > >     at 
> > >
> >
>
$IPageLoader_10b103b1937.createImplicitComponent($IPageLoader_10b103b1937.ja
> > va)
> > >     at 
> > >
> >
>
$IPageLoader_10b103b1938.createImplicitComponent($IPageLoader_10b103b1938.ja
> > va)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.createImplici
> > tComponent(ComponentTemplateLoaderLogic.java:218)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
> > nentTemplateLoaderLogic.java:172)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
> > nentTemplateLoaderLogic.java:111)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.loadTemplate(
> > ComponentTemplateLoaderLogic.java:88)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderImpl.loadTemplate(C
> > omponentTemplateLoaderImpl.java:60)
> > >     at 
> > >
> >
>
$ComponentTemplateLoader_10b103b194b.loadTemplate($ComponentTemplateLoader_1
> > 0b103b194b.java)
> > >     at 
> > >
> >
>
org.apache.tapestry.pageload.PageLoader.loadTemplateForComponent(PageLoader.
> > java:648)
> > >     at
> > > org.apache.tapestry.BaseComponent.readTemplate(BaseComponent.java:77)
> > >     at
> > > org.apache.tapestry.BaseComponent.finishLoad(BaseComponent.java:107)
> > >     at $Exception_7.finishLoad($Exception_7.java)
> > >     at 
> > >
> >
>
org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:4
> > 39)
> > >     at
> > > org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:613)
> > >     at
> $IPageLoader_10b103b1937.loadPage($IPageLoader_10b103b1937.java)
> > >     at
> $IPageLoader_10b103b1938.loadPage($IPageLoader_10b103b1938.java)
> > >     at
> > > org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:120)
> > >     at $IPageSource_10b103b1897.getPage($IPageSource_10b103b1897.java)
> > >     at 
> > >
> org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:268)
> > >     at 
> > > org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:251)
> > >     at 
> > >
> >
>
org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionP
> > resenterImpl.java:40)
> > >     at 
> > >
> >
>
$ExceptionPresenter_10b103b18a3.presentException($ExceptionPresenter_10b103b
> > 18a3.java)
> > >     at 
> > >
> >
>
org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngi
> > ne.java:121)
> > >     at 
> > >
> >
> org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:280)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngin
> > eTerminator.java:60)
> > >     at 
> > >
> >
>
$WebRequestServicer_10b103b1907.service($WebRequestServicer_10b103b1907.java
> > )
> > >     at 
> > >
> >
>
$WebRequestServicer_10b103b1903.service($WebRequestServicer_10b103b1903.java
> > )
> > > 
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > 
> > 
> > -- 
> > "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
> > Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> > 
> 
> -- 
> GMX Produkte empfehlen und ganz einfach Geld verdienen!
> Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 

-- 
Echte DSL-Flatrate dauerhaft für 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl

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


RE: Tapernate-Example HiveMindAutowireWorker Problem

Posted by James Carman <ja...@carmanconsulting.com>.
Great!  I'll update my patch on the Jira issue I created.

-----Original Message-----
From: Tat leung [mailto:tatleung@comcast.net] 
Sent: Wednesday, May 10, 2006 2:27 AM
To: Tapestry users
Subject: Re: Tapernate-Example HiveMindAutowireWorker Problem

James,

The change resolved the problem that I was having.

Thanks,
Tat

James Carman wrote:
> Oh, sorry.  I committed a change to my tapernate-example application which
> implements this change.  For those of you who were encountering this
> problem, can you download it and try out the changes?  Thanks!
>
>
> -----Original Message-----
> From: James Carman [mailto:james@carmanconsulting.com] 
> Sent: Monday, May 08, 2006 9:31 PM
> To: 'Tapestry users'
> Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem
>
> Well, I could specify *all* of the workers that I want my auto-wire worker
> to follow by using a comma-separated list.  That might do the trick!
>
> -----Original Message-----
> From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
> Sent: Monday, May 08, 2006 6:04 PM
> To: Tapestry users
> Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem
> Importance: High
>
> The way I see it, it definitely IS the ordering: 
>
> When you contribute the autowirer with
> before="tapestry.enhance.abstract-property" and
> after="tapestry.enhance.dispatch-inject" parameters you don't guarantee
that
> the parameter-worker already performed it's work, because it is not part
of
> those services which make up dispatch-inject.
>
> The ordering of the enhancement workers is unspecified and relies on the
> underlying Hivemind Order object, which in turn is backed by a HashMap. So
I
> guess if you add one or several enhancement workers to your chain you will
> get the same problem sooner or later (as soon as the HashMap fucks up the
> ordering for you and the parameter-worker runs before your
autowire-worker).
>
> However, I'd really love to see a working autowiring function like that.
If
> it goes into the tapestry core it could be combined into the
> abstract-property-worker, which would solve the ordering problem but raise
> other questions instead (like seperation of concerns).
>
>
>   
>> --- Ursprüngliche Nachricht ---
>> Von: "James Carman" <ja...@carmanconsulting.com>
>> An: "'Tapestry users'" <us...@tapestry.apache.org>
>> Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem
>> Datum: Mon, 8 May 2006 10:57:05 -0400
>>
>> I thought the ordering was getting screwed up too.  But, I added
>> LoggingInterceptor to the ParameterPropertyWorker and my auto-wire worker
>> and the parameter one seems to be running first.  If the parameter worker
>> runs first, this problem should not occur, since the property would have
>> already been claimed and my worker would just bypass it.  I intentionally
>> put my worker after all that stuff, so I wouldn't step on anyone's toes. 
>> I
>> wonder if there's some special case that's getting the ordering screwed
>> up? 
>>
>> -----Original Message-----
>> From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
>> Sent: Monday, May 08, 2006 6:31 AM
>> To: Tapestry users
>> Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem
>> Importance: High
>>
>> Yup, that's what I am saying.
>>
>> Looks like it's wiring component parameters as well:
>>
>> 5705 HiveMindAutowireWorker:performEnhancement [DEBUG] Creating
auto-wired
>> accessor for property delegate on component
>> classpath:/org/apache/tapestry/html/Shell.jwc, line 22, column 96
>> 5856 HiveMindAutowireWorker:performEnhancement [DEBUG] Creating
auto-wired
>> accessor for property delegate on component
>> classpath:/org/apache/tapestry/html/Shell.jwc, line 22, column 96
>>
>> With the result of getting this error:
>>
>> Error at classpath:/org/apache/tapestry/html/Shell.jwc, line 78, column
>> 20:
>> Error adding property delegate to class org.apache.tapestry.html.Shell:
>> Property delegate has already been claimed by a different enhancement
>> worker.
>>
>>
>> So my uneducated guess is that somewhere in the depths of tapestry there
>> might be a service which implements IValidationDelegate and it's gets
>> wired
>> to the component parameter. Looks like the order gets somehow fucked-up,
>> because at the point at which the autowire stuff comes in all parameter
>> properties should have already been claimed.  So it probably has to do
>> with
>> the configuration contribution taking place in the seperate module
>> descriptor within my drop-in jar.
>>
>>
>>     
>>> --- Ursprüngliche Nachricht ---
>>> Von: "James Carman" <ja...@carmanconsulting.com>
>>> An: "'Tapestry users'" <us...@tapestry.apache.org>
>>> Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem
>>> Datum: Sun, 7 May 2006 18:25:17 -0400
>>>
>>> Hmmmm.  That's weird.  But, thanks for the tip.  I've submitted the code
>>> as
>>> a patch to Tapestry.  So, I need to figure out how to get it working. 
>>>       
>> So,
>>     
>>> what you're saying is that if the auto-wiring stuff is inside a jar file
>>> and
>>> not part of your application's hivemodule.xml file, then it bombs?
>>>
>>> -----Original Message-----
>>> From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
>>> Sent: Sunday, May 07, 2006 5:21 PM
>>> To: Tapestry users
>>> Subject: Re: Tapernate-Example HiveMindAutowireWorker Problem
>>> Importance: High
>>>
>>> I had that very same problem when I tried to package the Tapernate
>>> auto-wiring stuff in a drop-in jar. It said that one of the parameters
>>>       
>> of
>>     
>>> the Shell component has already been claimed by a different enhancement
>>> worker.
>>>
>>> When I just put the service definition and configuration contribution
>>>       
>> into
>>     
>>> my application's "root" module descriptor everything works fine.
>>>
>>>
>>>       
>>>> --- Ursprüngliche Nachricht ---
>>>> Von: Tat leung <ta...@comcast.net>
>>>> An: Tapestry users <us...@tapestry.apache.org>
>>>> Betreff: Tapernate-Example HiveMindAutowireWorker Problem
>>>> Datum: Sun, 07 May 2006 12:52:15 -0700
>>>>
>>>> Hi All,
>>>>
>>>> I am using Tapernate and HiveMindAutowireWorker and 
>>>> HiveMindAutowireWorkerFactory from the Tapernate example in my 
>>>> applicaiton.  The XML in my hivemind.xml file and the auto-wire
>>>>         
>> classes 
>>     
>>>> are taken from the Tapernate example:
>>>>
>>>>     <service-point id="AutowireWorkerFactory"
>>>>            
>>>>         
>> interface="org.apache.hivemind.ServiceImplementationFactory"
>>     
>>>>             parameters-occurs="none">
>>>>         <invoke-factory>
>>>>             <construct 
>>>> class="org.apache.tapestry.enhance.HiveMindAutowireWorkerFactory" />
>>>>         </invoke-factory>
>>>>     </service-point>
>>>>
>>>>     <service-point id="AutowireWorker" 
>>>> interface="org.apache.tapestry.enhance.EnhancementWorker">
>>>>         <invoke-factory service-id="AutowireWorkerFactory" />
>>>>     </service-point>
>>>>
>>>>     <contribution
>>>>         
>>> configuration-id="tapestry.enhance.EnhancementWorkers">
>>>       
>>>>         <command before="tapestry.enhance.abstract-property"
>>>>             after="tapestry.enhance.dispatch-inject"
>>>>             id="inject-autowire" object="service:AutowireWorker" />
>>>>     </contribution>
>>>>
>>>> This is working as expected when there is no exception.  But when the 
>>>> application throws any exception, it is causing the following
>>>>         
>> exception 
>>     
>>>> in the log file.  Has anyone encounter this problem?
>>>>
>>>> Thanks!
>>>> Tat
>>>>
>>>> org.apache.hivemind.ApplicationRuntimeException: Property delegate has
>>>> already been claimed by a different enhancement worker.
>>>>     at 
>>>>
>>>>         
>
org.apache.tapestry.enhance.EnhancementOperationImpl.claimProperty(Enhanceme
>   
>>> ntOperationImpl.java:241)
>>>       
>>>>     at 
>>>>
>>>>         
>
org.apache.tapestry.enhance.ParameterPropertyWorker.addParameter(ParameterPr
>   
>>> opertyWorker.java:117)
>>>       
>>>>     at 
>>>>
>>>>         
>
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
>   
>>> eterPropertyWorker.java:81)
>>>       
>>>>     at 
>>>>
>>>>         
>
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
>   
>>> eterPropertyWorker.java:53)
>>>       
>>>>     at 
>>>>
>>>>         
>
$EnhancementWorker_10b103b1964.performEnhancement($EnhancementWorker_10b103b
>   
>>> 1964.java)
>>>       
>>>>     at 
>>>>
>>>>         
>
$EnhancementWorker_10b103b197c.performEnhancement($EnhancementWorker_10b103b
>   
>>> 197c.java)
>>>       
>>>>     at 
>>>>
>>>>         
>
$EnhancementWorker_10b103b195a.performEnhancement($EnhancementWorker_10b103b
>   
>>> 195a.java)
>>>       
>>>>     at 
>>>>
>>>>         
>
org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getCompone
>   
>>> ntConstructor(ComponentConstructorFactoryImpl.java:97)
>>>       
>>>>     at 
>>>>
>>>>         
>
$ComponentConstructorFactory_10b103b1947.getComponentConstructor($ComponentC
>   
>>> onstructorFactory_10b103b1947.java)
>>>       
>>>>     at 
>>>>
>>>>         
>
org.apache.tapestry.pageload.PageLoader.instantiateComponent(PageLoader.java
>   
>>> :531)
>>>       
>>>>     at 
>>>>
>>>>         
>
org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.j
>   
>>> ava:481)
>>>       
>>>>     at 
>>>>
>>>>         
>
$IPageLoader_10b103b1937.createImplicitComponent($IPageLoader_10b103b1937.ja
>   
>>> va)
>>>       
>>>>     at 
>>>>
>>>>         
>
$IPageLoader_10b103b1938.createImplicitComponent($IPageLoader_10b103b1938.ja
>   
>>> va)
>>>       
>>>>     at 
>>>>
>>>>         
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.createImplici
>   
>>> tComponent(ComponentTemplateLoaderLogic.java:218)
>>>       
>>>>     at 
>>>>
>>>>         
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
>   
>>> nentTemplateLoaderLogic.java:172)
>>>       
>>>>     at 
>>>>
>>>>         
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
>   
>>> nentTemplateLoaderLogic.java:111)
>>>       
>>>>     at 
>>>>
>>>>         
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.loadTemplate(
>   
>>> ComponentTemplateLoaderLogic.java:88)
>>>       
>>>>     at 
>>>>
>>>>         
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderImpl.loadTemplate(C
>   
>>> omponentTemplateLoaderImpl.java:60)
>>>       
>>>>     at 
>>>>
>>>>         
>
$ComponentTemplateLoader_10b103b194b.loadTemplate($ComponentTemplateLoader_1
>   
>>> 0b103b194b.java)
>>>       
>>>>     at 
>>>>
>>>>         
>
org.apache.tapestry.pageload.PageLoader.loadTemplateForComponent(PageLoader.
>   
>>> java:648)
>>>       
>>>>     at
>>>> org.apache.tapestry.BaseComponent.readTemplate(BaseComponent.java:77)
>>>>     at
>>>> org.apache.tapestry.BaseComponent.finishLoad(BaseComponent.java:107)
>>>>     at $Exception_7.finishLoad($Exception_7.java)
>>>>     at 
>>>>
>>>>         
>
org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:4
>   
>>> 39)
>>>       
>>>>     at
>>>> org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:613)
>>>>     at
>>>>         
>> $IPageLoader_10b103b1937.loadPage($IPageLoader_10b103b1937.java)
>>     
>>>>     at
>>>>         
>> $IPageLoader_10b103b1938.loadPage($IPageLoader_10b103b1938.java)
>>     
>>>>     at
>>>> org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:120)
>>>>     at $IPageSource_10b103b1897.getPage($IPageSource_10b103b1897.java)
>>>>     at 
>>>>
>>>>         
>> org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:268)
>>     
>>>>     at 
>>>> org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:251)
>>>>     at 
>>>>
>>>>         
>
org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionP
>   
>>> resenterImpl.java:40)
>>>       
>>>>     at 
>>>>
>>>>         
>
$ExceptionPresenter_10b103b18a3.presentException($ExceptionPresenter_10b103b
>   
>>> 18a3.java)
>>>       
>>>>     at 
>>>>
>>>>         
>
org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngi
>   
>>> ne.java:121)
>>>       
>>>>     at 
>>>>
>>>>         
>>
org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:280)
>>     
>>>>     at 
>>>>
>>>>         
>
org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngin
>   
>>> eTerminator.java:60)
>>>       
>>>>     at 
>>>>
>>>>         
>
$WebRequestServicer_10b103b1907.service($WebRequestServicer_10b103b1907.java
>   
>>> )
>>>       
>>>>     at 
>>>>
>>>>         
>
$WebRequestServicer_10b103b1903.service($WebRequestServicer_10b103b1903.java
>   
>>> )
>>>       
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>         
>>> -- 
>>> "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
>>> Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>       
>> -- 
>> GMX Produkte empfehlen und ganz einfach Geld verdienen!
>> Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>     
>
>   




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


Re: Tapernate-Example HiveMindAutowireWorker Problem

Posted by Tat leung <ta...@comcast.net>.
James,

The change resolved the problem that I was having.

Thanks,
Tat

James Carman wrote:
> Oh, sorry.  I committed a change to my tapernate-example application which
> implements this change.  For those of you who were encountering this
> problem, can you download it and try out the changes?  Thanks!
>
>
> -----Original Message-----
> From: James Carman [mailto:james@carmanconsulting.com] 
> Sent: Monday, May 08, 2006 9:31 PM
> To: 'Tapestry users'
> Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem
>
> Well, I could specify *all* of the workers that I want my auto-wire worker
> to follow by using a comma-separated list.  That might do the trick!
>
> -----Original Message-----
> From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
> Sent: Monday, May 08, 2006 6:04 PM
> To: Tapestry users
> Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem
> Importance: High
>
> The way I see it, it definitely IS the ordering: 
>
> When you contribute the autowirer with
> before="tapestry.enhance.abstract-property" and
> after="tapestry.enhance.dispatch-inject" parameters you don't guarantee that
> the parameter-worker already performed it's work, because it is not part of
> those services which make up dispatch-inject.
>
> The ordering of the enhancement workers is unspecified and relies on the
> underlying Hivemind Order object, which in turn is backed by a HashMap. So I
> guess if you add one or several enhancement workers to your chain you will
> get the same problem sooner or later (as soon as the HashMap fucks up the
> ordering for you and the parameter-worker runs before your autowire-worker).
>
> However, I'd really love to see a working autowiring function like that. If
> it goes into the tapestry core it could be combined into the
> abstract-property-worker, which would solve the ordering problem but raise
> other questions instead (like seperation of concerns).
>
>
>   
>> --- Ursprüngliche Nachricht ---
>> Von: "James Carman" <ja...@carmanconsulting.com>
>> An: "'Tapestry users'" <us...@tapestry.apache.org>
>> Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem
>> Datum: Mon, 8 May 2006 10:57:05 -0400
>>
>> I thought the ordering was getting screwed up too.  But, I added
>> LoggingInterceptor to the ParameterPropertyWorker and my auto-wire worker
>> and the parameter one seems to be running first.  If the parameter worker
>> runs first, this problem should not occur, since the property would have
>> already been claimed and my worker would just bypass it.  I intentionally
>> put my worker after all that stuff, so I wouldn't step on anyone's toes. 
>> I
>> wonder if there's some special case that's getting the ordering screwed
>> up? 
>>
>> -----Original Message-----
>> From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
>> Sent: Monday, May 08, 2006 6:31 AM
>> To: Tapestry users
>> Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem
>> Importance: High
>>
>> Yup, that's what I am saying.
>>
>> Looks like it's wiring component parameters as well:
>>
>> 5705 HiveMindAutowireWorker:performEnhancement [DEBUG] Creating auto-wired
>> accessor for property delegate on component
>> classpath:/org/apache/tapestry/html/Shell.jwc, line 22, column 96
>> 5856 HiveMindAutowireWorker:performEnhancement [DEBUG] Creating auto-wired
>> accessor for property delegate on component
>> classpath:/org/apache/tapestry/html/Shell.jwc, line 22, column 96
>>
>> With the result of getting this error:
>>
>> Error at classpath:/org/apache/tapestry/html/Shell.jwc, line 78, column
>> 20:
>> Error adding property delegate to class org.apache.tapestry.html.Shell:
>> Property delegate has already been claimed by a different enhancement
>> worker.
>>
>>
>> So my uneducated guess is that somewhere in the depths of tapestry there
>> might be a service which implements IValidationDelegate and it's gets
>> wired
>> to the component parameter. Looks like the order gets somehow fucked-up,
>> because at the point at which the autowire stuff comes in all parameter
>> properties should have already been claimed.  So it probably has to do
>> with
>> the configuration contribution taking place in the seperate module
>> descriptor within my drop-in jar.
>>
>>
>>     
>>> --- Ursprüngliche Nachricht ---
>>> Von: "James Carman" <ja...@carmanconsulting.com>
>>> An: "'Tapestry users'" <us...@tapestry.apache.org>
>>> Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem
>>> Datum: Sun, 7 May 2006 18:25:17 -0400
>>>
>>> Hmmmm.  That's weird.  But, thanks for the tip.  I've submitted the code
>>> as
>>> a patch to Tapestry.  So, I need to figure out how to get it working. 
>>>       
>> So,
>>     
>>> what you're saying is that if the auto-wiring stuff is inside a jar file
>>> and
>>> not part of your application's hivemodule.xml file, then it bombs?
>>>
>>> -----Original Message-----
>>> From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
>>> Sent: Sunday, May 07, 2006 5:21 PM
>>> To: Tapestry users
>>> Subject: Re: Tapernate-Example HiveMindAutowireWorker Problem
>>> Importance: High
>>>
>>> I had that very same problem when I tried to package the Tapernate
>>> auto-wiring stuff in a drop-in jar. It said that one of the parameters
>>>       
>> of
>>     
>>> the Shell component has already been claimed by a different enhancement
>>> worker.
>>>
>>> When I just put the service definition and configuration contribution
>>>       
>> into
>>     
>>> my application's "root" module descriptor everything works fine.
>>>
>>>
>>>       
>>>> --- Ursprüngliche Nachricht ---
>>>> Von: Tat leung <ta...@comcast.net>
>>>> An: Tapestry users <us...@tapestry.apache.org>
>>>> Betreff: Tapernate-Example HiveMindAutowireWorker Problem
>>>> Datum: Sun, 07 May 2006 12:52:15 -0700
>>>>
>>>> Hi All,
>>>>
>>>> I am using Tapernate and HiveMindAutowireWorker and 
>>>> HiveMindAutowireWorkerFactory from the Tapernate example in my 
>>>> applicaiton.  The XML in my hivemind.xml file and the auto-wire
>>>>         
>> classes 
>>     
>>>> are taken from the Tapernate example:
>>>>
>>>>     <service-point id="AutowireWorkerFactory"
>>>>            
>>>>         
>> interface="org.apache.hivemind.ServiceImplementationFactory"
>>     
>>>>             parameters-occurs="none">
>>>>         <invoke-factory>
>>>>             <construct 
>>>> class="org.apache.tapestry.enhance.HiveMindAutowireWorkerFactory" />
>>>>         </invoke-factory>
>>>>     </service-point>
>>>>
>>>>     <service-point id="AutowireWorker" 
>>>> interface="org.apache.tapestry.enhance.EnhancementWorker">
>>>>         <invoke-factory service-id="AutowireWorkerFactory" />
>>>>     </service-point>
>>>>
>>>>     <contribution
>>>>         
>>> configuration-id="tapestry.enhance.EnhancementWorkers">
>>>       
>>>>         <command before="tapestry.enhance.abstract-property"
>>>>             after="tapestry.enhance.dispatch-inject"
>>>>             id="inject-autowire" object="service:AutowireWorker" />
>>>>     </contribution>
>>>>
>>>> This is working as expected when there is no exception.  But when the 
>>>> application throws any exception, it is causing the following
>>>>         
>> exception 
>>     
>>>> in the log file.  Has anyone encounter this problem?
>>>>
>>>> Thanks!
>>>> Tat
>>>>
>>>> org.apache.hivemind.ApplicationRuntimeException: Property delegate has
>>>> already been claimed by a different enhancement worker.
>>>>     at 
>>>>
>>>>         
> org.apache.tapestry.enhance.EnhancementOperationImpl.claimProperty(Enhanceme
>   
>>> ntOperationImpl.java:241)
>>>       
>>>>     at 
>>>>
>>>>         
> org.apache.tapestry.enhance.ParameterPropertyWorker.addParameter(ParameterPr
>   
>>> opertyWorker.java:117)
>>>       
>>>>     at 
>>>>
>>>>         
> org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
>   
>>> eterPropertyWorker.java:81)
>>>       
>>>>     at 
>>>>
>>>>         
> org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
>   
>>> eterPropertyWorker.java:53)
>>>       
>>>>     at 
>>>>
>>>>         
> $EnhancementWorker_10b103b1964.performEnhancement($EnhancementWorker_10b103b
>   
>>> 1964.java)
>>>       
>>>>     at 
>>>>
>>>>         
> $EnhancementWorker_10b103b197c.performEnhancement($EnhancementWorker_10b103b
>   
>>> 197c.java)
>>>       
>>>>     at 
>>>>
>>>>         
> $EnhancementWorker_10b103b195a.performEnhancement($EnhancementWorker_10b103b
>   
>>> 195a.java)
>>>       
>>>>     at 
>>>>
>>>>         
> org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getCompone
>   
>>> ntConstructor(ComponentConstructorFactoryImpl.java:97)
>>>       
>>>>     at 
>>>>
>>>>         
> $ComponentConstructorFactory_10b103b1947.getComponentConstructor($ComponentC
>   
>>> onstructorFactory_10b103b1947.java)
>>>       
>>>>     at 
>>>>
>>>>         
> org.apache.tapestry.pageload.PageLoader.instantiateComponent(PageLoader.java
>   
>>> :531)
>>>       
>>>>     at 
>>>>
>>>>         
> org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.j
>   
>>> ava:481)
>>>       
>>>>     at 
>>>>
>>>>         
> $IPageLoader_10b103b1937.createImplicitComponent($IPageLoader_10b103b1937.ja
>   
>>> va)
>>>       
>>>>     at 
>>>>
>>>>         
> $IPageLoader_10b103b1938.createImplicitComponent($IPageLoader_10b103b1938.ja
>   
>>> va)
>>>       
>>>>     at 
>>>>
>>>>         
> org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.createImplici
>   
>>> tComponent(ComponentTemplateLoaderLogic.java:218)
>>>       
>>>>     at 
>>>>
>>>>         
> org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
>   
>>> nentTemplateLoaderLogic.java:172)
>>>       
>>>>     at 
>>>>
>>>>         
> org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
>   
>>> nentTemplateLoaderLogic.java:111)
>>>       
>>>>     at 
>>>>
>>>>         
> org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.loadTemplate(
>   
>>> ComponentTemplateLoaderLogic.java:88)
>>>       
>>>>     at 
>>>>
>>>>         
> org.apache.tapestry.services.impl.ComponentTemplateLoaderImpl.loadTemplate(C
>   
>>> omponentTemplateLoaderImpl.java:60)
>>>       
>>>>     at 
>>>>
>>>>         
> $ComponentTemplateLoader_10b103b194b.loadTemplate($ComponentTemplateLoader_1
>   
>>> 0b103b194b.java)
>>>       
>>>>     at 
>>>>
>>>>         
> org.apache.tapestry.pageload.PageLoader.loadTemplateForComponent(PageLoader.
>   
>>> java:648)
>>>       
>>>>     at
>>>> org.apache.tapestry.BaseComponent.readTemplate(BaseComponent.java:77)
>>>>     at
>>>> org.apache.tapestry.BaseComponent.finishLoad(BaseComponent.java:107)
>>>>     at $Exception_7.finishLoad($Exception_7.java)
>>>>     at 
>>>>
>>>>         
> org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:4
>   
>>> 39)
>>>       
>>>>     at
>>>> org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:613)
>>>>     at
>>>>         
>> $IPageLoader_10b103b1937.loadPage($IPageLoader_10b103b1937.java)
>>     
>>>>     at
>>>>         
>> $IPageLoader_10b103b1938.loadPage($IPageLoader_10b103b1938.java)
>>     
>>>>     at
>>>> org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:120)
>>>>     at $IPageSource_10b103b1897.getPage($IPageSource_10b103b1897.java)
>>>>     at 
>>>>
>>>>         
>> org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:268)
>>     
>>>>     at 
>>>> org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:251)
>>>>     at 
>>>>
>>>>         
> org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionP
>   
>>> resenterImpl.java:40)
>>>       
>>>>     at 
>>>>
>>>>         
> $ExceptionPresenter_10b103b18a3.presentException($ExceptionPresenter_10b103b
>   
>>> 18a3.java)
>>>       
>>>>     at 
>>>>
>>>>         
> org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngi
>   
>>> ne.java:121)
>>>       
>>>>     at 
>>>>
>>>>         
>> org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:280)
>>     
>>>>     at 
>>>>
>>>>         
> org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngin
>   
>>> eTerminator.java:60)
>>>       
>>>>     at 
>>>>
>>>>         
> $WebRequestServicer_10b103b1907.service($WebRequestServicer_10b103b1907.java
>   
>>> )
>>>       
>>>>     at 
>>>>
>>>>         
> $WebRequestServicer_10b103b1903.service($WebRequestServicer_10b103b1903.java
>   
>>> )
>>>       
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>         
>>> -- 
>>> "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
>>> Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>       
>> -- 
>> GMX Produkte empfehlen und ganz einfach Geld verdienen!
>> Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>     
>
>   


RE: Tapernate-Example HiveMindAutowireWorker Problem

Posted by James Carman <ja...@carmanconsulting.com>.
Autowiring is a feature of HiveMind.  HiveMind will autowire your
constructor params and properties if it can.

-----Original Message-----
From: Tat leung [mailto:tatleung@comcast.net] 
Sent: Friday, May 12, 2006 8:55 PM
To: Tapestry users
Subject: Re: Tapernate-Example HiveMindAutowireWorker Problem

I am just wondering.  Should the autowiring be part of HiveMind?  It 
seems very useful feature for case where Tapestry is no there (not that 
anyone should).

James Carman wrote:
> It's already integrated into Tapestry 4.1 (due out soon).  So, everyone
can
> enjoy auto-wiring!
>
>
> -----Original Message-----
> From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
> Sent: Friday, May 12, 2006 7:46 AM
> To: Tapestry users
> Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem
>
> My answer might be a little late in coming but I thought I'd let you know
> that the fix changed my problem as well!
>
> Thanks! The autowire-worker sure is *very* useful because it reduces xml
> clutter, which in my book is a good thing.
>
> It would probably make sense to move it into a seperate project, like HLS
> did for the flash-property strategy for example. That way everyone who
wants
> to use it can just download the drop-in jar.
>
>   
>> --- Ursprüngliche Nachricht ---
>> Von: "James Carman" <ja...@carmanconsulting.com>
>> An: "'Tapestry users'" <us...@tapestry.apache.org>
>> Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem
>> Datum: Tue, 9 May 2006 20:13:50 -0400
>>
>> Oh, sorry.  I committed a change to my tapernate-example application
which
>> implements this change.  For those of you who were encountering this
>> problem, can you download it and try out the changes?  Thanks!
>>
>>
>> -----Original Message-----
>> From: James Carman [mailto:james@carmanconsulting.com] 
>> Sent: Monday, May 08, 2006 9:31 PM
>> To: 'Tapestry users'
>> Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem
>>
>> Well, I could specify *all* of the workers that I want my auto-wire
worker
>> to follow by using a comma-separated list.  That might do the trick!
>>
>> -----Original Message-----
>> From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
>> Sent: Monday, May 08, 2006 6:04 PM
>> To: Tapestry users
>> Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem
>> Importance: High
>>
>> The way I see it, it definitely IS the ordering: 
>>
>> When you contribute the autowirer with
>> before="tapestry.enhance.abstract-property" and
>> after="tapestry.enhance.dispatch-inject" parameters you don't guarantee
>> that
>> the parameter-worker already performed it's work, because it is not part
>> of
>> those services which make up dispatch-inject.
>>
>> The ordering of the enhancement workers is unspecified and relies on the
>> underlying Hivemind Order object, which in turn is backed by a HashMap.
So
>> I
>> guess if you add one or several enhancement workers to your chain you
will
>> get the same problem sooner or later (as soon as the HashMap fucks up the
>> ordering for you and the parameter-worker runs before your
>> autowire-worker).
>>
>> However, I'd really love to see a working autowiring function like that.
>> If
>> it goes into the tapestry core it could be combined into the
>> abstract-property-worker, which would solve the ordering problem but
raise
>> other questions instead (like seperation of concerns).
>>
>>
>>     
>>> --- Ursprüngliche Nachricht ---
>>> Von: "James Carman" <ja...@carmanconsulting.com>
>>> An: "'Tapestry users'" <us...@tapestry.apache.org>
>>> Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem
>>> Datum: Mon, 8 May 2006 10:57:05 -0400
>>>
>>> I thought the ordering was getting screwed up too.  But, I added
>>> LoggingInterceptor to the ParameterPropertyWorker and my auto-wire
>>>       
>> worker
>>     
>>> and the parameter one seems to be running first.  If the parameter
>>>       
>> worker
>>     
>>> runs first, this problem should not occur, since the property would have
>>> already been claimed and my worker would just bypass it.  I
>>>       
>> intentionally
>>     
>>> put my worker after all that stuff, so I wouldn't step on anyone's toes.
>>> I
>>> wonder if there's some special case that's getting the ordering screwed
>>> up? 
>>>
>>> -----Original Message-----
>>> From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
>>> Sent: Monday, May 08, 2006 6:31 AM
>>> To: Tapestry users
>>> Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem
>>> Importance: High
>>>
>>> Yup, that's what I am saying.
>>>
>>> Looks like it's wiring component parameters as well:
>>>
>>> 5705 HiveMindAutowireWorker:performEnhancement [DEBUG] Creating
>>>       
>> auto-wired
>>     
>>> accessor for property delegate on component
>>> classpath:/org/apache/tapestry/html/Shell.jwc, line 22, column 96
>>> 5856 HiveMindAutowireWorker:performEnhancement [DEBUG] Creating
>>>       
>> auto-wired
>>     
>>> accessor for property delegate on component
>>> classpath:/org/apache/tapestry/html/Shell.jwc, line 22, column 96
>>>
>>> With the result of getting this error:
>>>
>>> Error at classpath:/org/apache/tapestry/html/Shell.jwc, line 78, column
>>> 20:
>>> Error adding property delegate to class org.apache.tapestry.html.Shell:
>>> Property delegate has already been claimed by a different enhancement
>>> worker.
>>>
>>>
>>> So my uneducated guess is that somewhere in the depths of tapestry there
>>> might be a service which implements IValidationDelegate and it's gets
>>> wired
>>> to the component parameter. Looks like the order gets somehow fucked-up,
>>> because at the point at which the autowire stuff comes in all parameter
>>> properties should have already been claimed.  So it probably has to do
>>> with
>>> the configuration contribution taking place in the seperate module
>>> descriptor within my drop-in jar.
>>>
>>>
>>>       
>>>> --- Ursprüngliche Nachricht ---
>>>> Von: "James Carman" <ja...@carmanconsulting.com>
>>>> An: "'Tapestry users'" <us...@tapestry.apache.org>
>>>> Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem
>>>> Datum: Sun, 7 May 2006 18:25:17 -0400
>>>>
>>>> Hmmmm.  That's weird.  But, thanks for the tip.  I've submitted the
>>>>         
>> code
>>     
>>>> as
>>>> a patch to Tapestry.  So, I need to figure out how to get it working. 
>>>>         
>>> So,
>>>       
>>>> what you're saying is that if the auto-wiring stuff is inside a jar
>>>>         
>> file
>>     
>>>> and
>>>> not part of your application's hivemodule.xml file, then it bombs?
>>>>
>>>> -----Original Message-----
>>>> From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
>>>> Sent: Sunday, May 07, 2006 5:21 PM
>>>> To: Tapestry users
>>>> Subject: Re: Tapernate-Example HiveMindAutowireWorker Problem
>>>> Importance: High
>>>>
>>>> I had that very same problem when I tried to package the Tapernate
>>>> auto-wiring stuff in a drop-in jar. It said that one of the parameters
>>>>         
>>> of
>>>       
>>>> the Shell component has already been claimed by a different
>>>>         
>> enhancement
>>     
>>>> worker.
>>>>
>>>> When I just put the service definition and configuration contribution
>>>>         
>>> into
>>>       
>>>> my application's "root" module descriptor everything works fine.
>>>>
>>>>
>>>>         
>>>>> --- Ursprüngliche Nachricht ---
>>>>> Von: Tat leung <ta...@comcast.net>
>>>>> An: Tapestry users <us...@tapestry.apache.org>
>>>>> Betreff: Tapernate-Example HiveMindAutowireWorker Problem
>>>>> Datum: Sun, 07 May 2006 12:52:15 -0700
>>>>>
>>>>> Hi All,
>>>>>
>>>>> I am using Tapernate and HiveMindAutowireWorker and 
>>>>> HiveMindAutowireWorkerFactory from the Tapernate example in my 
>>>>> applicaiton.  The XML in my hivemind.xml file and the auto-wire
>>>>>           
>>> classes 
>>>       
>>>>> are taken from the Tapernate example:
>>>>>
>>>>>     <service-point id="AutowireWorkerFactory"
>>>>>            
>>>>>           
>>> interface="org.apache.hivemind.ServiceImplementationFactory"
>>>       
>>>>>             parameters-occurs="none">
>>>>>         <invoke-factory>
>>>>>             <construct 
>>>>> class="org.apache.tapestry.enhance.HiveMindAutowireWorkerFactory" />
>>>>>         </invoke-factory>
>>>>>     </service-point>
>>>>>
>>>>>     <service-point id="AutowireWorker" 
>>>>> interface="org.apache.tapestry.enhance.EnhancementWorker">
>>>>>         <invoke-factory service-id="AutowireWorkerFactory" />
>>>>>     </service-point>
>>>>>
>>>>>     <contribution
>>>>>           
>>>> configuration-id="tapestry.enhance.EnhancementWorkers">
>>>>         
>>>>>         <command before="tapestry.enhance.abstract-property"
>>>>>             after="tapestry.enhance.dispatch-inject"
>>>>>             id="inject-autowire" object="service:AutowireWorker" />
>>>>>     </contribution>
>>>>>
>>>>> This is working as expected when there is no exception.  But when
>>>>>           
>> the 
>>     
>>>>> application throws any exception, it is causing the following
>>>>>           
>>> exception 
>>>       
>>>>> in the log file.  Has anyone encounter this problem?
>>>>>
>>>>> Thanks!
>>>>> Tat
>>>>>
>>>>> org.apache.hivemind.ApplicationRuntimeException: Property delegate
>>>>>           
>> has
>>     
>>>>> already been claimed by a different enhancement worker.
>>>>>     at 
>>>>>
>>>>>           
>
org.apache.tapestry.enhance.EnhancementOperationImpl.claimProperty(Enhanceme
>   
>>>> ntOperationImpl.java:241)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
>
org.apache.tapestry.enhance.ParameterPropertyWorker.addParameter(ParameterPr
>   
>>>> opertyWorker.java:117)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
>
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
>   
>>>> eterPropertyWorker.java:81)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
>
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
>   
>>>> eterPropertyWorker.java:53)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
>
$EnhancementWorker_10b103b1964.performEnhancement($EnhancementWorker_10b103b
>   
>>>> 1964.java)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
>
$EnhancementWorker_10b103b197c.performEnhancement($EnhancementWorker_10b103b
>   
>>>> 197c.java)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
>
$EnhancementWorker_10b103b195a.performEnhancement($EnhancementWorker_10b103b
>   
>>>> 195a.java)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
>
org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getCompone
>   
>>>> ntConstructor(ComponentConstructorFactoryImpl.java:97)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
>
$ComponentConstructorFactory_10b103b1947.getComponentConstructor($ComponentC
>   
>>>> onstructorFactory_10b103b1947.java)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
>
org.apache.tapestry.pageload.PageLoader.instantiateComponent(PageLoader.java
>   
>>>> :531)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
>
org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.j
>   
>>>> ava:481)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
>
$IPageLoader_10b103b1937.createImplicitComponent($IPageLoader_10b103b1937.ja
>   
>>>> va)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
>
$IPageLoader_10b103b1938.createImplicitComponent($IPageLoader_10b103b1938.ja
>   
>>>> va)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.createImplici
>   
>>>> tComponent(ComponentTemplateLoaderLogic.java:218)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
>   
>>>> nentTemplateLoaderLogic.java:172)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
>   
>>>> nentTemplateLoaderLogic.java:111)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.loadTemplate(
>   
>>>> ComponentTemplateLoaderLogic.java:88)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderImpl.loadTemplate(C
>   
>>>> omponentTemplateLoaderImpl.java:60)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
>
$ComponentTemplateLoader_10b103b194b.loadTemplate($ComponentTemplateLoader_1
>   
>>>> 0b103b194b.java)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
>
org.apache.tapestry.pageload.PageLoader.loadTemplateForComponent(PageLoader.
>   
>>>> java:648)
>>>>         
>>>>>     at
>>>>>
>>>>>           
>> org.apache.tapestry.BaseComponent.readTemplate(BaseComponent.java:77)
>>     
>>>>>     at
>>>>> org.apache.tapestry.BaseComponent.finishLoad(BaseComponent.java:107)
>>>>>     at $Exception_7.finishLoad($Exception_7.java)
>>>>>     at 
>>>>>
>>>>>           
>
org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:4
>   
>>>> 39)
>>>>         
>>>>>     at
>>>>>
>>>>>           
>> org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:613)
>>     
>>>>>     at
>>>>>           
>>> $IPageLoader_10b103b1937.loadPage($IPageLoader_10b103b1937.java)
>>>       
>>>>>     at
>>>>>           
>>> $IPageLoader_10b103b1938.loadPage($IPageLoader_10b103b1938.java)
>>>       
>>>>>     at
>>>>> org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:120)
>>>>>     at
>>>>>           
>> $IPageSource_10b103b1897.getPage($IPageSource_10b103b1897.java)
>>     
>>>>>     at 
>>>>>
>>>>>           
>>> org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:268)
>>>       
>>>>>     at 
>>>>>
>>>>>           
>> org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:251)
>>     
>>>>>     at 
>>>>>
>>>>>           
>
org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionP
>   
>>>> resenterImpl.java:40)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
>
$ExceptionPresenter_10b103b18a3.presentException($ExceptionPresenter_10b103b
>   
>>>> 18a3.java)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
>
org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngi
>   
>>>> ne.java:121)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
>>
org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:280)
>>     
>>>>>     at 
>>>>>
>>>>>           
>
org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngin
>   
>>>> eTerminator.java:60)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
>
$WebRequestServicer_10b103b1907.service($WebRequestServicer_10b103b1907.java
>   
>>>> )
>>>>         
>>>>>     at 
>>>>>
>>>>>           
>
$WebRequestServicer_10b103b1903.service($WebRequestServicer_10b103b1903.java
>   
>>>> )
>>>>         
>>>>>
>>>>>           
>> ---------------------------------------------------------------------
>>     
>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>
>>>>>           
>>>> -- 
>>>> "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
>>>> Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>         
>>> -- 
>>> GMX Produkte empfehlen und ganz einfach Geld verdienen!
>>> Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>       
>> -- 
>> Echte DSL-Flatrate dauerhaft für 0,- Euro*!
>> "Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>     
>
>   




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


Re: Tapernate-Example HiveMindAutowireWorker Problem

Posted by Tat leung <ta...@comcast.net>.
I am just wondering.  Should the autowiring be part of HiveMind?  It 
seems very useful feature for case where Tapestry is no there (not that 
anyone should).

James Carman wrote:
> It's already integrated into Tapestry 4.1 (due out soon).  So, everyone can
> enjoy auto-wiring!
>
>
> -----Original Message-----
> From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
> Sent: Friday, May 12, 2006 7:46 AM
> To: Tapestry users
> Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem
>
> My answer might be a little late in coming but I thought I'd let you know
> that the fix changed my problem as well!
>
> Thanks! The autowire-worker sure is *very* useful because it reduces xml
> clutter, which in my book is a good thing.
>
> It would probably make sense to move it into a seperate project, like HLS
> did for the flash-property strategy for example. That way everyone who wants
> to use it can just download the drop-in jar.
>
>   
>> --- Ursprüngliche Nachricht ---
>> Von: "James Carman" <ja...@carmanconsulting.com>
>> An: "'Tapestry users'" <us...@tapestry.apache.org>
>> Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem
>> Datum: Tue, 9 May 2006 20:13:50 -0400
>>
>> Oh, sorry.  I committed a change to my tapernate-example application which
>> implements this change.  For those of you who were encountering this
>> problem, can you download it and try out the changes?  Thanks!
>>
>>
>> -----Original Message-----
>> From: James Carman [mailto:james@carmanconsulting.com] 
>> Sent: Monday, May 08, 2006 9:31 PM
>> To: 'Tapestry users'
>> Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem
>>
>> Well, I could specify *all* of the workers that I want my auto-wire worker
>> to follow by using a comma-separated list.  That might do the trick!
>>
>> -----Original Message-----
>> From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
>> Sent: Monday, May 08, 2006 6:04 PM
>> To: Tapestry users
>> Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem
>> Importance: High
>>
>> The way I see it, it definitely IS the ordering: 
>>
>> When you contribute the autowirer with
>> before="tapestry.enhance.abstract-property" and
>> after="tapestry.enhance.dispatch-inject" parameters you don't guarantee
>> that
>> the parameter-worker already performed it's work, because it is not part
>> of
>> those services which make up dispatch-inject.
>>
>> The ordering of the enhancement workers is unspecified and relies on the
>> underlying Hivemind Order object, which in turn is backed by a HashMap. So
>> I
>> guess if you add one or several enhancement workers to your chain you will
>> get the same problem sooner or later (as soon as the HashMap fucks up the
>> ordering for you and the parameter-worker runs before your
>> autowire-worker).
>>
>> However, I'd really love to see a working autowiring function like that.
>> If
>> it goes into the tapestry core it could be combined into the
>> abstract-property-worker, which would solve the ordering problem but raise
>> other questions instead (like seperation of concerns).
>>
>>
>>     
>>> --- Ursprüngliche Nachricht ---
>>> Von: "James Carman" <ja...@carmanconsulting.com>
>>> An: "'Tapestry users'" <us...@tapestry.apache.org>
>>> Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem
>>> Datum: Mon, 8 May 2006 10:57:05 -0400
>>>
>>> I thought the ordering was getting screwed up too.  But, I added
>>> LoggingInterceptor to the ParameterPropertyWorker and my auto-wire
>>>       
>> worker
>>     
>>> and the parameter one seems to be running first.  If the parameter
>>>       
>> worker
>>     
>>> runs first, this problem should not occur, since the property would have
>>> already been claimed and my worker would just bypass it.  I
>>>       
>> intentionally
>>     
>>> put my worker after all that stuff, so I wouldn't step on anyone's toes.
>>> I
>>> wonder if there's some special case that's getting the ordering screwed
>>> up? 
>>>
>>> -----Original Message-----
>>> From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
>>> Sent: Monday, May 08, 2006 6:31 AM
>>> To: Tapestry users
>>> Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem
>>> Importance: High
>>>
>>> Yup, that's what I am saying.
>>>
>>> Looks like it's wiring component parameters as well:
>>>
>>> 5705 HiveMindAutowireWorker:performEnhancement [DEBUG] Creating
>>>       
>> auto-wired
>>     
>>> accessor for property delegate on component
>>> classpath:/org/apache/tapestry/html/Shell.jwc, line 22, column 96
>>> 5856 HiveMindAutowireWorker:performEnhancement [DEBUG] Creating
>>>       
>> auto-wired
>>     
>>> accessor for property delegate on component
>>> classpath:/org/apache/tapestry/html/Shell.jwc, line 22, column 96
>>>
>>> With the result of getting this error:
>>>
>>> Error at classpath:/org/apache/tapestry/html/Shell.jwc, line 78, column
>>> 20:
>>> Error adding property delegate to class org.apache.tapestry.html.Shell:
>>> Property delegate has already been claimed by a different enhancement
>>> worker.
>>>
>>>
>>> So my uneducated guess is that somewhere in the depths of tapestry there
>>> might be a service which implements IValidationDelegate and it's gets
>>> wired
>>> to the component parameter. Looks like the order gets somehow fucked-up,
>>> because at the point at which the autowire stuff comes in all parameter
>>> properties should have already been claimed.  So it probably has to do
>>> with
>>> the configuration contribution taking place in the seperate module
>>> descriptor within my drop-in jar.
>>>
>>>
>>>       
>>>> --- Ursprüngliche Nachricht ---
>>>> Von: "James Carman" <ja...@carmanconsulting.com>
>>>> An: "'Tapestry users'" <us...@tapestry.apache.org>
>>>> Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem
>>>> Datum: Sun, 7 May 2006 18:25:17 -0400
>>>>
>>>> Hmmmm.  That's weird.  But, thanks for the tip.  I've submitted the
>>>>         
>> code
>>     
>>>> as
>>>> a patch to Tapestry.  So, I need to figure out how to get it working. 
>>>>         
>>> So,
>>>       
>>>> what you're saying is that if the auto-wiring stuff is inside a jar
>>>>         
>> file
>>     
>>>> and
>>>> not part of your application's hivemodule.xml file, then it bombs?
>>>>
>>>> -----Original Message-----
>>>> From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
>>>> Sent: Sunday, May 07, 2006 5:21 PM
>>>> To: Tapestry users
>>>> Subject: Re: Tapernate-Example HiveMindAutowireWorker Problem
>>>> Importance: High
>>>>
>>>> I had that very same problem when I tried to package the Tapernate
>>>> auto-wiring stuff in a drop-in jar. It said that one of the parameters
>>>>         
>>> of
>>>       
>>>> the Shell component has already been claimed by a different
>>>>         
>> enhancement
>>     
>>>> worker.
>>>>
>>>> When I just put the service definition and configuration contribution
>>>>         
>>> into
>>>       
>>>> my application's "root" module descriptor everything works fine.
>>>>
>>>>
>>>>         
>>>>> --- Ursprüngliche Nachricht ---
>>>>> Von: Tat leung <ta...@comcast.net>
>>>>> An: Tapestry users <us...@tapestry.apache.org>
>>>>> Betreff: Tapernate-Example HiveMindAutowireWorker Problem
>>>>> Datum: Sun, 07 May 2006 12:52:15 -0700
>>>>>
>>>>> Hi All,
>>>>>
>>>>> I am using Tapernate and HiveMindAutowireWorker and 
>>>>> HiveMindAutowireWorkerFactory from the Tapernate example in my 
>>>>> applicaiton.  The XML in my hivemind.xml file and the auto-wire
>>>>>           
>>> classes 
>>>       
>>>>> are taken from the Tapernate example:
>>>>>
>>>>>     <service-point id="AutowireWorkerFactory"
>>>>>            
>>>>>           
>>> interface="org.apache.hivemind.ServiceImplementationFactory"
>>>       
>>>>>             parameters-occurs="none">
>>>>>         <invoke-factory>
>>>>>             <construct 
>>>>> class="org.apache.tapestry.enhance.HiveMindAutowireWorkerFactory" />
>>>>>         </invoke-factory>
>>>>>     </service-point>
>>>>>
>>>>>     <service-point id="AutowireWorker" 
>>>>> interface="org.apache.tapestry.enhance.EnhancementWorker">
>>>>>         <invoke-factory service-id="AutowireWorkerFactory" />
>>>>>     </service-point>
>>>>>
>>>>>     <contribution
>>>>>           
>>>> configuration-id="tapestry.enhance.EnhancementWorkers">
>>>>         
>>>>>         <command before="tapestry.enhance.abstract-property"
>>>>>             after="tapestry.enhance.dispatch-inject"
>>>>>             id="inject-autowire" object="service:AutowireWorker" />
>>>>>     </contribution>
>>>>>
>>>>> This is working as expected when there is no exception.  But when
>>>>>           
>> the 
>>     
>>>>> application throws any exception, it is causing the following
>>>>>           
>>> exception 
>>>       
>>>>> in the log file.  Has anyone encounter this problem?
>>>>>
>>>>> Thanks!
>>>>> Tat
>>>>>
>>>>> org.apache.hivemind.ApplicationRuntimeException: Property delegate
>>>>>           
>> has
>>     
>>>>> already been claimed by a different enhancement worker.
>>>>>     at 
>>>>>
>>>>>           
> org.apache.tapestry.enhance.EnhancementOperationImpl.claimProperty(Enhanceme
>   
>>>> ntOperationImpl.java:241)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
> org.apache.tapestry.enhance.ParameterPropertyWorker.addParameter(ParameterPr
>   
>>>> opertyWorker.java:117)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
> org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
>   
>>>> eterPropertyWorker.java:81)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
> org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
>   
>>>> eterPropertyWorker.java:53)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
> $EnhancementWorker_10b103b1964.performEnhancement($EnhancementWorker_10b103b
>   
>>>> 1964.java)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
> $EnhancementWorker_10b103b197c.performEnhancement($EnhancementWorker_10b103b
>   
>>>> 197c.java)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
> $EnhancementWorker_10b103b195a.performEnhancement($EnhancementWorker_10b103b
>   
>>>> 195a.java)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
> org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getCompone
>   
>>>> ntConstructor(ComponentConstructorFactoryImpl.java:97)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
> $ComponentConstructorFactory_10b103b1947.getComponentConstructor($ComponentC
>   
>>>> onstructorFactory_10b103b1947.java)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
> org.apache.tapestry.pageload.PageLoader.instantiateComponent(PageLoader.java
>   
>>>> :531)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
> org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.j
>   
>>>> ava:481)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
> $IPageLoader_10b103b1937.createImplicitComponent($IPageLoader_10b103b1937.ja
>   
>>>> va)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
> $IPageLoader_10b103b1938.createImplicitComponent($IPageLoader_10b103b1938.ja
>   
>>>> va)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
> org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.createImplici
>   
>>>> tComponent(ComponentTemplateLoaderLogic.java:218)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
> org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
>   
>>>> nentTemplateLoaderLogic.java:172)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
> org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
>   
>>>> nentTemplateLoaderLogic.java:111)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
> org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.loadTemplate(
>   
>>>> ComponentTemplateLoaderLogic.java:88)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
> org.apache.tapestry.services.impl.ComponentTemplateLoaderImpl.loadTemplate(C
>   
>>>> omponentTemplateLoaderImpl.java:60)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
> $ComponentTemplateLoader_10b103b194b.loadTemplate($ComponentTemplateLoader_1
>   
>>>> 0b103b194b.java)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
> org.apache.tapestry.pageload.PageLoader.loadTemplateForComponent(PageLoader.
>   
>>>> java:648)
>>>>         
>>>>>     at
>>>>>
>>>>>           
>> org.apache.tapestry.BaseComponent.readTemplate(BaseComponent.java:77)
>>     
>>>>>     at
>>>>> org.apache.tapestry.BaseComponent.finishLoad(BaseComponent.java:107)
>>>>>     at $Exception_7.finishLoad($Exception_7.java)
>>>>>     at 
>>>>>
>>>>>           
> org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:4
>   
>>>> 39)
>>>>         
>>>>>     at
>>>>>
>>>>>           
>> org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:613)
>>     
>>>>>     at
>>>>>           
>>> $IPageLoader_10b103b1937.loadPage($IPageLoader_10b103b1937.java)
>>>       
>>>>>     at
>>>>>           
>>> $IPageLoader_10b103b1938.loadPage($IPageLoader_10b103b1938.java)
>>>       
>>>>>     at
>>>>> org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:120)
>>>>>     at
>>>>>           
>> $IPageSource_10b103b1897.getPage($IPageSource_10b103b1897.java)
>>     
>>>>>     at 
>>>>>
>>>>>           
>>> org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:268)
>>>       
>>>>>     at 
>>>>>
>>>>>           
>> org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:251)
>>     
>>>>>     at 
>>>>>
>>>>>           
> org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionP
>   
>>>> resenterImpl.java:40)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
> $ExceptionPresenter_10b103b18a3.presentException($ExceptionPresenter_10b103b
>   
>>>> 18a3.java)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
> org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngi
>   
>>>> ne.java:121)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
>> org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:280)
>>     
>>>>>     at 
>>>>>
>>>>>           
> org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngin
>   
>>>> eTerminator.java:60)
>>>>         
>>>>>     at 
>>>>>
>>>>>           
> $WebRequestServicer_10b103b1907.service($WebRequestServicer_10b103b1907.java
>   
>>>> )
>>>>         
>>>>>     at 
>>>>>
>>>>>           
> $WebRequestServicer_10b103b1903.service($WebRequestServicer_10b103b1903.java
>   
>>>> )
>>>>         
>>>>>
>>>>>           
>> ---------------------------------------------------------------------
>>     
>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>
>>>>>           
>>>> -- 
>>>> "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
>>>> Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>         
>>> -- 
>>> GMX Produkte empfehlen und ganz einfach Geld verdienen!
>>> Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>       
>> -- 
>> Echte DSL-Flatrate dauerhaft für 0,- Euro*!
>> "Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>     
>
>   


RE: Tapernate-Example HiveMindAutowireWorker Problem

Posted by James Carman <ja...@carmanconsulting.com>.
It's already integrated into Tapestry 4.1 (due out soon).  So, everyone can
enjoy auto-wiring!


-----Original Message-----
From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
Sent: Friday, May 12, 2006 7:46 AM
To: Tapestry users
Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem

My answer might be a little late in coming but I thought I'd let you know
that the fix changed my problem as well!

Thanks! The autowire-worker sure is *very* useful because it reduces xml
clutter, which in my book is a good thing.

It would probably make sense to move it into a seperate project, like HLS
did for the flash-property strategy for example. That way everyone who wants
to use it can just download the drop-in jar.

> --- Ursprüngliche Nachricht ---
> Von: "James Carman" <ja...@carmanconsulting.com>
> An: "'Tapestry users'" <us...@tapestry.apache.org>
> Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem
> Datum: Tue, 9 May 2006 20:13:50 -0400
> 
> Oh, sorry.  I committed a change to my tapernate-example application which
> implements this change.  For those of you who were encountering this
> problem, can you download it and try out the changes?  Thanks!
> 
> 
> -----Original Message-----
> From: James Carman [mailto:james@carmanconsulting.com] 
> Sent: Monday, May 08, 2006 9:31 PM
> To: 'Tapestry users'
> Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem
> 
> Well, I could specify *all* of the workers that I want my auto-wire worker
> to follow by using a comma-separated list.  That might do the trick!
> 
> -----Original Message-----
> From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
> Sent: Monday, May 08, 2006 6:04 PM
> To: Tapestry users
> Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem
> Importance: High
> 
> The way I see it, it definitely IS the ordering: 
> 
> When you contribute the autowirer with
> before="tapestry.enhance.abstract-property" and
> after="tapestry.enhance.dispatch-inject" parameters you don't guarantee
> that
> the parameter-worker already performed it's work, because it is not part
> of
> those services which make up dispatch-inject.
> 
> The ordering of the enhancement workers is unspecified and relies on the
> underlying Hivemind Order object, which in turn is backed by a HashMap. So
> I
> guess if you add one or several enhancement workers to your chain you will
> get the same problem sooner or later (as soon as the HashMap fucks up the
> ordering for you and the parameter-worker runs before your
> autowire-worker).
> 
> However, I'd really love to see a working autowiring function like that.
> If
> it goes into the tapestry core it could be combined into the
> abstract-property-worker, which would solve the ordering problem but raise
> other questions instead (like seperation of concerns).
> 
> 
> > --- Ursprüngliche Nachricht ---
> > Von: "James Carman" <ja...@carmanconsulting.com>
> > An: "'Tapestry users'" <us...@tapestry.apache.org>
> > Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem
> > Datum: Mon, 8 May 2006 10:57:05 -0400
> > 
> > I thought the ordering was getting screwed up too.  But, I added
> > LoggingInterceptor to the ParameterPropertyWorker and my auto-wire
> worker
> > and the parameter one seems to be running first.  If the parameter
> worker
> > runs first, this problem should not occur, since the property would have
> > already been claimed and my worker would just bypass it.  I
> intentionally
> > put my worker after all that stuff, so I wouldn't step on anyone's toes.
> > I
> > wonder if there's some special case that's getting the ordering screwed
> > up? 
> > 
> > -----Original Message-----
> > From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
> > Sent: Monday, May 08, 2006 6:31 AM
> > To: Tapestry users
> > Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem
> > Importance: High
> > 
> > Yup, that's what I am saying.
> > 
> > Looks like it's wiring component parameters as well:
> > 
> > 5705 HiveMindAutowireWorker:performEnhancement [DEBUG] Creating
> auto-wired
> > accessor for property delegate on component
> > classpath:/org/apache/tapestry/html/Shell.jwc, line 22, column 96
> > 5856 HiveMindAutowireWorker:performEnhancement [DEBUG] Creating
> auto-wired
> > accessor for property delegate on component
> > classpath:/org/apache/tapestry/html/Shell.jwc, line 22, column 96
> > 
> > With the result of getting this error:
> > 
> > Error at classpath:/org/apache/tapestry/html/Shell.jwc, line 78, column
> > 20:
> > Error adding property delegate to class org.apache.tapestry.html.Shell:
> > Property delegate has already been claimed by a different enhancement
> > worker.
> > 
> > 
> > So my uneducated guess is that somewhere in the depths of tapestry there
> > might be a service which implements IValidationDelegate and it's gets
> > wired
> > to the component parameter. Looks like the order gets somehow fucked-up,
> > because at the point at which the autowire stuff comes in all parameter
> > properties should have already been claimed.  So it probably has to do
> > with
> > the configuration contribution taking place in the seperate module
> > descriptor within my drop-in jar.
> > 
> > 
> > > --- Ursprüngliche Nachricht ---
> > > Von: "James Carman" <ja...@carmanconsulting.com>
> > > An: "'Tapestry users'" <us...@tapestry.apache.org>
> > > Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem
> > > Datum: Sun, 7 May 2006 18:25:17 -0400
> > > 
> > > Hmmmm.  That's weird.  But, thanks for the tip.  I've submitted the
> code
> > > as
> > > a patch to Tapestry.  So, I need to figure out how to get it working. 
> > So,
> > > what you're saying is that if the auto-wiring stuff is inside a jar
> file
> > > and
> > > not part of your application's hivemodule.xml file, then it bombs?
> > > 
> > > -----Original Message-----
> > > From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
> > > Sent: Sunday, May 07, 2006 5:21 PM
> > > To: Tapestry users
> > > Subject: Re: Tapernate-Example HiveMindAutowireWorker Problem
> > > Importance: High
> > > 
> > > I had that very same problem when I tried to package the Tapernate
> > > auto-wiring stuff in a drop-in jar. It said that one of the parameters
> > of
> > > the Shell component has already been claimed by a different
> enhancement
> > > worker.
> > > 
> > > When I just put the service definition and configuration contribution
> > into
> > > my application's "root" module descriptor everything works fine.
> > > 
> > > 
> > > > --- Ursprüngliche Nachricht ---
> > > > Von: Tat leung <ta...@comcast.net>
> > > > An: Tapestry users <us...@tapestry.apache.org>
> > > > Betreff: Tapernate-Example HiveMindAutowireWorker Problem
> > > > Datum: Sun, 07 May 2006 12:52:15 -0700
> > > > 
> > > > Hi All,
> > > > 
> > > > I am using Tapernate and HiveMindAutowireWorker and 
> > > > HiveMindAutowireWorkerFactory from the Tapernate example in my 
> > > > applicaiton.  The XML in my hivemind.xml file and the auto-wire
> > classes 
> > > > are taken from the Tapernate example:
> > > > 
> > > >     <service-point id="AutowireWorkerFactory"
> > > >            
> > interface="org.apache.hivemind.ServiceImplementationFactory"
> > > >             parameters-occurs="none">
> > > >         <invoke-factory>
> > > >             <construct 
> > > > class="org.apache.tapestry.enhance.HiveMindAutowireWorkerFactory" />
> > > >         </invoke-factory>
> > > >     </service-point>
> > > > 
> > > >     <service-point id="AutowireWorker" 
> > > > interface="org.apache.tapestry.enhance.EnhancementWorker">
> > > >         <invoke-factory service-id="AutowireWorkerFactory" />
> > > >     </service-point>
> > > > 
> > > >     <contribution
> > > configuration-id="tapestry.enhance.EnhancementWorkers">
> > > >         <command before="tapestry.enhance.abstract-property"
> > > >             after="tapestry.enhance.dispatch-inject"
> > > >             id="inject-autowire" object="service:AutowireWorker" />
> > > >     </contribution>
> > > > 
> > > > This is working as expected when there is no exception.  But when
> the 
> > > > application throws any exception, it is causing the following
> > exception 
> > > > in the log file.  Has anyone encounter this problem?
> > > > 
> > > > Thanks!
> > > > Tat
> > > > 
> > > > org.apache.hivemind.ApplicationRuntimeException: Property delegate
> has
> > > > already been claimed by a different enhancement worker.
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.enhance.EnhancementOperationImpl.claimProperty(Enhanceme
> > > ntOperationImpl.java:241)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.enhance.ParameterPropertyWorker.addParameter(ParameterPr
> > > opertyWorker.java:117)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
> > > eterPropertyWorker.java:81)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
> > > eterPropertyWorker.java:53)
> > > >     at 
> > > >
> > >
> >
>
$EnhancementWorker_10b103b1964.performEnhancement($EnhancementWorker_10b103b
> > > 1964.java)
> > > >     at 
> > > >
> > >
> >
>
$EnhancementWorker_10b103b197c.performEnhancement($EnhancementWorker_10b103b
> > > 197c.java)
> > > >     at 
> > > >
> > >
> >
>
$EnhancementWorker_10b103b195a.performEnhancement($EnhancementWorker_10b103b
> > > 195a.java)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getCompone
> > > ntConstructor(ComponentConstructorFactoryImpl.java:97)
> > > >     at 
> > > >
> > >
> >
>
$ComponentConstructorFactory_10b103b1947.getComponentConstructor($ComponentC
> > > onstructorFactory_10b103b1947.java)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.pageload.PageLoader.instantiateComponent(PageLoader.java
> > > :531)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.j
> > > ava:481)
> > > >     at 
> > > >
> > >
> >
>
$IPageLoader_10b103b1937.createImplicitComponent($IPageLoader_10b103b1937.ja
> > > va)
> > > >     at 
> > > >
> > >
> >
>
$IPageLoader_10b103b1938.createImplicitComponent($IPageLoader_10b103b1938.ja
> > > va)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.createImplici
> > > tComponent(ComponentTemplateLoaderLogic.java:218)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
> > > nentTemplateLoaderLogic.java:172)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
> > > nentTemplateLoaderLogic.java:111)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.loadTemplate(
> > > ComponentTemplateLoaderLogic.java:88)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderImpl.loadTemplate(C
> > > omponentTemplateLoaderImpl.java:60)
> > > >     at 
> > > >
> > >
> >
>
$ComponentTemplateLoader_10b103b194b.loadTemplate($ComponentTemplateLoader_1
> > > 0b103b194b.java)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.pageload.PageLoader.loadTemplateForComponent(PageLoader.
> > > java:648)
> > > >     at
> > > >
> org.apache.tapestry.BaseComponent.readTemplate(BaseComponent.java:77)
> > > >     at
> > > > org.apache.tapestry.BaseComponent.finishLoad(BaseComponent.java:107)
> > > >     at $Exception_7.finishLoad($Exception_7.java)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:4
> > > 39)
> > > >     at
> > > >
> org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:613)
> > > >     at
> > $IPageLoader_10b103b1937.loadPage($IPageLoader_10b103b1937.java)
> > > >     at
> > $IPageLoader_10b103b1938.loadPage($IPageLoader_10b103b1938.java)
> > > >     at
> > > > org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:120)
> > > >     at
> $IPageSource_10b103b1897.getPage($IPageSource_10b103b1897.java)
> > > >     at 
> > > >
> > org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:268)
> > > >     at 
> > > >
> org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:251)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionP
> > > resenterImpl.java:40)
> > > >     at 
> > > >
> > >
> >
>
$ExceptionPresenter_10b103b18a3.presentException($ExceptionPresenter_10b103b
> > > 18a3.java)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngi
> > > ne.java:121)
> > > >     at 
> > > >
> > >
> >
> org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:280)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngin
> > > eTerminator.java:60)
> > > >     at 
> > > >
> > >
> >
>
$WebRequestServicer_10b103b1907.service($WebRequestServicer_10b103b1907.java
> > > )
> > > >     at 
> > > >
> > >
> >
>
$WebRequestServicer_10b103b1903.service($WebRequestServicer_10b103b1903.java
> > > )
> > > > 
> > > > 
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > 
> > > 
> > > -- 
> > > "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
> > > Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > 
> > > 
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > 
> > 
> > -- 
> > GMX Produkte empfehlen und ganz einfach Geld verdienen!
> > Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> > 
> 
> -- 
> Echte DSL-Flatrate dauerhaft für 0,- Euro*!
> "Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 

-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

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



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


RE: Tapernate-Example HiveMindAutowireWorker Problem

Posted by Mark Lehmacher <ma...@gmx.de>.
My answer might be a little late in coming but I thought I'd let you know
that the fix changed my problem as well!

Thanks! The autowire-worker sure is *very* useful because it reduces xml
clutter, which in my book is a good thing.

It would probably make sense to move it into a seperate project, like HLS
did for the flash-property strategy for example. That way everyone who wants
to use it can just download the drop-in jar.

> --- Ursprüngliche Nachricht ---
> Von: "James Carman" <ja...@carmanconsulting.com>
> An: "'Tapestry users'" <us...@tapestry.apache.org>
> Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem
> Datum: Tue, 9 May 2006 20:13:50 -0400
> 
> Oh, sorry.  I committed a change to my tapernate-example application which
> implements this change.  For those of you who were encountering this
> problem, can you download it and try out the changes?  Thanks!
> 
> 
> -----Original Message-----
> From: James Carman [mailto:james@carmanconsulting.com] 
> Sent: Monday, May 08, 2006 9:31 PM
> To: 'Tapestry users'
> Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem
> 
> Well, I could specify *all* of the workers that I want my auto-wire worker
> to follow by using a comma-separated list.  That might do the trick!
> 
> -----Original Message-----
> From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
> Sent: Monday, May 08, 2006 6:04 PM
> To: Tapestry users
> Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem
> Importance: High
> 
> The way I see it, it definitely IS the ordering: 
> 
> When you contribute the autowirer with
> before="tapestry.enhance.abstract-property" and
> after="tapestry.enhance.dispatch-inject" parameters you don't guarantee
> that
> the parameter-worker already performed it's work, because it is not part
> of
> those services which make up dispatch-inject.
> 
> The ordering of the enhancement workers is unspecified and relies on the
> underlying Hivemind Order object, which in turn is backed by a HashMap. So
> I
> guess if you add one or several enhancement workers to your chain you will
> get the same problem sooner or later (as soon as the HashMap fucks up the
> ordering for you and the parameter-worker runs before your
> autowire-worker).
> 
> However, I'd really love to see a working autowiring function like that.
> If
> it goes into the tapestry core it could be combined into the
> abstract-property-worker, which would solve the ordering problem but raise
> other questions instead (like seperation of concerns).
> 
> 
> > --- Ursprüngliche Nachricht ---
> > Von: "James Carman" <ja...@carmanconsulting.com>
> > An: "'Tapestry users'" <us...@tapestry.apache.org>
> > Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem
> > Datum: Mon, 8 May 2006 10:57:05 -0400
> > 
> > I thought the ordering was getting screwed up too.  But, I added
> > LoggingInterceptor to the ParameterPropertyWorker and my auto-wire
> worker
> > and the parameter one seems to be running first.  If the parameter
> worker
> > runs first, this problem should not occur, since the property would have
> > already been claimed and my worker would just bypass it.  I
> intentionally
> > put my worker after all that stuff, so I wouldn't step on anyone's toes.
> > I
> > wonder if there's some special case that's getting the ordering screwed
> > up? 
> > 
> > -----Original Message-----
> > From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
> > Sent: Monday, May 08, 2006 6:31 AM
> > To: Tapestry users
> > Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem
> > Importance: High
> > 
> > Yup, that's what I am saying.
> > 
> > Looks like it's wiring component parameters as well:
> > 
> > 5705 HiveMindAutowireWorker:performEnhancement [DEBUG] Creating
> auto-wired
> > accessor for property delegate on component
> > classpath:/org/apache/tapestry/html/Shell.jwc, line 22, column 96
> > 5856 HiveMindAutowireWorker:performEnhancement [DEBUG] Creating
> auto-wired
> > accessor for property delegate on component
> > classpath:/org/apache/tapestry/html/Shell.jwc, line 22, column 96
> > 
> > With the result of getting this error:
> > 
> > Error at classpath:/org/apache/tapestry/html/Shell.jwc, line 78, column
> > 20:
> > Error adding property delegate to class org.apache.tapestry.html.Shell:
> > Property delegate has already been claimed by a different enhancement
> > worker.
> > 
> > 
> > So my uneducated guess is that somewhere in the depths of tapestry there
> > might be a service which implements IValidationDelegate and it's gets
> > wired
> > to the component parameter. Looks like the order gets somehow fucked-up,
> > because at the point at which the autowire stuff comes in all parameter
> > properties should have already been claimed.  So it probably has to do
> > with
> > the configuration contribution taking place in the seperate module
> > descriptor within my drop-in jar.
> > 
> > 
> > > --- Ursprüngliche Nachricht ---
> > > Von: "James Carman" <ja...@carmanconsulting.com>
> > > An: "'Tapestry users'" <us...@tapestry.apache.org>
> > > Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem
> > > Datum: Sun, 7 May 2006 18:25:17 -0400
> > > 
> > > Hmmmm.  That's weird.  But, thanks for the tip.  I've submitted the
> code
> > > as
> > > a patch to Tapestry.  So, I need to figure out how to get it working. 
> > So,
> > > what you're saying is that if the auto-wiring stuff is inside a jar
> file
> > > and
> > > not part of your application's hivemodule.xml file, then it bombs?
> > > 
> > > -----Original Message-----
> > > From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
> > > Sent: Sunday, May 07, 2006 5:21 PM
> > > To: Tapestry users
> > > Subject: Re: Tapernate-Example HiveMindAutowireWorker Problem
> > > Importance: High
> > > 
> > > I had that very same problem when I tried to package the Tapernate
> > > auto-wiring stuff in a drop-in jar. It said that one of the parameters
> > of
> > > the Shell component has already been claimed by a different
> enhancement
> > > worker.
> > > 
> > > When I just put the service definition and configuration contribution
> > into
> > > my application's "root" module descriptor everything works fine.
> > > 
> > > 
> > > > --- Ursprüngliche Nachricht ---
> > > > Von: Tat leung <ta...@comcast.net>
> > > > An: Tapestry users <us...@tapestry.apache.org>
> > > > Betreff: Tapernate-Example HiveMindAutowireWorker Problem
> > > > Datum: Sun, 07 May 2006 12:52:15 -0700
> > > > 
> > > > Hi All,
> > > > 
> > > > I am using Tapernate and HiveMindAutowireWorker and 
> > > > HiveMindAutowireWorkerFactory from the Tapernate example in my 
> > > > applicaiton.  The XML in my hivemind.xml file and the auto-wire
> > classes 
> > > > are taken from the Tapernate example:
> > > > 
> > > >     <service-point id="AutowireWorkerFactory"
> > > >            
> > interface="org.apache.hivemind.ServiceImplementationFactory"
> > > >             parameters-occurs="none">
> > > >         <invoke-factory>
> > > >             <construct 
> > > > class="org.apache.tapestry.enhance.HiveMindAutowireWorkerFactory" />
> > > >         </invoke-factory>
> > > >     </service-point>
> > > > 
> > > >     <service-point id="AutowireWorker" 
> > > > interface="org.apache.tapestry.enhance.EnhancementWorker">
> > > >         <invoke-factory service-id="AutowireWorkerFactory" />
> > > >     </service-point>
> > > > 
> > > >     <contribution
> > > configuration-id="tapestry.enhance.EnhancementWorkers">
> > > >         <command before="tapestry.enhance.abstract-property"
> > > >             after="tapestry.enhance.dispatch-inject"
> > > >             id="inject-autowire" object="service:AutowireWorker" />
> > > >     </contribution>
> > > > 
> > > > This is working as expected when there is no exception.  But when
> the 
> > > > application throws any exception, it is causing the following
> > exception 
> > > > in the log file.  Has anyone encounter this problem?
> > > > 
> > > > Thanks!
> > > > Tat
> > > > 
> > > > org.apache.hivemind.ApplicationRuntimeException: Property delegate
> has
> > > > already been claimed by a different enhancement worker.
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.enhance.EnhancementOperationImpl.claimProperty(Enhanceme
> > > ntOperationImpl.java:241)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.enhance.ParameterPropertyWorker.addParameter(ParameterPr
> > > opertyWorker.java:117)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
> > > eterPropertyWorker.java:81)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
> > > eterPropertyWorker.java:53)
> > > >     at 
> > > >
> > >
> >
>
$EnhancementWorker_10b103b1964.performEnhancement($EnhancementWorker_10b103b
> > > 1964.java)
> > > >     at 
> > > >
> > >
> >
>
$EnhancementWorker_10b103b197c.performEnhancement($EnhancementWorker_10b103b
> > > 197c.java)
> > > >     at 
> > > >
> > >
> >
>
$EnhancementWorker_10b103b195a.performEnhancement($EnhancementWorker_10b103b
> > > 195a.java)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getCompone
> > > ntConstructor(ComponentConstructorFactoryImpl.java:97)
> > > >     at 
> > > >
> > >
> >
>
$ComponentConstructorFactory_10b103b1947.getComponentConstructor($ComponentC
> > > onstructorFactory_10b103b1947.java)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.pageload.PageLoader.instantiateComponent(PageLoader.java
> > > :531)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.j
> > > ava:481)
> > > >     at 
> > > >
> > >
> >
>
$IPageLoader_10b103b1937.createImplicitComponent($IPageLoader_10b103b1937.ja
> > > va)
> > > >     at 
> > > >
> > >
> >
>
$IPageLoader_10b103b1938.createImplicitComponent($IPageLoader_10b103b1938.ja
> > > va)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.createImplici
> > > tComponent(ComponentTemplateLoaderLogic.java:218)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
> > > nentTemplateLoaderLogic.java:172)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
> > > nentTemplateLoaderLogic.java:111)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.loadTemplate(
> > > ComponentTemplateLoaderLogic.java:88)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderImpl.loadTemplate(C
> > > omponentTemplateLoaderImpl.java:60)
> > > >     at 
> > > >
> > >
> >
>
$ComponentTemplateLoader_10b103b194b.loadTemplate($ComponentTemplateLoader_1
> > > 0b103b194b.java)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.pageload.PageLoader.loadTemplateForComponent(PageLoader.
> > > java:648)
> > > >     at
> > > >
> org.apache.tapestry.BaseComponent.readTemplate(BaseComponent.java:77)
> > > >     at
> > > > org.apache.tapestry.BaseComponent.finishLoad(BaseComponent.java:107)
> > > >     at $Exception_7.finishLoad($Exception_7.java)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:4
> > > 39)
> > > >     at
> > > >
> org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:613)
> > > >     at
> > $IPageLoader_10b103b1937.loadPage($IPageLoader_10b103b1937.java)
> > > >     at
> > $IPageLoader_10b103b1938.loadPage($IPageLoader_10b103b1938.java)
> > > >     at
> > > > org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:120)
> > > >     at
> $IPageSource_10b103b1897.getPage($IPageSource_10b103b1897.java)
> > > >     at 
> > > >
> > org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:268)
> > > >     at 
> > > >
> org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:251)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionP
> > > resenterImpl.java:40)
> > > >     at 
> > > >
> > >
> >
>
$ExceptionPresenter_10b103b18a3.presentException($ExceptionPresenter_10b103b
> > > 18a3.java)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngi
> > > ne.java:121)
> > > >     at 
> > > >
> > >
> >
> org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:280)
> > > >     at 
> > > >
> > >
> >
>
org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngin
> > > eTerminator.java:60)
> > > >     at 
> > > >
> > >
> >
>
$WebRequestServicer_10b103b1907.service($WebRequestServicer_10b103b1907.java
> > > )
> > > >     at 
> > > >
> > >
> >
>
$WebRequestServicer_10b103b1903.service($WebRequestServicer_10b103b1903.java
> > > )
> > > > 
> > > > 
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > 
> > > 
> > > -- 
> > > "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
> > > Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > 
> > > 
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > 
> > 
> > -- 
> > GMX Produkte empfehlen und ganz einfach Geld verdienen!
> > Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> > 
> 
> -- 
> Echte DSL-Flatrate dauerhaft für 0,- Euro*!
> "Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 

-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

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


RE: Tapernate-Example HiveMindAutowireWorker Problem

Posted by James Carman <ja...@carmanconsulting.com>.
Oh, sorry.  I committed a change to my tapernate-example application which
implements this change.  For those of you who were encountering this
problem, can you download it and try out the changes?  Thanks!


-----Original Message-----
From: James Carman [mailto:james@carmanconsulting.com] 
Sent: Monday, May 08, 2006 9:31 PM
To: 'Tapestry users'
Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem

Well, I could specify *all* of the workers that I want my auto-wire worker
to follow by using a comma-separated list.  That might do the trick!

-----Original Message-----
From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
Sent: Monday, May 08, 2006 6:04 PM
To: Tapestry users
Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem
Importance: High

The way I see it, it definitely IS the ordering: 

When you contribute the autowirer with
before="tapestry.enhance.abstract-property" and
after="tapestry.enhance.dispatch-inject" parameters you don't guarantee that
the parameter-worker already performed it's work, because it is not part of
those services which make up dispatch-inject.

The ordering of the enhancement workers is unspecified and relies on the
underlying Hivemind Order object, which in turn is backed by a HashMap. So I
guess if you add one or several enhancement workers to your chain you will
get the same problem sooner or later (as soon as the HashMap fucks up the
ordering for you and the parameter-worker runs before your autowire-worker).

However, I'd really love to see a working autowiring function like that. If
it goes into the tapestry core it could be combined into the
abstract-property-worker, which would solve the ordering problem but raise
other questions instead (like seperation of concerns).


> --- Ursprüngliche Nachricht ---
> Von: "James Carman" <ja...@carmanconsulting.com>
> An: "'Tapestry users'" <us...@tapestry.apache.org>
> Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem
> Datum: Mon, 8 May 2006 10:57:05 -0400
> 
> I thought the ordering was getting screwed up too.  But, I added
> LoggingInterceptor to the ParameterPropertyWorker and my auto-wire worker
> and the parameter one seems to be running first.  If the parameter worker
> runs first, this problem should not occur, since the property would have
> already been claimed and my worker would just bypass it.  I intentionally
> put my worker after all that stuff, so I wouldn't step on anyone's toes. 
> I
> wonder if there's some special case that's getting the ordering screwed
> up? 
> 
> -----Original Message-----
> From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
> Sent: Monday, May 08, 2006 6:31 AM
> To: Tapestry users
> Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem
> Importance: High
> 
> Yup, that's what I am saying.
> 
> Looks like it's wiring component parameters as well:
> 
> 5705 HiveMindAutowireWorker:performEnhancement [DEBUG] Creating auto-wired
> accessor for property delegate on component
> classpath:/org/apache/tapestry/html/Shell.jwc, line 22, column 96
> 5856 HiveMindAutowireWorker:performEnhancement [DEBUG] Creating auto-wired
> accessor for property delegate on component
> classpath:/org/apache/tapestry/html/Shell.jwc, line 22, column 96
> 
> With the result of getting this error:
> 
> Error at classpath:/org/apache/tapestry/html/Shell.jwc, line 78, column
> 20:
> Error adding property delegate to class org.apache.tapestry.html.Shell:
> Property delegate has already been claimed by a different enhancement
> worker.
> 
> 
> So my uneducated guess is that somewhere in the depths of tapestry there
> might be a service which implements IValidationDelegate and it's gets
> wired
> to the component parameter. Looks like the order gets somehow fucked-up,
> because at the point at which the autowire stuff comes in all parameter
> properties should have already been claimed.  So it probably has to do
> with
> the configuration contribution taking place in the seperate module
> descriptor within my drop-in jar.
> 
> 
> > --- Ursprüngliche Nachricht ---
> > Von: "James Carman" <ja...@carmanconsulting.com>
> > An: "'Tapestry users'" <us...@tapestry.apache.org>
> > Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem
> > Datum: Sun, 7 May 2006 18:25:17 -0400
> > 
> > Hmmmm.  That's weird.  But, thanks for the tip.  I've submitted the code
> > as
> > a patch to Tapestry.  So, I need to figure out how to get it working. 
> So,
> > what you're saying is that if the auto-wiring stuff is inside a jar file
> > and
> > not part of your application's hivemodule.xml file, then it bombs?
> > 
> > -----Original Message-----
> > From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
> > Sent: Sunday, May 07, 2006 5:21 PM
> > To: Tapestry users
> > Subject: Re: Tapernate-Example HiveMindAutowireWorker Problem
> > Importance: High
> > 
> > I had that very same problem when I tried to package the Tapernate
> > auto-wiring stuff in a drop-in jar. It said that one of the parameters
> of
> > the Shell component has already been claimed by a different enhancement
> > worker.
> > 
> > When I just put the service definition and configuration contribution
> into
> > my application's "root" module descriptor everything works fine.
> > 
> > 
> > > --- Ursprüngliche Nachricht ---
> > > Von: Tat leung <ta...@comcast.net>
> > > An: Tapestry users <us...@tapestry.apache.org>
> > > Betreff: Tapernate-Example HiveMindAutowireWorker Problem
> > > Datum: Sun, 07 May 2006 12:52:15 -0700
> > > 
> > > Hi All,
> > > 
> > > I am using Tapernate and HiveMindAutowireWorker and 
> > > HiveMindAutowireWorkerFactory from the Tapernate example in my 
> > > applicaiton.  The XML in my hivemind.xml file and the auto-wire
> classes 
> > > are taken from the Tapernate example:
> > > 
> > >     <service-point id="AutowireWorkerFactory"
> > >            
> interface="org.apache.hivemind.ServiceImplementationFactory"
> > >             parameters-occurs="none">
> > >         <invoke-factory>
> > >             <construct 
> > > class="org.apache.tapestry.enhance.HiveMindAutowireWorkerFactory" />
> > >         </invoke-factory>
> > >     </service-point>
> > > 
> > >     <service-point id="AutowireWorker" 
> > > interface="org.apache.tapestry.enhance.EnhancementWorker">
> > >         <invoke-factory service-id="AutowireWorkerFactory" />
> > >     </service-point>
> > > 
> > >     <contribution
> > configuration-id="tapestry.enhance.EnhancementWorkers">
> > >         <command before="tapestry.enhance.abstract-property"
> > >             after="tapestry.enhance.dispatch-inject"
> > >             id="inject-autowire" object="service:AutowireWorker" />
> > >     </contribution>
> > > 
> > > This is working as expected when there is no exception.  But when the 
> > > application throws any exception, it is causing the following
> exception 
> > > in the log file.  Has anyone encounter this problem?
> > > 
> > > Thanks!
> > > Tat
> > > 
> > > org.apache.hivemind.ApplicationRuntimeException: Property delegate has
> > > already been claimed by a different enhancement worker.
> > >     at 
> > >
> >
>
org.apache.tapestry.enhance.EnhancementOperationImpl.claimProperty(Enhanceme
> > ntOperationImpl.java:241)
> > >     at 
> > >
> >
>
org.apache.tapestry.enhance.ParameterPropertyWorker.addParameter(ParameterPr
> > opertyWorker.java:117)
> > >     at 
> > >
> >
>
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
> > eterPropertyWorker.java:81)
> > >     at 
> > >
> >
>
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
> > eterPropertyWorker.java:53)
> > >     at 
> > >
> >
>
$EnhancementWorker_10b103b1964.performEnhancement($EnhancementWorker_10b103b
> > 1964.java)
> > >     at 
> > >
> >
>
$EnhancementWorker_10b103b197c.performEnhancement($EnhancementWorker_10b103b
> > 197c.java)
> > >     at 
> > >
> >
>
$EnhancementWorker_10b103b195a.performEnhancement($EnhancementWorker_10b103b
> > 195a.java)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getCompone
> > ntConstructor(ComponentConstructorFactoryImpl.java:97)
> > >     at 
> > >
> >
>
$ComponentConstructorFactory_10b103b1947.getComponentConstructor($ComponentC
> > onstructorFactory_10b103b1947.java)
> > >     at 
> > >
> >
>
org.apache.tapestry.pageload.PageLoader.instantiateComponent(PageLoader.java
> > :531)
> > >     at 
> > >
> >
>
org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.j
> > ava:481)
> > >     at 
> > >
> >
>
$IPageLoader_10b103b1937.createImplicitComponent($IPageLoader_10b103b1937.ja
> > va)
> > >     at 
> > >
> >
>
$IPageLoader_10b103b1938.createImplicitComponent($IPageLoader_10b103b1938.ja
> > va)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.createImplici
> > tComponent(ComponentTemplateLoaderLogic.java:218)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
> > nentTemplateLoaderLogic.java:172)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
> > nentTemplateLoaderLogic.java:111)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.loadTemplate(
> > ComponentTemplateLoaderLogic.java:88)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderImpl.loadTemplate(C
> > omponentTemplateLoaderImpl.java:60)
> > >     at 
> > >
> >
>
$ComponentTemplateLoader_10b103b194b.loadTemplate($ComponentTemplateLoader_1
> > 0b103b194b.java)
> > >     at 
> > >
> >
>
org.apache.tapestry.pageload.PageLoader.loadTemplateForComponent(PageLoader.
> > java:648)
> > >     at
> > > org.apache.tapestry.BaseComponent.readTemplate(BaseComponent.java:77)
> > >     at
> > > org.apache.tapestry.BaseComponent.finishLoad(BaseComponent.java:107)
> > >     at $Exception_7.finishLoad($Exception_7.java)
> > >     at 
> > >
> >
>
org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:4
> > 39)
> > >     at
> > > org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:613)
> > >     at
> $IPageLoader_10b103b1937.loadPage($IPageLoader_10b103b1937.java)
> > >     at
> $IPageLoader_10b103b1938.loadPage($IPageLoader_10b103b1938.java)
> > >     at
> > > org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:120)
> > >     at $IPageSource_10b103b1897.getPage($IPageSource_10b103b1897.java)
> > >     at 
> > >
> org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:268)
> > >     at 
> > > org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:251)
> > >     at 
> > >
> >
>
org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionP
> > resenterImpl.java:40)
> > >     at 
> > >
> >
>
$ExceptionPresenter_10b103b18a3.presentException($ExceptionPresenter_10b103b
> > 18a3.java)
> > >     at 
> > >
> >
>
org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngi
> > ne.java:121)
> > >     at 
> > >
> >
> org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:280)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngin
> > eTerminator.java:60)
> > >     at 
> > >
> >
>
$WebRequestServicer_10b103b1907.service($WebRequestServicer_10b103b1907.java
> > )
> > >     at 
> > >
> >
>
$WebRequestServicer_10b103b1903.service($WebRequestServicer_10b103b1903.java
> > )
> > > 
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > 
> > 
> > -- 
> > "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
> > Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> > 
> 
> -- 
> GMX Produkte empfehlen und ganz einfach Geld verdienen!
> Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 

-- 
Echte DSL-Flatrate dauerhaft für 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl

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



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




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


RE: Tapernate-Example HiveMindAutowireWorker Problem

Posted by James Carman <ja...@carmanconsulting.com>.
Can those of you verify that this fix works (if it actually does)?  I can't
actually duplicate the behavior that you saw.  But, I think this might be
either a HiveMind bug or we need to beef up the documentation a bit.

-----Original Message-----
From: James Carman [mailto:james@carmanconsulting.com] 
Sent: Monday, May 08, 2006 9:31 PM
To: 'Tapestry users'
Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem

Well, I could specify *all* of the workers that I want my auto-wire worker
to follow by using a comma-separated list.  That might do the trick!

-----Original Message-----
From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
Sent: Monday, May 08, 2006 6:04 PM
To: Tapestry users
Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem
Importance: High

The way I see it, it definitely IS the ordering: 

When you contribute the autowirer with
before="tapestry.enhance.abstract-property" and
after="tapestry.enhance.dispatch-inject" parameters you don't guarantee that
the parameter-worker already performed it's work, because it is not part of
those services which make up dispatch-inject.

The ordering of the enhancement workers is unspecified and relies on the
underlying Hivemind Order object, which in turn is backed by a HashMap. So I
guess if you add one or several enhancement workers to your chain you will
get the same problem sooner or later (as soon as the HashMap fucks up the
ordering for you and the parameter-worker runs before your autowire-worker).

However, I'd really love to see a working autowiring function like that. If
it goes into the tapestry core it could be combined into the
abstract-property-worker, which would solve the ordering problem but raise
other questions instead (like seperation of concerns).


> --- Ursprüngliche Nachricht ---
> Von: "James Carman" <ja...@carmanconsulting.com>
> An: "'Tapestry users'" <us...@tapestry.apache.org>
> Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem
> Datum: Mon, 8 May 2006 10:57:05 -0400
> 
> I thought the ordering was getting screwed up too.  But, I added
> LoggingInterceptor to the ParameterPropertyWorker and my auto-wire worker
> and the parameter one seems to be running first.  If the parameter worker
> runs first, this problem should not occur, since the property would have
> already been claimed and my worker would just bypass it.  I intentionally
> put my worker after all that stuff, so I wouldn't step on anyone's toes. 
> I
> wonder if there's some special case that's getting the ordering screwed
> up? 
> 
> -----Original Message-----
> From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
> Sent: Monday, May 08, 2006 6:31 AM
> To: Tapestry users
> Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem
> Importance: High
> 
> Yup, that's what I am saying.
> 
> Looks like it's wiring component parameters as well:
> 
> 5705 HiveMindAutowireWorker:performEnhancement [DEBUG] Creating auto-wired
> accessor for property delegate on component
> classpath:/org/apache/tapestry/html/Shell.jwc, line 22, column 96
> 5856 HiveMindAutowireWorker:performEnhancement [DEBUG] Creating auto-wired
> accessor for property delegate on component
> classpath:/org/apache/tapestry/html/Shell.jwc, line 22, column 96
> 
> With the result of getting this error:
> 
> Error at classpath:/org/apache/tapestry/html/Shell.jwc, line 78, column
> 20:
> Error adding property delegate to class org.apache.tapestry.html.Shell:
> Property delegate has already been claimed by a different enhancement
> worker.
> 
> 
> So my uneducated guess is that somewhere in the depths of tapestry there
> might be a service which implements IValidationDelegate and it's gets
> wired
> to the component parameter. Looks like the order gets somehow fucked-up,
> because at the point at which the autowire stuff comes in all parameter
> properties should have already been claimed.  So it probably has to do
> with
> the configuration contribution taking place in the seperate module
> descriptor within my drop-in jar.
> 
> 
> > --- Ursprüngliche Nachricht ---
> > Von: "James Carman" <ja...@carmanconsulting.com>
> > An: "'Tapestry users'" <us...@tapestry.apache.org>
> > Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem
> > Datum: Sun, 7 May 2006 18:25:17 -0400
> > 
> > Hmmmm.  That's weird.  But, thanks for the tip.  I've submitted the code
> > as
> > a patch to Tapestry.  So, I need to figure out how to get it working. 
> So,
> > what you're saying is that if the auto-wiring stuff is inside a jar file
> > and
> > not part of your application's hivemodule.xml file, then it bombs?
> > 
> > -----Original Message-----
> > From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
> > Sent: Sunday, May 07, 2006 5:21 PM
> > To: Tapestry users
> > Subject: Re: Tapernate-Example HiveMindAutowireWorker Problem
> > Importance: High
> > 
> > I had that very same problem when I tried to package the Tapernate
> > auto-wiring stuff in a drop-in jar. It said that one of the parameters
> of
> > the Shell component has already been claimed by a different enhancement
> > worker.
> > 
> > When I just put the service definition and configuration contribution
> into
> > my application's "root" module descriptor everything works fine.
> > 
> > 
> > > --- Ursprüngliche Nachricht ---
> > > Von: Tat leung <ta...@comcast.net>
> > > An: Tapestry users <us...@tapestry.apache.org>
> > > Betreff: Tapernate-Example HiveMindAutowireWorker Problem
> > > Datum: Sun, 07 May 2006 12:52:15 -0700
> > > 
> > > Hi All,
> > > 
> > > I am using Tapernate and HiveMindAutowireWorker and 
> > > HiveMindAutowireWorkerFactory from the Tapernate example in my 
> > > applicaiton.  The XML in my hivemind.xml file and the auto-wire
> classes 
> > > are taken from the Tapernate example:
> > > 
> > >     <service-point id="AutowireWorkerFactory"
> > >            
> interface="org.apache.hivemind.ServiceImplementationFactory"
> > >             parameters-occurs="none">
> > >         <invoke-factory>
> > >             <construct 
> > > class="org.apache.tapestry.enhance.HiveMindAutowireWorkerFactory" />
> > >         </invoke-factory>
> > >     </service-point>
> > > 
> > >     <service-point id="AutowireWorker" 
> > > interface="org.apache.tapestry.enhance.EnhancementWorker">
> > >         <invoke-factory service-id="AutowireWorkerFactory" />
> > >     </service-point>
> > > 
> > >     <contribution
> > configuration-id="tapestry.enhance.EnhancementWorkers">
> > >         <command before="tapestry.enhance.abstract-property"
> > >             after="tapestry.enhance.dispatch-inject"
> > >             id="inject-autowire" object="service:AutowireWorker" />
> > >     </contribution>
> > > 
> > > This is working as expected when there is no exception.  But when the 
> > > application throws any exception, it is causing the following
> exception 
> > > in the log file.  Has anyone encounter this problem?
> > > 
> > > Thanks!
> > > Tat
> > > 
> > > org.apache.hivemind.ApplicationRuntimeException: Property delegate has
> > > already been claimed by a different enhancement worker.
> > >     at 
> > >
> >
>
org.apache.tapestry.enhance.EnhancementOperationImpl.claimProperty(Enhanceme
> > ntOperationImpl.java:241)
> > >     at 
> > >
> >
>
org.apache.tapestry.enhance.ParameterPropertyWorker.addParameter(ParameterPr
> > opertyWorker.java:117)
> > >     at 
> > >
> >
>
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
> > eterPropertyWorker.java:81)
> > >     at 
> > >
> >
>
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
> > eterPropertyWorker.java:53)
> > >     at 
> > >
> >
>
$EnhancementWorker_10b103b1964.performEnhancement($EnhancementWorker_10b103b
> > 1964.java)
> > >     at 
> > >
> >
>
$EnhancementWorker_10b103b197c.performEnhancement($EnhancementWorker_10b103b
> > 197c.java)
> > >     at 
> > >
> >
>
$EnhancementWorker_10b103b195a.performEnhancement($EnhancementWorker_10b103b
> > 195a.java)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getCompone
> > ntConstructor(ComponentConstructorFactoryImpl.java:97)
> > >     at 
> > >
> >
>
$ComponentConstructorFactory_10b103b1947.getComponentConstructor($ComponentC
> > onstructorFactory_10b103b1947.java)
> > >     at 
> > >
> >
>
org.apache.tapestry.pageload.PageLoader.instantiateComponent(PageLoader.java
> > :531)
> > >     at 
> > >
> >
>
org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.j
> > ava:481)
> > >     at 
> > >
> >
>
$IPageLoader_10b103b1937.createImplicitComponent($IPageLoader_10b103b1937.ja
> > va)
> > >     at 
> > >
> >
>
$IPageLoader_10b103b1938.createImplicitComponent($IPageLoader_10b103b1938.ja
> > va)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.createImplici
> > tComponent(ComponentTemplateLoaderLogic.java:218)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
> > nentTemplateLoaderLogic.java:172)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
> > nentTemplateLoaderLogic.java:111)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.loadTemplate(
> > ComponentTemplateLoaderLogic.java:88)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderImpl.loadTemplate(C
> > omponentTemplateLoaderImpl.java:60)
> > >     at 
> > >
> >
>
$ComponentTemplateLoader_10b103b194b.loadTemplate($ComponentTemplateLoader_1
> > 0b103b194b.java)
> > >     at 
> > >
> >
>
org.apache.tapestry.pageload.PageLoader.loadTemplateForComponent(PageLoader.
> > java:648)
> > >     at
> > > org.apache.tapestry.BaseComponent.readTemplate(BaseComponent.java:77)
> > >     at
> > > org.apache.tapestry.BaseComponent.finishLoad(BaseComponent.java:107)
> > >     at $Exception_7.finishLoad($Exception_7.java)
> > >     at 
> > >
> >
>
org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:4
> > 39)
> > >     at
> > > org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:613)
> > >     at
> $IPageLoader_10b103b1937.loadPage($IPageLoader_10b103b1937.java)
> > >     at
> $IPageLoader_10b103b1938.loadPage($IPageLoader_10b103b1938.java)
> > >     at
> > > org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:120)
> > >     at $IPageSource_10b103b1897.getPage($IPageSource_10b103b1897.java)
> > >     at 
> > >
> org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:268)
> > >     at 
> > > org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:251)
> > >     at 
> > >
> >
>
org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionP
> > resenterImpl.java:40)
> > >     at 
> > >
> >
>
$ExceptionPresenter_10b103b18a3.presentException($ExceptionPresenter_10b103b
> > 18a3.java)
> > >     at 
> > >
> >
>
org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngi
> > ne.java:121)
> > >     at 
> > >
> >
> org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:280)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngin
> > eTerminator.java:60)
> > >     at 
> > >
> >
>
$WebRequestServicer_10b103b1907.service($WebRequestServicer_10b103b1907.java
> > )
> > >     at 
> > >
> >
>
$WebRequestServicer_10b103b1903.service($WebRequestServicer_10b103b1903.java
> > )
> > > 
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > 
> > 
> > -- 
> > "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
> > Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> > 
> 
> -- 
> GMX Produkte empfehlen und ganz einfach Geld verdienen!
> Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 

-- 
Echte DSL-Flatrate dauerhaft für 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl

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



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




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


RE: Tapernate-Example HiveMindAutowireWorker Problem

Posted by James Carman <ja...@carmanconsulting.com>.
Well, I could specify *all* of the workers that I want my auto-wire worker
to follow by using a comma-separated list.  That might do the trick!

-----Original Message-----
From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
Sent: Monday, May 08, 2006 6:04 PM
To: Tapestry users
Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem
Importance: High

The way I see it, it definitely IS the ordering: 

When you contribute the autowirer with
before="tapestry.enhance.abstract-property" and
after="tapestry.enhance.dispatch-inject" parameters you don't guarantee that
the parameter-worker already performed it's work, because it is not part of
those services which make up dispatch-inject.

The ordering of the enhancement workers is unspecified and relies on the
underlying Hivemind Order object, which in turn is backed by a HashMap. So I
guess if you add one or several enhancement workers to your chain you will
get the same problem sooner or later (as soon as the HashMap fucks up the
ordering for you and the parameter-worker runs before your autowire-worker).

However, I'd really love to see a working autowiring function like that. If
it goes into the tapestry core it could be combined into the
abstract-property-worker, which would solve the ordering problem but raise
other questions instead (like seperation of concerns).


> --- Ursprüngliche Nachricht ---
> Von: "James Carman" <ja...@carmanconsulting.com>
> An: "'Tapestry users'" <us...@tapestry.apache.org>
> Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem
> Datum: Mon, 8 May 2006 10:57:05 -0400
> 
> I thought the ordering was getting screwed up too.  But, I added
> LoggingInterceptor to the ParameterPropertyWorker and my auto-wire worker
> and the parameter one seems to be running first.  If the parameter worker
> runs first, this problem should not occur, since the property would have
> already been claimed and my worker would just bypass it.  I intentionally
> put my worker after all that stuff, so I wouldn't step on anyone's toes. 
> I
> wonder if there's some special case that's getting the ordering screwed
> up? 
> 
> -----Original Message-----
> From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
> Sent: Monday, May 08, 2006 6:31 AM
> To: Tapestry users
> Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem
> Importance: High
> 
> Yup, that's what I am saying.
> 
> Looks like it's wiring component parameters as well:
> 
> 5705 HiveMindAutowireWorker:performEnhancement [DEBUG] Creating auto-wired
> accessor for property delegate on component
> classpath:/org/apache/tapestry/html/Shell.jwc, line 22, column 96
> 5856 HiveMindAutowireWorker:performEnhancement [DEBUG] Creating auto-wired
> accessor for property delegate on component
> classpath:/org/apache/tapestry/html/Shell.jwc, line 22, column 96
> 
> With the result of getting this error:
> 
> Error at classpath:/org/apache/tapestry/html/Shell.jwc, line 78, column
> 20:
> Error adding property delegate to class org.apache.tapestry.html.Shell:
> Property delegate has already been claimed by a different enhancement
> worker.
> 
> 
> So my uneducated guess is that somewhere in the depths of tapestry there
> might be a service which implements IValidationDelegate and it's gets
> wired
> to the component parameter. Looks like the order gets somehow fucked-up,
> because at the point at which the autowire stuff comes in all parameter
> properties should have already been claimed.  So it probably has to do
> with
> the configuration contribution taking place in the seperate module
> descriptor within my drop-in jar.
> 
> 
> > --- Ursprüngliche Nachricht ---
> > Von: "James Carman" <ja...@carmanconsulting.com>
> > An: "'Tapestry users'" <us...@tapestry.apache.org>
> > Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem
> > Datum: Sun, 7 May 2006 18:25:17 -0400
> > 
> > Hmmmm.  That's weird.  But, thanks for the tip.  I've submitted the code
> > as
> > a patch to Tapestry.  So, I need to figure out how to get it working. 
> So,
> > what you're saying is that if the auto-wiring stuff is inside a jar file
> > and
> > not part of your application's hivemodule.xml file, then it bombs?
> > 
> > -----Original Message-----
> > From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
> > Sent: Sunday, May 07, 2006 5:21 PM
> > To: Tapestry users
> > Subject: Re: Tapernate-Example HiveMindAutowireWorker Problem
> > Importance: High
> > 
> > I had that very same problem when I tried to package the Tapernate
> > auto-wiring stuff in a drop-in jar. It said that one of the parameters
> of
> > the Shell component has already been claimed by a different enhancement
> > worker.
> > 
> > When I just put the service definition and configuration contribution
> into
> > my application's "root" module descriptor everything works fine.
> > 
> > 
> > > --- Ursprüngliche Nachricht ---
> > > Von: Tat leung <ta...@comcast.net>
> > > An: Tapestry users <us...@tapestry.apache.org>
> > > Betreff: Tapernate-Example HiveMindAutowireWorker Problem
> > > Datum: Sun, 07 May 2006 12:52:15 -0700
> > > 
> > > Hi All,
> > > 
> > > I am using Tapernate and HiveMindAutowireWorker and 
> > > HiveMindAutowireWorkerFactory from the Tapernate example in my 
> > > applicaiton.  The XML in my hivemind.xml file and the auto-wire
> classes 
> > > are taken from the Tapernate example:
> > > 
> > >     <service-point id="AutowireWorkerFactory"
> > >            
> interface="org.apache.hivemind.ServiceImplementationFactory"
> > >             parameters-occurs="none">
> > >         <invoke-factory>
> > >             <construct 
> > > class="org.apache.tapestry.enhance.HiveMindAutowireWorkerFactory" />
> > >         </invoke-factory>
> > >     </service-point>
> > > 
> > >     <service-point id="AutowireWorker" 
> > > interface="org.apache.tapestry.enhance.EnhancementWorker">
> > >         <invoke-factory service-id="AutowireWorkerFactory" />
> > >     </service-point>
> > > 
> > >     <contribution
> > configuration-id="tapestry.enhance.EnhancementWorkers">
> > >         <command before="tapestry.enhance.abstract-property"
> > >             after="tapestry.enhance.dispatch-inject"
> > >             id="inject-autowire" object="service:AutowireWorker" />
> > >     </contribution>
> > > 
> > > This is working as expected when there is no exception.  But when the 
> > > application throws any exception, it is causing the following
> exception 
> > > in the log file.  Has anyone encounter this problem?
> > > 
> > > Thanks!
> > > Tat
> > > 
> > > org.apache.hivemind.ApplicationRuntimeException: Property delegate has
> > > already been claimed by a different enhancement worker.
> > >     at 
> > >
> >
>
org.apache.tapestry.enhance.EnhancementOperationImpl.claimProperty(Enhanceme
> > ntOperationImpl.java:241)
> > >     at 
> > >
> >
>
org.apache.tapestry.enhance.ParameterPropertyWorker.addParameter(ParameterPr
> > opertyWorker.java:117)
> > >     at 
> > >
> >
>
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
> > eterPropertyWorker.java:81)
> > >     at 
> > >
> >
>
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
> > eterPropertyWorker.java:53)
> > >     at 
> > >
> >
>
$EnhancementWorker_10b103b1964.performEnhancement($EnhancementWorker_10b103b
> > 1964.java)
> > >     at 
> > >
> >
>
$EnhancementWorker_10b103b197c.performEnhancement($EnhancementWorker_10b103b
> > 197c.java)
> > >     at 
> > >
> >
>
$EnhancementWorker_10b103b195a.performEnhancement($EnhancementWorker_10b103b
> > 195a.java)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getCompone
> > ntConstructor(ComponentConstructorFactoryImpl.java:97)
> > >     at 
> > >
> >
>
$ComponentConstructorFactory_10b103b1947.getComponentConstructor($ComponentC
> > onstructorFactory_10b103b1947.java)
> > >     at 
> > >
> >
>
org.apache.tapestry.pageload.PageLoader.instantiateComponent(PageLoader.java
> > :531)
> > >     at 
> > >
> >
>
org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.j
> > ava:481)
> > >     at 
> > >
> >
>
$IPageLoader_10b103b1937.createImplicitComponent($IPageLoader_10b103b1937.ja
> > va)
> > >     at 
> > >
> >
>
$IPageLoader_10b103b1938.createImplicitComponent($IPageLoader_10b103b1938.ja
> > va)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.createImplici
> > tComponent(ComponentTemplateLoaderLogic.java:218)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
> > nentTemplateLoaderLogic.java:172)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
> > nentTemplateLoaderLogic.java:111)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.loadTemplate(
> > ComponentTemplateLoaderLogic.java:88)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderImpl.loadTemplate(C
> > omponentTemplateLoaderImpl.java:60)
> > >     at 
> > >
> >
>
$ComponentTemplateLoader_10b103b194b.loadTemplate($ComponentTemplateLoader_1
> > 0b103b194b.java)
> > >     at 
> > >
> >
>
org.apache.tapestry.pageload.PageLoader.loadTemplateForComponent(PageLoader.
> > java:648)
> > >     at
> > > org.apache.tapestry.BaseComponent.readTemplate(BaseComponent.java:77)
> > >     at
> > > org.apache.tapestry.BaseComponent.finishLoad(BaseComponent.java:107)
> > >     at $Exception_7.finishLoad($Exception_7.java)
> > >     at 
> > >
> >
>
org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:4
> > 39)
> > >     at
> > > org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:613)
> > >     at
> $IPageLoader_10b103b1937.loadPage($IPageLoader_10b103b1937.java)
> > >     at
> $IPageLoader_10b103b1938.loadPage($IPageLoader_10b103b1938.java)
> > >     at
> > > org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:120)
> > >     at $IPageSource_10b103b1897.getPage($IPageSource_10b103b1897.java)
> > >     at 
> > >
> org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:268)
> > >     at 
> > > org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:251)
> > >     at 
> > >
> >
>
org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionP
> > resenterImpl.java:40)
> > >     at 
> > >
> >
>
$ExceptionPresenter_10b103b18a3.presentException($ExceptionPresenter_10b103b
> > 18a3.java)
> > >     at 
> > >
> >
>
org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngi
> > ne.java:121)
> > >     at 
> > >
> >
> org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:280)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngin
> > eTerminator.java:60)
> > >     at 
> > >
> >
>
$WebRequestServicer_10b103b1907.service($WebRequestServicer_10b103b1907.java
> > )
> > >     at 
> > >
> >
>
$WebRequestServicer_10b103b1903.service($WebRequestServicer_10b103b1903.java
> > )
> > > 
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > 
> > 
> > -- 
> > "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
> > Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> > 
> 
> -- 
> GMX Produkte empfehlen und ganz einfach Geld verdienen!
> Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 

-- 
Echte DSL-Flatrate dauerhaft für 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl

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



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


RE: Tapernate-Example HiveMindAutowireWorker Problem

Posted by Mark Lehmacher <ma...@gmx.de>.
The way I see it, it definitely IS the ordering: 

When you contribute the autowirer with
before="tapestry.enhance.abstract-property" and
after="tapestry.enhance.dispatch-inject" parameters you don't guarantee that
the parameter-worker already performed it's work, because it is not part of
those services which make up dispatch-inject.

The ordering of the enhancement workers is unspecified and relies on the
underlying Hivemind Order object, which in turn is backed by a HashMap. So I
guess if you add one or several enhancement workers to your chain you will
get the same problem sooner or later (as soon as the HashMap fucks up the
ordering for you and the parameter-worker runs before your autowire-worker).

However, I'd really love to see a working autowiring function like that. If
it goes into the tapestry core it could be combined into the
abstract-property-worker, which would solve the ordering problem but raise
other questions instead (like seperation of concerns).


> --- Ursprüngliche Nachricht ---
> Von: "James Carman" <ja...@carmanconsulting.com>
> An: "'Tapestry users'" <us...@tapestry.apache.org>
> Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem
> Datum: Mon, 8 May 2006 10:57:05 -0400
> 
> I thought the ordering was getting screwed up too.  But, I added
> LoggingInterceptor to the ParameterPropertyWorker and my auto-wire worker
> and the parameter one seems to be running first.  If the parameter worker
> runs first, this problem should not occur, since the property would have
> already been claimed and my worker would just bypass it.  I intentionally
> put my worker after all that stuff, so I wouldn't step on anyone's toes. 
> I
> wonder if there's some special case that's getting the ordering screwed
> up? 
> 
> -----Original Message-----
> From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
> Sent: Monday, May 08, 2006 6:31 AM
> To: Tapestry users
> Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem
> Importance: High
> 
> Yup, that's what I am saying.
> 
> Looks like it's wiring component parameters as well:
> 
> 5705 HiveMindAutowireWorker:performEnhancement [DEBUG] Creating auto-wired
> accessor for property delegate on component
> classpath:/org/apache/tapestry/html/Shell.jwc, line 22, column 96
> 5856 HiveMindAutowireWorker:performEnhancement [DEBUG] Creating auto-wired
> accessor for property delegate on component
> classpath:/org/apache/tapestry/html/Shell.jwc, line 22, column 96
> 
> With the result of getting this error:
> 
> Error at classpath:/org/apache/tapestry/html/Shell.jwc, line 78, column
> 20:
> Error adding property delegate to class org.apache.tapestry.html.Shell:
> Property delegate has already been claimed by a different enhancement
> worker.
> 
> 
> So my uneducated guess is that somewhere in the depths of tapestry there
> might be a service which implements IValidationDelegate and it's gets
> wired
> to the component parameter. Looks like the order gets somehow fucked-up,
> because at the point at which the autowire stuff comes in all parameter
> properties should have already been claimed.  So it probably has to do
> with
> the configuration contribution taking place in the seperate module
> descriptor within my drop-in jar.
> 
> 
> > --- Ursprüngliche Nachricht ---
> > Von: "James Carman" <ja...@carmanconsulting.com>
> > An: "'Tapestry users'" <us...@tapestry.apache.org>
> > Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem
> > Datum: Sun, 7 May 2006 18:25:17 -0400
> > 
> > Hmmmm.  That's weird.  But, thanks for the tip.  I've submitted the code
> > as
> > a patch to Tapestry.  So, I need to figure out how to get it working. 
> So,
> > what you're saying is that if the auto-wiring stuff is inside a jar file
> > and
> > not part of your application's hivemodule.xml file, then it bombs?
> > 
> > -----Original Message-----
> > From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
> > Sent: Sunday, May 07, 2006 5:21 PM
> > To: Tapestry users
> > Subject: Re: Tapernate-Example HiveMindAutowireWorker Problem
> > Importance: High
> > 
> > I had that very same problem when I tried to package the Tapernate
> > auto-wiring stuff in a drop-in jar. It said that one of the parameters
> of
> > the Shell component has already been claimed by a different enhancement
> > worker.
> > 
> > When I just put the service definition and configuration contribution
> into
> > my application's "root" module descriptor everything works fine.
> > 
> > 
> > > --- Ursprüngliche Nachricht ---
> > > Von: Tat leung <ta...@comcast.net>
> > > An: Tapestry users <us...@tapestry.apache.org>
> > > Betreff: Tapernate-Example HiveMindAutowireWorker Problem
> > > Datum: Sun, 07 May 2006 12:52:15 -0700
> > > 
> > > Hi All,
> > > 
> > > I am using Tapernate and HiveMindAutowireWorker and 
> > > HiveMindAutowireWorkerFactory from the Tapernate example in my 
> > > applicaiton.  The XML in my hivemind.xml file and the auto-wire
> classes 
> > > are taken from the Tapernate example:
> > > 
> > >     <service-point id="AutowireWorkerFactory"
> > >            
> interface="org.apache.hivemind.ServiceImplementationFactory"
> > >             parameters-occurs="none">
> > >         <invoke-factory>
> > >             <construct 
> > > class="org.apache.tapestry.enhance.HiveMindAutowireWorkerFactory" />
> > >         </invoke-factory>
> > >     </service-point>
> > > 
> > >     <service-point id="AutowireWorker" 
> > > interface="org.apache.tapestry.enhance.EnhancementWorker">
> > >         <invoke-factory service-id="AutowireWorkerFactory" />
> > >     </service-point>
> > > 
> > >     <contribution
> > configuration-id="tapestry.enhance.EnhancementWorkers">
> > >         <command before="tapestry.enhance.abstract-property"
> > >             after="tapestry.enhance.dispatch-inject"
> > >             id="inject-autowire" object="service:AutowireWorker" />
> > >     </contribution>
> > > 
> > > This is working as expected when there is no exception.  But when the 
> > > application throws any exception, it is causing the following
> exception 
> > > in the log file.  Has anyone encounter this problem?
> > > 
> > > Thanks!
> > > Tat
> > > 
> > > org.apache.hivemind.ApplicationRuntimeException: Property delegate has
> > > already been claimed by a different enhancement worker.
> > >     at 
> > >
> >
>
org.apache.tapestry.enhance.EnhancementOperationImpl.claimProperty(Enhanceme
> > ntOperationImpl.java:241)
> > >     at 
> > >
> >
>
org.apache.tapestry.enhance.ParameterPropertyWorker.addParameter(ParameterPr
> > opertyWorker.java:117)
> > >     at 
> > >
> >
>
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
> > eterPropertyWorker.java:81)
> > >     at 
> > >
> >
>
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
> > eterPropertyWorker.java:53)
> > >     at 
> > >
> >
>
$EnhancementWorker_10b103b1964.performEnhancement($EnhancementWorker_10b103b
> > 1964.java)
> > >     at 
> > >
> >
>
$EnhancementWorker_10b103b197c.performEnhancement($EnhancementWorker_10b103b
> > 197c.java)
> > >     at 
> > >
> >
>
$EnhancementWorker_10b103b195a.performEnhancement($EnhancementWorker_10b103b
> > 195a.java)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getCompone
> > ntConstructor(ComponentConstructorFactoryImpl.java:97)
> > >     at 
> > >
> >
>
$ComponentConstructorFactory_10b103b1947.getComponentConstructor($ComponentC
> > onstructorFactory_10b103b1947.java)
> > >     at 
> > >
> >
>
org.apache.tapestry.pageload.PageLoader.instantiateComponent(PageLoader.java
> > :531)
> > >     at 
> > >
> >
>
org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.j
> > ava:481)
> > >     at 
> > >
> >
>
$IPageLoader_10b103b1937.createImplicitComponent($IPageLoader_10b103b1937.ja
> > va)
> > >     at 
> > >
> >
>
$IPageLoader_10b103b1938.createImplicitComponent($IPageLoader_10b103b1938.ja
> > va)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.createImplici
> > tComponent(ComponentTemplateLoaderLogic.java:218)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
> > nentTemplateLoaderLogic.java:172)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
> > nentTemplateLoaderLogic.java:111)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.loadTemplate(
> > ComponentTemplateLoaderLogic.java:88)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderImpl.loadTemplate(C
> > omponentTemplateLoaderImpl.java:60)
> > >     at 
> > >
> >
>
$ComponentTemplateLoader_10b103b194b.loadTemplate($ComponentTemplateLoader_1
> > 0b103b194b.java)
> > >     at 
> > >
> >
>
org.apache.tapestry.pageload.PageLoader.loadTemplateForComponent(PageLoader.
> > java:648)
> > >     at
> > > org.apache.tapestry.BaseComponent.readTemplate(BaseComponent.java:77)
> > >     at
> > > org.apache.tapestry.BaseComponent.finishLoad(BaseComponent.java:107)
> > >     at $Exception_7.finishLoad($Exception_7.java)
> > >     at 
> > >
> >
>
org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:4
> > 39)
> > >     at
> > > org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:613)
> > >     at
> $IPageLoader_10b103b1937.loadPage($IPageLoader_10b103b1937.java)
> > >     at
> $IPageLoader_10b103b1938.loadPage($IPageLoader_10b103b1938.java)
> > >     at
> > > org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:120)
> > >     at $IPageSource_10b103b1897.getPage($IPageSource_10b103b1897.java)
> > >     at 
> > >
> org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:268)
> > >     at 
> > > org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:251)
> > >     at 
> > >
> >
>
org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionP
> > resenterImpl.java:40)
> > >     at 
> > >
> >
>
$ExceptionPresenter_10b103b18a3.presentException($ExceptionPresenter_10b103b
> > 18a3.java)
> > >     at 
> > >
> >
>
org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngi
> > ne.java:121)
> > >     at 
> > >
> >
> org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:280)
> > >     at 
> > >
> >
>
org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngin
> > eTerminator.java:60)
> > >     at 
> > >
> >
>
$WebRequestServicer_10b103b1907.service($WebRequestServicer_10b103b1907.java
> > )
> > >     at 
> > >
> >
>
$WebRequestServicer_10b103b1903.service($WebRequestServicer_10b103b1903.java
> > )
> > > 
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > 
> > 
> > -- 
> > "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
> > Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> > 
> 
> -- 
> GMX Produkte empfehlen und ganz einfach Geld verdienen!
> Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 

-- 
Echte DSL-Flatrate dauerhaft für 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl

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


RE: Tapernate-Example HiveMindAutowireWorker Problem

Posted by James Carman <ja...@carmanconsulting.com>.
I thought the ordering was getting screwed up too.  But, I added
LoggingInterceptor to the ParameterPropertyWorker and my auto-wire worker
and the parameter one seems to be running first.  If the parameter worker
runs first, this problem should not occur, since the property would have
already been claimed and my worker would just bypass it.  I intentionally
put my worker after all that stuff, so I wouldn't step on anyone's toes.  I
wonder if there's some special case that's getting the ordering screwed up? 

-----Original Message-----
From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
Sent: Monday, May 08, 2006 6:31 AM
To: Tapestry users
Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem
Importance: High

Yup, that's what I am saying.

Looks like it's wiring component parameters as well:

5705 HiveMindAutowireWorker:performEnhancement [DEBUG] Creating auto-wired
accessor for property delegate on component
classpath:/org/apache/tapestry/html/Shell.jwc, line 22, column 96
5856 HiveMindAutowireWorker:performEnhancement [DEBUG] Creating auto-wired
accessor for property delegate on component
classpath:/org/apache/tapestry/html/Shell.jwc, line 22, column 96

With the result of getting this error:

Error at classpath:/org/apache/tapestry/html/Shell.jwc, line 78, column 20:
Error adding property delegate to class org.apache.tapestry.html.Shell:
Property delegate has already been claimed by a different enhancement
worker.


So my uneducated guess is that somewhere in the depths of tapestry there
might be a service which implements IValidationDelegate and it's gets wired
to the component parameter. Looks like the order gets somehow fucked-up,
because at the point at which the autowire stuff comes in all parameter
properties should have already been claimed.  So it probably has to do with
the configuration contribution taking place in the seperate module
descriptor within my drop-in jar.


> --- Ursprüngliche Nachricht ---
> Von: "James Carman" <ja...@carmanconsulting.com>
> An: "'Tapestry users'" <us...@tapestry.apache.org>
> Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem
> Datum: Sun, 7 May 2006 18:25:17 -0400
> 
> Hmmmm.  That's weird.  But, thanks for the tip.  I've submitted the code
> as
> a patch to Tapestry.  So, I need to figure out how to get it working.  So,
> what you're saying is that if the auto-wiring stuff is inside a jar file
> and
> not part of your application's hivemodule.xml file, then it bombs?
> 
> -----Original Message-----
> From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
> Sent: Sunday, May 07, 2006 5:21 PM
> To: Tapestry users
> Subject: Re: Tapernate-Example HiveMindAutowireWorker Problem
> Importance: High
> 
> I had that very same problem when I tried to package the Tapernate
> auto-wiring stuff in a drop-in jar. It said that one of the parameters of
> the Shell component has already been claimed by a different enhancement
> worker.
> 
> When I just put the service definition and configuration contribution into
> my application's "root" module descriptor everything works fine.
> 
> 
> > --- Ursprüngliche Nachricht ---
> > Von: Tat leung <ta...@comcast.net>
> > An: Tapestry users <us...@tapestry.apache.org>
> > Betreff: Tapernate-Example HiveMindAutowireWorker Problem
> > Datum: Sun, 07 May 2006 12:52:15 -0700
> > 
> > Hi All,
> > 
> > I am using Tapernate and HiveMindAutowireWorker and 
> > HiveMindAutowireWorkerFactory from the Tapernate example in my 
> > applicaiton.  The XML in my hivemind.xml file and the auto-wire classes 
> > are taken from the Tapernate example:
> > 
> >     <service-point id="AutowireWorkerFactory"
> >             interface="org.apache.hivemind.ServiceImplementationFactory"
> >             parameters-occurs="none">
> >         <invoke-factory>
> >             <construct 
> > class="org.apache.tapestry.enhance.HiveMindAutowireWorkerFactory" />
> >         </invoke-factory>
> >     </service-point>
> > 
> >     <service-point id="AutowireWorker" 
> > interface="org.apache.tapestry.enhance.EnhancementWorker">
> >         <invoke-factory service-id="AutowireWorkerFactory" />
> >     </service-point>
> > 
> >     <contribution
> configuration-id="tapestry.enhance.EnhancementWorkers">
> >         <command before="tapestry.enhance.abstract-property"
> >             after="tapestry.enhance.dispatch-inject"
> >             id="inject-autowire" object="service:AutowireWorker" />
> >     </contribution>
> > 
> > This is working as expected when there is no exception.  But when the 
> > application throws any exception, it is causing the following exception 
> > in the log file.  Has anyone encounter this problem?
> > 
> > Thanks!
> > Tat
> > 
> > org.apache.hivemind.ApplicationRuntimeException: Property delegate has 
> > already been claimed by a different enhancement worker.
> >     at 
> >
>
org.apache.tapestry.enhance.EnhancementOperationImpl.claimProperty(Enhanceme
> ntOperationImpl.java:241)
> >     at 
> >
>
org.apache.tapestry.enhance.ParameterPropertyWorker.addParameter(ParameterPr
> opertyWorker.java:117)
> >     at 
> >
>
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
> eterPropertyWorker.java:81)
> >     at 
> >
>
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
> eterPropertyWorker.java:53)
> >     at 
> >
>
$EnhancementWorker_10b103b1964.performEnhancement($EnhancementWorker_10b103b
> 1964.java)
> >     at 
> >
>
$EnhancementWorker_10b103b197c.performEnhancement($EnhancementWorker_10b103b
> 197c.java)
> >     at 
> >
>
$EnhancementWorker_10b103b195a.performEnhancement($EnhancementWorker_10b103b
> 195a.java)
> >     at 
> >
>
org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getCompone
> ntConstructor(ComponentConstructorFactoryImpl.java:97)
> >     at 
> >
>
$ComponentConstructorFactory_10b103b1947.getComponentConstructor($ComponentC
> onstructorFactory_10b103b1947.java)
> >     at 
> >
>
org.apache.tapestry.pageload.PageLoader.instantiateComponent(PageLoader.java
> :531)
> >     at 
> >
>
org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.j
> ava:481)
> >     at 
> >
>
$IPageLoader_10b103b1937.createImplicitComponent($IPageLoader_10b103b1937.ja
> va)
> >     at 
> >
>
$IPageLoader_10b103b1938.createImplicitComponent($IPageLoader_10b103b1938.ja
> va)
> >     at 
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.createImplici
> tComponent(ComponentTemplateLoaderLogic.java:218)
> >     at 
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
> nentTemplateLoaderLogic.java:172)
> >     at 
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
> nentTemplateLoaderLogic.java:111)
> >     at 
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.loadTemplate(
> ComponentTemplateLoaderLogic.java:88)
> >     at 
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderImpl.loadTemplate(C
> omponentTemplateLoaderImpl.java:60)
> >     at 
> >
>
$ComponentTemplateLoader_10b103b194b.loadTemplate($ComponentTemplateLoader_1
> 0b103b194b.java)
> >     at 
> >
>
org.apache.tapestry.pageload.PageLoader.loadTemplateForComponent(PageLoader.
> java:648)
> >     at
> > org.apache.tapestry.BaseComponent.readTemplate(BaseComponent.java:77)
> >     at
> > org.apache.tapestry.BaseComponent.finishLoad(BaseComponent.java:107)
> >     at $Exception_7.finishLoad($Exception_7.java)
> >     at 
> >
>
org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:4
> 39)
> >     at
> > org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:613)
> >     at $IPageLoader_10b103b1937.loadPage($IPageLoader_10b103b1937.java)
> >     at $IPageLoader_10b103b1938.loadPage($IPageLoader_10b103b1938.java)
> >     at
> > org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:120)
> >     at $IPageSource_10b103b1897.getPage($IPageSource_10b103b1897.java)
> >     at 
> > org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:268)
> >     at 
> > org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:251)
> >     at 
> >
>
org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionP
> resenterImpl.java:40)
> >     at 
> >
>
$ExceptionPresenter_10b103b18a3.presentException($ExceptionPresenter_10b103b
> 18a3.java)
> >     at 
> >
>
org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngi
> ne.java:121)
> >     at 
> >
> org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:280)
> >     at 
> >
>
org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngin
> eTerminator.java:60)
> >     at 
> >
>
$WebRequestServicer_10b103b1907.service($WebRequestServicer_10b103b1907.java
> )
> >     at 
> >
>
$WebRequestServicer_10b103b1903.service($WebRequestServicer_10b103b1903.java
> )
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> > 
> 
> -- 
> "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
> Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 

-- 
GMX Produkte empfehlen und ganz einfach Geld verdienen!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner

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



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


RE: Tapernate-Example HiveMindAutowireWorker Problem

Posted by Mark Lehmacher <ma...@gmx.de>.
Yup, that's what I am saying.

Looks like it's wiring component parameters as well:

5705 HiveMindAutowireWorker:performEnhancement [DEBUG] Creating auto-wired
accessor for property delegate on component
classpath:/org/apache/tapestry/html/Shell.jwc, line 22, column 96
5856 HiveMindAutowireWorker:performEnhancement [DEBUG] Creating auto-wired
accessor for property delegate on component
classpath:/org/apache/tapestry/html/Shell.jwc, line 22, column 96

With the result of getting this error:

Error at classpath:/org/apache/tapestry/html/Shell.jwc, line 78, column 20:
Error adding property delegate to class org.apache.tapestry.html.Shell:
Property delegate has already been claimed by a different enhancement
worker.


So my uneducated guess is that somewhere in the depths of tapestry there
might be a service which implements IValidationDelegate and it's gets wired
to the component parameter. Looks like the order gets somehow fucked-up,
because at the point at which the autowire stuff comes in all parameter
properties should have already been claimed.  So it probably has to do with
the configuration contribution taking place in the seperate module
descriptor within my drop-in jar.


> --- Ursprüngliche Nachricht ---
> Von: "James Carman" <ja...@carmanconsulting.com>
> An: "'Tapestry users'" <us...@tapestry.apache.org>
> Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem
> Datum: Sun, 7 May 2006 18:25:17 -0400
> 
> Hmmmm.  That's weird.  But, thanks for the tip.  I've submitted the code
> as
> a patch to Tapestry.  So, I need to figure out how to get it working.  So,
> what you're saying is that if the auto-wiring stuff is inside a jar file
> and
> not part of your application's hivemodule.xml file, then it bombs?
> 
> -----Original Message-----
> From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
> Sent: Sunday, May 07, 2006 5:21 PM
> To: Tapestry users
> Subject: Re: Tapernate-Example HiveMindAutowireWorker Problem
> Importance: High
> 
> I had that very same problem when I tried to package the Tapernate
> auto-wiring stuff in a drop-in jar. It said that one of the parameters of
> the Shell component has already been claimed by a different enhancement
> worker.
> 
> When I just put the service definition and configuration contribution into
> my application's "root" module descriptor everything works fine.
> 
> 
> > --- Ursprüngliche Nachricht ---
> > Von: Tat leung <ta...@comcast.net>
> > An: Tapestry users <us...@tapestry.apache.org>
> > Betreff: Tapernate-Example HiveMindAutowireWorker Problem
> > Datum: Sun, 07 May 2006 12:52:15 -0700
> > 
> > Hi All,
> > 
> > I am using Tapernate and HiveMindAutowireWorker and 
> > HiveMindAutowireWorkerFactory from the Tapernate example in my 
> > applicaiton.  The XML in my hivemind.xml file and the auto-wire classes 
> > are taken from the Tapernate example:
> > 
> >     <service-point id="AutowireWorkerFactory"
> >             interface="org.apache.hivemind.ServiceImplementationFactory"
> >             parameters-occurs="none">
> >         <invoke-factory>
> >             <construct 
> > class="org.apache.tapestry.enhance.HiveMindAutowireWorkerFactory" />
> >         </invoke-factory>
> >     </service-point>
> > 
> >     <service-point id="AutowireWorker" 
> > interface="org.apache.tapestry.enhance.EnhancementWorker">
> >         <invoke-factory service-id="AutowireWorkerFactory" />
> >     </service-point>
> > 
> >     <contribution
> configuration-id="tapestry.enhance.EnhancementWorkers">
> >         <command before="tapestry.enhance.abstract-property"
> >             after="tapestry.enhance.dispatch-inject"
> >             id="inject-autowire" object="service:AutowireWorker" />
> >     </contribution>
> > 
> > This is working as expected when there is no exception.  But when the 
> > application throws any exception, it is causing the following exception 
> > in the log file.  Has anyone encounter this problem?
> > 
> > Thanks!
> > Tat
> > 
> > org.apache.hivemind.ApplicationRuntimeException: Property delegate has 
> > already been claimed by a different enhancement worker.
> >     at 
> >
>
org.apache.tapestry.enhance.EnhancementOperationImpl.claimProperty(Enhanceme
> ntOperationImpl.java:241)
> >     at 
> >
>
org.apache.tapestry.enhance.ParameterPropertyWorker.addParameter(ParameterPr
> opertyWorker.java:117)
> >     at 
> >
>
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
> eterPropertyWorker.java:81)
> >     at 
> >
>
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
> eterPropertyWorker.java:53)
> >     at 
> >
>
$EnhancementWorker_10b103b1964.performEnhancement($EnhancementWorker_10b103b
> 1964.java)
> >     at 
> >
>
$EnhancementWorker_10b103b197c.performEnhancement($EnhancementWorker_10b103b
> 197c.java)
> >     at 
> >
>
$EnhancementWorker_10b103b195a.performEnhancement($EnhancementWorker_10b103b
> 195a.java)
> >     at 
> >
>
org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getCompone
> ntConstructor(ComponentConstructorFactoryImpl.java:97)
> >     at 
> >
>
$ComponentConstructorFactory_10b103b1947.getComponentConstructor($ComponentC
> onstructorFactory_10b103b1947.java)
> >     at 
> >
>
org.apache.tapestry.pageload.PageLoader.instantiateComponent(PageLoader.java
> :531)
> >     at 
> >
>
org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.j
> ava:481)
> >     at 
> >
>
$IPageLoader_10b103b1937.createImplicitComponent($IPageLoader_10b103b1937.ja
> va)
> >     at 
> >
>
$IPageLoader_10b103b1938.createImplicitComponent($IPageLoader_10b103b1938.ja
> va)
> >     at 
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.createImplici
> tComponent(ComponentTemplateLoaderLogic.java:218)
> >     at 
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
> nentTemplateLoaderLogic.java:172)
> >     at 
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
> nentTemplateLoaderLogic.java:111)
> >     at 
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.loadTemplate(
> ComponentTemplateLoaderLogic.java:88)
> >     at 
> >
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderImpl.loadTemplate(C
> omponentTemplateLoaderImpl.java:60)
> >     at 
> >
>
$ComponentTemplateLoader_10b103b194b.loadTemplate($ComponentTemplateLoader_1
> 0b103b194b.java)
> >     at 
> >
>
org.apache.tapestry.pageload.PageLoader.loadTemplateForComponent(PageLoader.
> java:648)
> >     at
> > org.apache.tapestry.BaseComponent.readTemplate(BaseComponent.java:77)
> >     at
> > org.apache.tapestry.BaseComponent.finishLoad(BaseComponent.java:107)
> >     at $Exception_7.finishLoad($Exception_7.java)
> >     at 
> >
>
org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:4
> 39)
> >     at
> > org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:613)
> >     at $IPageLoader_10b103b1937.loadPage($IPageLoader_10b103b1937.java)
> >     at $IPageLoader_10b103b1938.loadPage($IPageLoader_10b103b1938.java)
> >     at
> > org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:120)
> >     at $IPageSource_10b103b1897.getPage($IPageSource_10b103b1897.java)
> >     at 
> > org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:268)
> >     at 
> > org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:251)
> >     at 
> >
>
org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionP
> resenterImpl.java:40)
> >     at 
> >
>
$ExceptionPresenter_10b103b18a3.presentException($ExceptionPresenter_10b103b
> 18a3.java)
> >     at 
> >
>
org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngi
> ne.java:121)
> >     at 
> >
> org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:280)
> >     at 
> >
>
org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngin
> eTerminator.java:60)
> >     at 
> >
>
$WebRequestServicer_10b103b1907.service($WebRequestServicer_10b103b1907.java
> )
> >     at 
> >
>
$WebRequestServicer_10b103b1903.service($WebRequestServicer_10b103b1903.java
> )
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> > 
> 
> -- 
> "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
> Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 

-- 
GMX Produkte empfehlen und ganz einfach Geld verdienen!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner

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


RE: Tapernate-Example HiveMindAutowireWorker Problem

Posted by James Carman <ja...@carmanconsulting.com>.
Hmmmm.  That's weird.  But, thanks for the tip.  I've submitted the code as
a patch to Tapestry.  So, I need to figure out how to get it working.  So,
what you're saying is that if the auto-wiring stuff is inside a jar file and
not part of your application's hivemodule.xml file, then it bombs?

-----Original Message-----
From: Mark Lehmacher [mailto:mark.lehmacher@gmx.de] 
Sent: Sunday, May 07, 2006 5:21 PM
To: Tapestry users
Subject: Re: Tapernate-Example HiveMindAutowireWorker Problem
Importance: High

I had that very same problem when I tried to package the Tapernate
auto-wiring stuff in a drop-in jar. It said that one of the parameters of
the Shell component has already been claimed by a different enhancement
worker.

When I just put the service definition and configuration contribution into
my application's "root" module descriptor everything works fine.


> --- Ursprüngliche Nachricht ---
> Von: Tat leung <ta...@comcast.net>
> An: Tapestry users <us...@tapestry.apache.org>
> Betreff: Tapernate-Example HiveMindAutowireWorker Problem
> Datum: Sun, 07 May 2006 12:52:15 -0700
> 
> Hi All,
> 
> I am using Tapernate and HiveMindAutowireWorker and 
> HiveMindAutowireWorkerFactory from the Tapernate example in my 
> applicaiton.  The XML in my hivemind.xml file and the auto-wire classes 
> are taken from the Tapernate example:
> 
>     <service-point id="AutowireWorkerFactory"
>             interface="org.apache.hivemind.ServiceImplementationFactory"
>             parameters-occurs="none">
>         <invoke-factory>
>             <construct 
> class="org.apache.tapestry.enhance.HiveMindAutowireWorkerFactory" />
>         </invoke-factory>
>     </service-point>
> 
>     <service-point id="AutowireWorker" 
> interface="org.apache.tapestry.enhance.EnhancementWorker">
>         <invoke-factory service-id="AutowireWorkerFactory" />
>     </service-point>
> 
>     <contribution configuration-id="tapestry.enhance.EnhancementWorkers">
>         <command before="tapestry.enhance.abstract-property"
>             after="tapestry.enhance.dispatch-inject"
>             id="inject-autowire" object="service:AutowireWorker" />
>     </contribution>
> 
> This is working as expected when there is no exception.  But when the 
> application throws any exception, it is causing the following exception 
> in the log file.  Has anyone encounter this problem?
> 
> Thanks!
> Tat
> 
> org.apache.hivemind.ApplicationRuntimeException: Property delegate has 
> already been claimed by a different enhancement worker.
>     at 
>
org.apache.tapestry.enhance.EnhancementOperationImpl.claimProperty(Enhanceme
ntOperationImpl.java:241)
>     at 
>
org.apache.tapestry.enhance.ParameterPropertyWorker.addParameter(ParameterPr
opertyWorker.java:117)
>     at 
>
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
eterPropertyWorker.java:81)
>     at 
>
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
eterPropertyWorker.java:53)
>     at 
>
$EnhancementWorker_10b103b1964.performEnhancement($EnhancementWorker_10b103b
1964.java)
>     at 
>
$EnhancementWorker_10b103b197c.performEnhancement($EnhancementWorker_10b103b
197c.java)
>     at 
>
$EnhancementWorker_10b103b195a.performEnhancement($EnhancementWorker_10b103b
195a.java)
>     at 
>
org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getCompone
ntConstructor(ComponentConstructorFactoryImpl.java:97)
>     at 
>
$ComponentConstructorFactory_10b103b1947.getComponentConstructor($ComponentC
onstructorFactory_10b103b1947.java)
>     at 
>
org.apache.tapestry.pageload.PageLoader.instantiateComponent(PageLoader.java
:531)
>     at 
>
org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.j
ava:481)
>     at 
>
$IPageLoader_10b103b1937.createImplicitComponent($IPageLoader_10b103b1937.ja
va)
>     at 
>
$IPageLoader_10b103b1938.createImplicitComponent($IPageLoader_10b103b1938.ja
va)
>     at 
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.createImplici
tComponent(ComponentTemplateLoaderLogic.java:218)
>     at 
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
nentTemplateLoaderLogic.java:172)
>     at 
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
nentTemplateLoaderLogic.java:111)
>     at 
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.loadTemplate(
ComponentTemplateLoaderLogic.java:88)
>     at 
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderImpl.loadTemplate(C
omponentTemplateLoaderImpl.java:60)
>     at 
>
$ComponentTemplateLoader_10b103b194b.loadTemplate($ComponentTemplateLoader_1
0b103b194b.java)
>     at 
>
org.apache.tapestry.pageload.PageLoader.loadTemplateForComponent(PageLoader.
java:648)
>     at
> org.apache.tapestry.BaseComponent.readTemplate(BaseComponent.java:77)
>     at
> org.apache.tapestry.BaseComponent.finishLoad(BaseComponent.java:107)
>     at $Exception_7.finishLoad($Exception_7.java)
>     at 
>
org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:4
39)
>     at
> org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:613)
>     at $IPageLoader_10b103b1937.loadPage($IPageLoader_10b103b1937.java)
>     at $IPageLoader_10b103b1938.loadPage($IPageLoader_10b103b1938.java)
>     at
> org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:120)
>     at $IPageSource_10b103b1897.getPage($IPageSource_10b103b1897.java)
>     at 
> org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:268)
>     at 
> org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:251)
>     at 
>
org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionP
resenterImpl.java:40)
>     at 
>
$ExceptionPresenter_10b103b18a3.presentException($ExceptionPresenter_10b103b
18a3.java)
>     at 
>
org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngi
ne.java:121)
>     at 
> org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:280)
>     at 
>
org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngin
eTerminator.java:60)
>     at 
>
$WebRequestServicer_10b103b1907.service($WebRequestServicer_10b103b1907.java
)
>     at 
>
$WebRequestServicer_10b103b1903.service($WebRequestServicer_10b103b1903.java
)
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 

-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

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



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


Re: Tapernate-Example HiveMindAutowireWorker Problem

Posted by Mark Lehmacher <ma...@gmx.de>.
I had that very same problem when I tried to package the Tapernate
auto-wiring stuff in a drop-in jar. It said that one of the parameters of
the Shell component has already been claimed by a different enhancement
worker.

When I just put the service definition and configuration contribution into
my application's "root" module descriptor everything works fine.


> --- Ursprüngliche Nachricht ---
> Von: Tat leung <ta...@comcast.net>
> An: Tapestry users <us...@tapestry.apache.org>
> Betreff: Tapernate-Example HiveMindAutowireWorker Problem
> Datum: Sun, 07 May 2006 12:52:15 -0700
> 
> Hi All,
> 
> I am using Tapernate and HiveMindAutowireWorker and 
> HiveMindAutowireWorkerFactory from the Tapernate example in my 
> applicaiton.  The XML in my hivemind.xml file and the auto-wire classes 
> are taken from the Tapernate example:
> 
>     <service-point id="AutowireWorkerFactory"
>             interface="org.apache.hivemind.ServiceImplementationFactory"
>             parameters-occurs="none">
>         <invoke-factory>
>             <construct 
> class="org.apache.tapestry.enhance.HiveMindAutowireWorkerFactory" />
>         </invoke-factory>
>     </service-point>
> 
>     <service-point id="AutowireWorker" 
> interface="org.apache.tapestry.enhance.EnhancementWorker">
>         <invoke-factory service-id="AutowireWorkerFactory" />
>     </service-point>
> 
>     <contribution configuration-id="tapestry.enhance.EnhancementWorkers">
>         <command before="tapestry.enhance.abstract-property"
>             after="tapestry.enhance.dispatch-inject"
>             id="inject-autowire" object="service:AutowireWorker" />
>     </contribution>
> 
> This is working as expected when there is no exception.  But when the 
> application throws any exception, it is causing the following exception 
> in the log file.  Has anyone encounter this problem?
> 
> Thanks!
> Tat
> 
> org.apache.hivemind.ApplicationRuntimeException: Property delegate has 
> already been claimed by a different enhancement worker.
>     at 
>
org.apache.tapestry.enhance.EnhancementOperationImpl.claimProperty(EnhancementOperationImpl.java:241)
>     at 
>
org.apache.tapestry.enhance.ParameterPropertyWorker.addParameter(ParameterPropertyWorker.java:117)
>     at 
>
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(ParameterPropertyWorker.java:81)
>     at 
>
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(ParameterPropertyWorker.java:53)
>     at 
>
$EnhancementWorker_10b103b1964.performEnhancement($EnhancementWorker_10b103b1964.java)
>     at 
>
$EnhancementWorker_10b103b197c.performEnhancement($EnhancementWorker_10b103b197c.java)
>     at 
>
$EnhancementWorker_10b103b195a.performEnhancement($EnhancementWorker_10b103b195a.java)
>     at 
>
org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getComponentConstructor(ComponentConstructorFactoryImpl.java:97)
>     at 
>
$ComponentConstructorFactory_10b103b1947.getComponentConstructor($ComponentConstructorFactory_10b103b1947.java)
>     at 
>
org.apache.tapestry.pageload.PageLoader.instantiateComponent(PageLoader.java:531)
>     at 
>
org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.java:481)
>     at 
>
$IPageLoader_10b103b1937.createImplicitComponent($IPageLoader_10b103b1937.java)
>     at 
>
$IPageLoader_10b103b1938.createImplicitComponent($IPageLoader_10b103b1938.java)
>     at 
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.createImplicitComponent(ComponentTemplateLoaderLogic.java:218)
>     at 
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(ComponentTemplateLoaderLogic.java:172)
>     at 
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(ComponentTemplateLoaderLogic.java:111)
>     at 
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.loadTemplate(ComponentTemplateLoaderLogic.java:88)
>     at 
>
org.apache.tapestry.services.impl.ComponentTemplateLoaderImpl.loadTemplate(ComponentTemplateLoaderImpl.java:60)
>     at 
>
$ComponentTemplateLoader_10b103b194b.loadTemplate($ComponentTemplateLoader_10b103b194b.java)
>     at 
>
org.apache.tapestry.pageload.PageLoader.loadTemplateForComponent(PageLoader.java:648)
>     at
> org.apache.tapestry.BaseComponent.readTemplate(BaseComponent.java:77)
>     at
> org.apache.tapestry.BaseComponent.finishLoad(BaseComponent.java:107)
>     at $Exception_7.finishLoad($Exception_7.java)
>     at 
>
org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:439)
>     at
> org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:613)
>     at $IPageLoader_10b103b1937.loadPage($IPageLoader_10b103b1937.java)
>     at $IPageLoader_10b103b1938.loadPage($IPageLoader_10b103b1938.java)
>     at
> org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:120)
>     at $IPageSource_10b103b1897.getPage($IPageSource_10b103b1897.java)
>     at 
> org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:268)
>     at 
> org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:251)
>     at 
>
org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionPresenterImpl.java:40)
>     at 
>
$ExceptionPresenter_10b103b18a3.presentException($ExceptionPresenter_10b103b18a3.java)
>     at 
>
org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngine.java:121)
>     at 
> org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:280)
>     at 
>
org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:60)
>     at 
>
$WebRequestServicer_10b103b1907.service($WebRequestServicer_10b103b1907.java)
>     at 
>
$WebRequestServicer_10b103b1903.service($WebRequestServicer_10b103b1903.java)
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 

-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

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


RE: Tapernate-Example HiveMindAutowireWorker Problem

Posted by James Carman <ja...@carmanconsulting.com>.
Can you give an example of the property type you're using that causes this
to happen?  All you should be declaring is a "getter" for your property.
Are you sure you're not declaring the property as a "parameter" either in
your component specification or via annotations?

-----Original Message-----
From: Tat leung [mailto:tatleung@comcast.net] 
Sent: Sunday, May 07, 2006 3:52 PM
To: Tapestry users
Subject: Tapernate-Example HiveMindAutowireWorker Problem

Hi All,

I am using Tapernate and HiveMindAutowireWorker and 
HiveMindAutowireWorkerFactory from the Tapernate example in my 
applicaiton.  The XML in my hivemind.xml file and the auto-wire classes 
are taken from the Tapernate example:

    <service-point id="AutowireWorkerFactory"
            interface="org.apache.hivemind.ServiceImplementationFactory"
            parameters-occurs="none">
        <invoke-factory>
            <construct 
class="org.apache.tapestry.enhance.HiveMindAutowireWorkerFactory" />
        </invoke-factory>
    </service-point>

    <service-point id="AutowireWorker" 
interface="org.apache.tapestry.enhance.EnhancementWorker">
        <invoke-factory service-id="AutowireWorkerFactory" />
    </service-point>

    <contribution configuration-id="tapestry.enhance.EnhancementWorkers">
        <command before="tapestry.enhance.abstract-property"
            after="tapestry.enhance.dispatch-inject"
            id="inject-autowire" object="service:AutowireWorker" />
    </contribution>

This is working as expected when there is no exception.  But when the 
application throws any exception, it is causing the following exception 
in the log file.  Has anyone encounter this problem?

Thanks!
Tat

org.apache.hivemind.ApplicationRuntimeException: Property delegate has 
already been claimed by a different enhancement worker.
    at 
org.apache.tapestry.enhance.EnhancementOperationImpl.claimProperty(Enhanceme
ntOperationImpl.java:241)
    at 
org.apache.tapestry.enhance.ParameterPropertyWorker.addParameter(ParameterPr
opertyWorker.java:117)
    at 
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
eterPropertyWorker.java:81)
    at 
org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param
eterPropertyWorker.java:53)
    at 
$EnhancementWorker_10b103b1964.performEnhancement($EnhancementWorker_10b103b
1964.java)
    at 
$EnhancementWorker_10b103b197c.performEnhancement($EnhancementWorker_10b103b
197c.java)
    at 
$EnhancementWorker_10b103b195a.performEnhancement($EnhancementWorker_10b103b
195a.java)
    at 
org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getCompone
ntConstructor(ComponentConstructorFactoryImpl.java:97)
    at 
$ComponentConstructorFactory_10b103b1947.getComponentConstructor($ComponentC
onstructorFactory_10b103b1947.java)
    at 
org.apache.tapestry.pageload.PageLoader.instantiateComponent(PageLoader.java
:531)
    at 
org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.j
ava:481)
    at 
$IPageLoader_10b103b1937.createImplicitComponent($IPageLoader_10b103b1937.ja
va)
    at 
$IPageLoader_10b103b1938.createImplicitComponent($IPageLoader_10b103b1938.ja
va)
    at 
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.createImplici
tComponent(ComponentTemplateLoaderLogic.java:218)
    at 
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
nentTemplateLoaderLogic.java:172)
    at 
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo
nentTemplateLoaderLogic.java:111)
    at 
org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.loadTemplate(
ComponentTemplateLoaderLogic.java:88)
    at 
org.apache.tapestry.services.impl.ComponentTemplateLoaderImpl.loadTemplate(C
omponentTemplateLoaderImpl.java:60)
    at 
$ComponentTemplateLoader_10b103b194b.loadTemplate($ComponentTemplateLoader_1
0b103b194b.java)
    at 
org.apache.tapestry.pageload.PageLoader.loadTemplateForComponent(PageLoader.
java:648)
    at org.apache.tapestry.BaseComponent.readTemplate(BaseComponent.java:77)
    at org.apache.tapestry.BaseComponent.finishLoad(BaseComponent.java:107)
    at $Exception_7.finishLoad($Exception_7.java)
    at 
org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:4
39)
    at org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:613)
    at $IPageLoader_10b103b1937.loadPage($IPageLoader_10b103b1937.java)
    at $IPageLoader_10b103b1938.loadPage($IPageLoader_10b103b1938.java)
    at org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:120)
    at $IPageSource_10b103b1897.getPage($IPageSource_10b103b1897.java)
    at 
org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:268)
    at 
org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:251)
    at 
org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionP
resenterImpl.java:40)
    at 
$ExceptionPresenter_10b103b18a3.presentException($ExceptionPresenter_10b103b
18a3.java)
    at 
org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngi
ne.java:121)
    at 
org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:280)
    at 
org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngin
eTerminator.java:60)
    at 
$WebRequestServicer_10b103b1907.service($WebRequestServicer_10b103b1907.java
)
    at 
$WebRequestServicer_10b103b1903.service($WebRequestServicer_10b103b1903.java
)


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



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