You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jan Normann Nielsen <li...@dubbekarl.dk> on 2006/09/07 16:36:26 UTC

Strange component parameter issues with annotations

Hi

I'm currently writing a Tapestry web application using Tapestry 4.0.2 
under Tomcat 5.5.18 and JDK 1.5.0_08.

The situation is:

Page 1: Contains "Iframe page 1" and "Iframe page 2" as iframes.
Iframe page 1: Contains "Component 1"
Iframe page 2: Contains "Component 2"

All these pages, iframes and components have been created by me by hand 
in Java with annotations. Each of the iframe pages render render fine if 
I ask for their links directly, but when I render "Page 1", strange 
errors occur. Most of the errors reported seem to be problems with 
handling annotations on the included components and they state that I 
have declared the parameters multiple times. That is not the case here, 
and the exact Tapestry error also tells me that the place of wrong 
annotation is the same place where it is declared.

An example:

Caused by: ognl.OgnlException: historicCustomerPage
[org.apache.hivemind.ApplicationRuntimeException:
Error: An error occured processing annotation
@org.apache.tapestry.annotations.Parameter(cache=true, defaultValue=, 
required=true, name=, aliases=) of public abstract java.text.DateFormat 
tapestry.pages.customer.CustomerComponent.getDateFormat():
Parameter dateFormat has already been declared
(at Annotation @org.apache.tapestry.annotations.Parameter(cache=true, 
defaultValue=, required=true, name=, aliases=) of public abstract 
java.text.DateFormat 
tapestry.pages.customer.CustomerComponent.getDateFormat()).
[Annotation @org.apache.tapestry.annotations.Parameter(cache=true, 
defaultValue=, required=true, name=, aliases=) of public abstract 
java.text.DateFormat 
tapestry.pages.customer.CustomerComponent.getDateFormat()]
]

In my CustomerComponent class, the parameter has been declared with:

    /**
     * @return The parameter.
     */
    @Parameter(required = true)
    public abstract DateFormat getDateFormat();

I this is not a lot of information to go by, but my application is quite 
big and this is what I have narrowed the problem down to. I have a 
feeling that this might be some sort of concurrency issue within 
Tapestry, mostly because each of the iframes render fine on their own, 
and I am almost sure there were no errors at the time we used XML files 
for page/component specs.

Does anyone have an idea what the problem is and what I do work around 
it? It's really a show-stopper for me.

Best wishes,
Jan Nielsen

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


Re: Strange component parameter issues with annotations

Posted by andyhot <an...@di.uoa.gr>.
I like using the reset service, instead of disabling cache.
This way i can control when the templates+xml are reloaded.

I simply have a tab opened at
http://127.0.0.1:9090/app?service=reset&page=Home
and refresh it whenever i want changes to be reloaded.

See http://tapestry.apache.org/tapestry4/UsersGuide/configuration.html
for how to enable it.


Jan Normann Nielsen wrote:
> Jan Normann Nielsen skrev:
>> Hi
>>
>> I'm currently writing a Tapestry web application using Tapestry 4.0.2
>> under Tomcat 5.5.18 and JDK 1.5.0_08.
>>
> [bla-bla - snip]
>> I this is not a lot of information to go by, but my application is
>> quite big and this is what I have narrowed the problem down to. I
>> have a feeling that this might be some sort of concurrency issue
>> within Tapestry, mostly because each of the iframes render fine on
>> their own, and I am almost sure there were no errors at the time we
>> used XML files for page/component specs.
>>
>> Does anyone have an idea what the problem is and what I do work
>> around it? It's really a show-stopper for me.
>>
>> Best wishes,
>> Jan Nielsen
>>
> I probably should have Googled for my problem before posting to this
> list, anyway I've found out what the problem is: It's issue 848 and by
> not running with disable-caching on seemed to fix the problem.
>
> Anyway, having to reload the application on every change slows down
> development speed, so it would be nice if anyone had a better
> solution. Are there any plans to work on this issue?
>
> Best wishes,
> Jan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


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


Re: Strange component parameter issues with annotations

Posted by Jan Normann Nielsen <li...@dubbekarl.dk>.
Jan Normann Nielsen skrev:
> Hi
>
> I'm currently writing a Tapestry web application using Tapestry 4.0.2 
> under Tomcat 5.5.18 and JDK 1.5.0_08.
>
[bla-bla - snip]
> I this is not a lot of information to go by, but my application is 
> quite big and this is what I have narrowed the problem down to. I have 
> a feeling that this might be some sort of concurrency issue within 
> Tapestry, mostly because each of the iframes render fine on their own, 
> and I am almost sure there were no errors at the time we used XML 
> files for page/component specs.
>
> Does anyone have an idea what the problem is and what I do work around 
> it? It's really a show-stopper for me.
>
> Best wishes,
> Jan Nielsen
>
I probably should have Googled for my problem before posting to this 
list, anyway I've found out what the problem is: It's issue 848 and by 
not running with disable-caching on seemed to fix the problem.

Anyway, having to reload the application on every change slows down 
development speed, so it would be nice if anyone had a better solution. 
Are there any plans to work on this issue?

Best wishes,
Jan

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


Re: Strange component parameter issues with annotations

Posted by andyhot <an...@di.uoa.gr>.
Do you have org.apache.tapestry.disable-caching set to true ?



Jan Normann Nielsen wrote:
> Hi
>
> I'm currently writing a Tapestry web application using Tapestry 4.0.2
> under Tomcat 5.5.18 and JDK 1.5.0_08.
>
> The situation is:
>
> Page 1: Contains "Iframe page 1" and "Iframe page 2" as iframes.
> Iframe page 1: Contains "Component 1"
> Iframe page 2: Contains "Component 2"
>
> All these pages, iframes and components have been created by me by
> hand in Java with annotations. Each of the iframe pages render render
> fine if I ask for their links directly, but when I render "Page 1",
> strange errors occur. Most of the errors reported seem to be problems
> with handling annotations on the included components and they state
> that I have declared the parameters multiple times. That is not the
> case here, and the exact Tapestry error also tells me that the place
> of wrong annotation is the same place where it is declared.
>
> An example:
>
> Caused by: ognl.OgnlException: historicCustomerPage
> [org.apache.hivemind.ApplicationRuntimeException:
> Error: An error occured processing annotation
> @org.apache.tapestry.annotations.Parameter(cache=true, defaultValue=,
> required=true, name=, aliases=) of public abstract
> java.text.DateFormat
> tapestry.pages.customer.CustomerComponent.getDateFormat():
> Parameter dateFormat has already been declared
> (at Annotation @org.apache.tapestry.annotations.Parameter(cache=true,
> defaultValue=, required=true, name=, aliases=) of public abstract
> java.text.DateFormat
> tapestry.pages.customer.CustomerComponent.getDateFormat()).
> [Annotation @org.apache.tapestry.annotations.Parameter(cache=true,
> defaultValue=, required=true, name=, aliases=) of public abstract
> java.text.DateFormat
> tapestry.pages.customer.CustomerComponent.getDateFormat()]
> ]
>
> In my CustomerComponent class, the parameter has been declared with:
>
>    /**
>     * @return The parameter.
>     */
>    @Parameter(required = true)
>    public abstract DateFormat getDateFormat();
>
> I this is not a lot of information to go by, but my application is
> quite big and this is what I have narrowed the problem down to. I have
> a feeling that this might be some sort of concurrency issue within
> Tapestry, mostly because each of the iframes render fine on their own,
> and I am almost sure there were no errors at the time we used XML
> files for page/component specs.
>
> Does anyone have an idea what the problem is and what I do work around
> it? It's really a show-stopper for me.
>
> Best wishes,
> Jan Nielsen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


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