You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Anastasios Angelidis <vo...@videotron.ca> on 2005/03/09 04:47:28 UTC

Can some explain this exception...

The exception is below... But first the situation...

I have my home page...

On my home page I have a @DirectLink that invokes a newArtist listener. 
The listener creates a new instance of my "Artist" and passes it along 
to the next page, which is my edit page like so:

    public void newArtist(IRequestCycle cycle)
    {
        Edit nextPage = (Edit) cycle.getPage("Artist/Edit");
       
        System.out.println("Here...");
       
        Artist artist = new Artist();
       
        nextPage.setArtist(artist);
        cycle.activate(nextPage);
    }

My Edit form apears no problem...
I leave the name field empty and press Submit. My edit page listener 
gets invoked and validation happens... My name field becomes red. We are 
happy!
Now I enter a value and click submit and voila, the page break :|

I added a break point in the listener, when validation happens, the app 
blocks at the break point. If there is some data in the field 
thelistebner never gets called...



Unable to update expression 'artist.name' for 
com.mamoth.pages.artist.Edit$Enhance_8@1dbc144[Artist/Edit] to ddddd.
binding: 	ExpressionBinding[Artist/Edit artist.name]
location: 	context:/WEB-INF/Artist/Edit.page, line 20, column 54
 
ognl.OgnlException
target is null for setProperty(null, "name", ddddd)
Stack Trace:

    * ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1624)
    * ognl.ASTProperty.setValueBody(ASTProperty.java:105)
    * ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
    * ognl.SimpleNode.setValue(SimpleNode.java:246)
    * ognl.ASTChain.setValueBody(ASTChain.java:172)
    * ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
    * ognl.SimpleNode.setValue(SimpleNode.java:246)
    * ognl.Ognl.setValue(Ognl.java:476)
    * org.apache.tapestry.binding.ExpressionBinding.setObject(ExpressionBinding.java:553)

    * org.apache.tapestry.valid.ValidField$Enhance_9.setValue(ValidField$Enhance_9.java)

    * org.apache.tapestry.valid.ValidField.updateValue(ValidField.java:193)
    * org.apache.tapestry.form.AbstractTextField.renderComponent(AbstractTextField.java:68)

    * org.apache.tapestry.valid.ValidField.renderComponent(ValidField.java:88)

    * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)

    * org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:624)

    * org.apache.tapestry.form.Form.renderComponent(Form.java:362)
    * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)

    * org.apache.tapestry.form.Form.rewind(Form.java:568)
    * org.apache.tapestry.engine.RequestCycle.rewindForm(RequestCycle.java:432)

    * org.apache.tapestry.form.Form.trigger(Form.java:582)
    * org.apache.tapestry.engine.DirectService.service(DirectService.java:169)

    * org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:872)

    * org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:197)

    * org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:326)

    * javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    * javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    * org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)

    * org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

    * org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)

    * org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)

    * org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

    * org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)

    * org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

    * org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

    * org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)

    * org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)

    * org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

    * org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:44)

    * org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

    * org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)

    * org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

    * org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:169)

    * org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

    * org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

    * org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)

    * org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

    * org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)

    * org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

    * org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

    * org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

    * org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

    * org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

    * org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
    * org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)

    * org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)

    * org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)

    * org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)

    * org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)

    * java.lang.Thread.run(Thread.java:534)



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


Re: Can some explain this exception...

Posted by Anastasios Angelidis <vo...@videotron.ca>.
Anastasios Angelidis wrote:

> Ok I see... it's because I did this on one of my "register" page with 
> out setting the property to persistent and it works. So then I just 
> reused the code and voila the error... I figure I should set the 
> property of the edit page to 

Sorry the property of the "register" page to persistent...

> persitent as well, for proper use?
>
> How would I go about making the forms non persitent? Any link will be 
> fine...
>
> Bryan Lewis wrote:
>
>> Well, it isn't really a matter of how it was passed.  Even if the 
>> object had
>> been created entirely within the same page, it would still need to be
>> persistent if you want it to live through repeated invocations of the 
>> page.
>>
>> It's good practice to disable Tapestry's caching during development, at
>> least part of the time, to smoke out persistence problems.  Sometimes
>> non-persistent properties will appear to work correctly (for short 
>> periods
>> of time under light load) because the properties get accidentally 
>> cached.
>> There's a mention of this at 
>> http://jakarta.apache.org/tapestry/faq.html.
>>
>> With caching disabled, test a page by causing it to redraw.  Either 
>> cause a
>> validation error, or play with the browser refresh and back buttons 
>> before
>> hitting submit the second time.
>>
>> There are other ways to make an object hang around than persistent page
>> properties, but it's the easy way.
>>
>>
>>
>> ----- Original Message ----- From: "Anastasios Angelidis" 
>> <vo...@videotron.ca>
>> To: "Tapestry users" <ta...@jakarta.apache.org>
>> Sent: Tuesday, March 08, 2005 11:03 PM
>> Subject: Re: Can some explain this exception...
>>
>>
>>  
>>
>>> So because am creating the instance on theh ome page and then 
>>> passing it
>>> through to the next page... I have to persist it right?
>>>
>>> Bryan Lewis wrote:
>>>
>>>   
>>>
>>>> The second page (Artist/Edit) needs to declare the artist object as a
>>>> persistent page property.  The first time the page is invoked, the 
>>>> artist
>>>> object is freshly created and everything works.  But the second time
>>>>     
>>>
>> (after
>>  
>>
>>>> the validation error and resubmission) the object is no longer 
>>>> there if
>>>>     
>>>
>> it's
>>  
>>
>>>> not persistent.
>>>>
>>>> This hypothesis is consistent with the message 'OgnlException 
>>>> target is
>>>>     
>>>
>> null
>>  
>>
>>>> for setProperty(null, "name", ddddd)'.  It's saying that the page 
>>>> tried
>>>>     
>>>
>> to
>>  
>>
>>>> call setName() on an object that is now null.
>>>>
>>>>
>>>> ----- Original Message ----- From: "Anastasios Angelidis" 
>>>> <vo...@videotron.ca>
>>>> To: "Tapestry users" <ta...@jakarta.apache.org>
>>>> Sent: Tuesday, March 08, 2005 10:47 PM
>>>> Subject: Can some explain this exception...
>>>>
>>>>
>>>>
>>>>
>>>>     
>>>>
>>>>> The exception is below... But first the situation...
>>>>>
>>>>> I have my home page...
>>>>>
>>>>> On my home page I have a @DirectLink that invokes a newArtist 
>>>>> listener.
>>>>> The listener creates a new instance of my "Artist" and passes it 
>>>>> along
>>>>> to the next page, which is my edit page like so:
>>>>>
>>>>>   public void newArtist(IRequestCycle cycle)
>>>>>   {
>>>>>       Edit nextPage = (Edit) cycle.getPage("Artist/Edit");
>>>>>
>>>>>       System.out.println("Here...");
>>>>>
>>>>>       Artist artist = new Artist();
>>>>>
>>>>>       nextPage.setArtist(artist);
>>>>>       cycle.activate(nextPage);
>>>>>   }
>>>>>
>>>>> My Edit form apears no problem...
>>>>> I leave the name field empty and press Submit. My edit page listener
>>>>> gets invoked and validation happens... My name field becomes red. 
>>>>> We are
>>>>> happy!
>>>>> Now I enter a value and click submit and voila, the page break :|
>>>>>
>>>>> I added a break point in the listener, when validation happens, 
>>>>> the app
>>>>> blocks at the break point. If there is some data in the field
>>>>> thelistebner never gets called...
>>>>>
>>>>>
>>>>>
>>>>> Unable to update expression 'artist.name' for
>>>>> com.mamoth.pages.artist.Edit$Enhance_8@1dbc144[Artist/Edit] to ddddd.
>>>>> binding: ExpressionBinding[Artist/Edit artist.name]
>>>>> location: context:/WEB-INF/Artist/Edit.page, line 20, column 54
>>>>>
>>>>> ognl.OgnlException
>>>>> target is null for setProperty(null, "name", ddddd)
>>>>> Stack Trace:
>>>>>
>>>>>   * ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1624)
>>>>>   * ognl.ASTProperty.setValueBody(ASTProperty.java:105)
>>>>>   * ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
>>>>>   * ognl.SimpleNode.setValue(SimpleNode.java:246)
>>>>>   * ognl.ASTChain.setValueBody(ASTChain.java:172)
>>>>>   * ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
>>>>>   * ognl.SimpleNode.setValue(SimpleNode.java:246)
>>>>>   * ognl.Ognl.setValue(Ognl.java:476)
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.tapestry.binding.ExpressionBinding.setObject(ExpressionBinding.j 
>>>
>>>   
>>
>> a
>>  
>>
>>>> va:553)
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.tapestry.valid.ValidField$Enhance_9.setValue(ValidField$Enhance_ 
>>>
>>>   
>>
>> 9
>>  
>>
>>>> .java)
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>>> org.apache.tapestry.valid.ValidField.updateValue(ValidField.java:193)
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.tapestry.form.AbstractTextField.renderComponent(AbstractTextFiel 
>>>
>>>   
>>
>> d
>>  
>>
>>>> .java:68)
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>>> org.apache.tapestry.valid.ValidField.renderComponent(ValidField.java:88) 
>>>>
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857) 
>>>>
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:624 
>>>
>>>   
>>
>> )
>>  
>>
>>>>     
>>>>
>>>>>   * org.apache.tapestry.form.Form.renderComponent(Form.java:362)
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857) 
>>>>
>>>>
>>>>
>>>>     
>>>>
>>>>>   * org.apache.tapestry.form.Form.rewind(Form.java:568)
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>>> org.apache.tapestry.engine.RequestCycle.rewindForm(RequestCycle.java:432) 
>>>>
>>>>
>>>>
>>>>     
>>>>
>>>>>   * org.apache.tapestry.form.Form.trigger(Form.java:582)
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>>> org.apache.tapestry.engine.DirectService.service(DirectService.java:169) 
>>>>
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:872) 
>>>
>>>   
>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:19 
>>>
>>>   
>>
>> 7
>>  
>>
>>>> )
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:326) 
>>>
>>>   
>>>
>>>>     
>>>>
>>>>>   * javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>>>>>   * javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio 
>>>
>>>   
>>
>> n
>>  
>>
>>>> FilterChain.java:237)
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC 
>>>
>>>   
>>
>> h
>>  
>>
>>>> ain.java:157)
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.j 
>>>
>>>   
>>
>> a
>>  
>>
>>>> va:75)
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio 
>>>
>>>   
>>
>> n
>>  
>>
>>>> FilterChain.java:186)
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC 
>>>
>>>   
>>
>> h
>>  
>>
>>>> ain.java:157)
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j 
>>>
>>>   
>>
>> a
>>  
>>
>>>> va:214)
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte 
>>>
>>>   
>>
>> x
>>  
>>
>>>> t.java:104)
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) 
>>>
>>>   
>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContex 
>>>
>>>   
>>
>> t
>>  
>>
>>>> Valve.java:198)
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j 
>>>
>>>   
>>
>> a
>>  
>>
>>>> va:152)
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte 
>>>
>>>   
>>
>> x
>>  
>>
>>>> t.java:104)
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalVa 
>>>
>>>   
>>
>> l
>>  
>>
>>>> ve.java:44)
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte 
>>>
>>>   
>>
>> x
>>  
>>
>>>> t.java:102)
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBas 
>>>
>>>   
>>
>> e
>>  
>>
>>>> .java:540)
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte 
>>>
>>>   
>>
>> x
>>  
>>
>>>> t.java:102)
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssoc 
>>>
>>>   
>>
>> i
>>  
>>
>>>> ationValve.java:169)
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte 
>>>
>>>   
>>
>> x
>>  
>>
>>>> t.java:102)
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) 
>>>
>>>   
>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:13 
>>>
>>>   
>>
>> 7
>>  
>>
>>>> )
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte 
>>>
>>>   
>>
>> x
>>  
>>
>>>> t.java:104)
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:11 
>>>
>>>   
>>
>> 8
>>  
>>
>>>> )
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte 
>>>
>>>   
>>
>> x
>>  
>>
>>>> t.java:102)
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) 
>>>
>>>   
>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav 
>>>
>>>   
>>
>> a
>>  
>>
>>>> :109)
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte 
>>>
>>>   
>>
>> x
>>  
>>
>>>> t.java:104)
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) 
>>>
>>>   
>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>>> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) 
>>>>
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) 
>>>
>>>   
>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConn 
>>>
>>>   
>>
>> e
>>  
>>
>>>> ction(Http11Protocol.java:705)
>>>>
>>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) 
>>>
>>>   
>>>
>>>>     
>>>>
>>>>>   *
>>>>>
>>>>>
>>>>>       
>>>>
>>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.ja 
>>>
>>>   
>>
>> v
>>  
>>
>>>> a:683)
>>>>
>>>>
>>>>     
>>>>
>>>>>   * java.lang.Thread.run(Thread.java:534)
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>>> For additional commands, e-mail: 
>>>>> tapestry-user-help@jakarta.apache.org
>>>>>
>>>>>
>>>>>
>>>>>       
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>>
>>>>     
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>
>>>   
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>>  
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


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


Re: beginPageRender not called!? :|

Posted by Hanson Char <ha...@gmail.com>.
Home needs to implement PageRenderListener for the pageBeningRender
method to be invoked.

H


On Fri, 11 Mar 2005 01:55:28 -0500, Anastasios Angelidis
<vo...@videotron.ca> wrote:
> This is my implentation...
> 
> Am using JBoss and JBoss IDE, I put a break point in the
> beginPageRender(), even the System.out.println is not showing in the
> concole output...
> 
> Am running JBoss4-.0.0 with Tapestry 3.0.2 and friend URL fix. Thepage
> itself renders and the other listeners methods work... Am sure my break
> points work also cause I have used enough to test things out ion eclipse! :P
> 
> So what's the deal?
> 
> Thanks
> 
> public abstract class Home extends BasePage
> {
>     public abstract void setArtist(Artist artist);
>     public abstract Artist getArtist();
> 
>     public List getArtistList()
>     {
>         ...
>     }
> 
>     public void editArtist(IRequestCycle cycle)
>     {
>         ...
>     }
> 
>     public void newArtist(IRequestCycle cycle)
>     {
>         ...
>     }
> 
>     /* (non-Javadoc)
>      * @see org.apache.tapestry.IPage#beginPageRender()
>      */
>     public void beginPageRender()
>     {
>         // TODO Auto-generated method stub
>         super.beginPageRender();
> 
>         System.out.println("Hello");
>     }
> }
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
>

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


Re: Setting up custom selection model...

Posted by Anastasios Angelidis <vo...@videotron.ca>.
Bassically when my form gets rendered I would like to load my music 
genre list in a drop down and if my artist has already selected his 
music genre, I want the list to display his selected music genre.
I have provided below exactly what am doing. this all works. Except when 
I go back to redit the artist info, thelist is all the way at the top, 
instead of the artist selected genre...

Thanks

My edit.html:
<span jwcid="selectItem"/>

My edit.page
<property-specification name="artist" type="com.mamoth.Artist" 
persistent="yes"/>
<property-specification name="genre" type="com.mamoth.Genre" 
persistent="yes"/>
<property-specification name="genreSelectionModel" 
type="com.mamoth.GenreSelectionModel" persistent="yes"/>

<component id="selectItem" type="PropertySelection">
    <binding name="model" expression="genreSelectionModel"/>
    <binding name="value" expression="genre"/>
</component>           

edit.java:
public void pageBeginRender(PageEvent event)
{    
    System.out.println(getGenre().getGenre());

    if(getGenreSelectionModel() == null)
    {
        Global global = (Global)getGlobal();
        GenreDAO genreDAO = global.getGenreDAO();
   
        setGenreSelectionModel(new 
GenreSelectionModel(genreDAO.getGenreList()));
    }
}

Listener in home.java:
public void editArtist(IRequestCycle cycle)
{
    Edit nextPage = (Edit) cycle.getPage("Artist/Edit");
       
    Global global = (Global)getGlobal();
    ArtistDAO artistDAO = global.getArtistDAO();

    Atist artist = 
artistDAO.getArtistByPrincipal(cycle.getRequestContext().getRequest().getRemoteUser());
       
    nextPage.setArtist(artist);
    nextPage.setGenre(artist.getGenre());
       
    System.out.println(nextPage.getGenre().getGenre());
       
    cycle.activate(nextPage);
}



ron wrote:

> The Model gives the Possible entries.
> The "value" parameter should evaluate to an Object.
> Lets say, you have a property on your page, called 'selected'.
> you use <select jwcid="@PropertySelection" model="..." 
> value="ognl:selected"/>
>
> The 'selected' property of your page will be read and changed 
> automatically by Taps.
> Cheers,
> Ron
>
>
>
> Anastasios Angelidis:
>
>> There is no setter methods?
>>
>> Or can I just implement my own setter method?
>>
>>
>> Hanson Char wrote:
>>
>>>> But how do I set up a selected option?
>>>>   
>>>
>>>
>>>
>>> How about setting the "value" of your PropertySelection to the object
>>> that corresponds to the selected option.
>>>
>>> H
>>>
>>>
>>> On Sun, 13 Mar 2005 00:49:19 -0500, Anastasios Angelidis
>>> <vo...@videotron.ca> wrote:
>>>  
>>>
>>>> Never mind I understand how it works now...
>>>>
>>>> But how do I set up a selected option?
>>>>
>>>> Thanks
>>>>
>>>>
>>>> Anastasios Angelidis wrote:
>>>>
>>>>  
>>>>
>>>>> I managed to implement the IPropertySelectionModel and it's populated
>>>>> from the database...
>>>>>
>>>>> But how can I set the value to my own Id so I can match a label with
>>>>> an Id from the db?
>>>>>
>>>>> Thanks
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>>> For additional commands, e-mail: 
>>>>> tapestry-user-help@jakarta.apache.org
>>>>>
>>>>>
>>>>>     
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>>
>>>>
>>>>   
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>
>>>
>>>  
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


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


Re: Setting up custom selection model...

Posted by ron <ro...@gmx.net>.
The Model gives the Possible entries.
The "value" parameter should evaluate to an Object.
Lets say, you have a property on your page, called 'selected'.
you use <select jwcid="@PropertySelection" model="..." 
value="ognl:selected"/>

The 'selected' property of your page will be read and changed 
automatically by Taps.
Cheers,
Ron



 Anastasios Angelidis:

> There is no setter methods?
>
> Or can I just implement my own setter method?
>
>
> Hanson Char wrote:
>
>>> But how do I set up a selected option?
>>>   
>>
>>
>> How about setting the "value" of your PropertySelection to the object
>> that corresponds to the selected option.
>>
>> H
>>
>>
>> On Sun, 13 Mar 2005 00:49:19 -0500, Anastasios Angelidis
>> <vo...@videotron.ca> wrote:
>>  
>>
>>> Never mind I understand how it works now...
>>>
>>> But how do I set up a selected option?
>>>
>>> Thanks
>>>
>>>
>>> Anastasios Angelidis wrote:
>>>
>>>   
>>>
>>>> I managed to implement the IPropertySelectionModel and it's populated
>>>> from the database...
>>>>
>>>> But how can I set the value to my own Id so I can match a label with
>>>> an Id from the db?
>>>>
>>>> Thanks
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>>
>>>>
>>>>     
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>
>>>
>>>   
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>>  
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


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


Re: Setting up custom selection model...

Posted by Anastasios Angelidis <vo...@videotron.ca>.
There is no setter methods?

Or can I just implement my own setter method?


Hanson Char wrote:

>>But how do I set up a selected option?
>>    
>>
>
>How about setting the "value" of your PropertySelection to the object
>that corresponds to the selected option.
>
>H
>
>
>On Sun, 13 Mar 2005 00:49:19 -0500, Anastasios Angelidis
><vo...@videotron.ca> wrote:
>  
>
>>Never mind I understand how it works now...
>>
>>But how do I set up a selected option?
>>
>>Thanks
>>
>>
>>Anastasios Angelidis wrote:
>>
>>    
>>
>>>I managed to implement the IPropertySelectionModel and it's populated
>>>from the database...
>>>
>>>But how can I set the value to my own Id so I can match a label with
>>>an Id from the db?
>>>
>>>Thanks
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>  
>


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


Re: Setting up custom selection model...

Posted by Hanson Char <ha...@gmail.com>.
> But how do I set up a selected option?

How about setting the "value" of your PropertySelection to the object
that corresponds to the selected option.

H


On Sun, 13 Mar 2005 00:49:19 -0500, Anastasios Angelidis
<vo...@videotron.ca> wrote:
> Never mind I understand how it works now...
> 
> But how do I set up a selected option?
> 
> Thanks
> 
> 
> Anastasios Angelidis wrote:
> 
> > I managed to implement the IPropertySelectionModel and it's populated
> > from the database...
> >
> > But how can I set the value to my own Id so I can match a label with
> > an Id from the db?
> >
> > Thanks
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
>

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


Re: Setting up custom selection model...

Posted by Anastasios Angelidis <vo...@videotron.ca>.
Never mind I understand how it works now...

But how do I set up a selected option?

Thanks


Anastasios Angelidis wrote:

> I managed to implement the IPropertySelectionModel and it's populated 
> from the database...
>
> But how can I set the value to my own Id so I can match a label with 
> an Id from the db?
>
> Thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


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


Setting up custom selection model...

Posted by Anastasios Angelidis <vo...@videotron.ca>.
I managed to implement the IPropertySelectionModel and it's populated 
from the database...

But how can I set the value to my own Id so I can match a label with an 
Id from the db?

Thanks

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


RE: beginPageRender not called!? :|

Posted by Joerg Latteier <la...@online.de>.
For pre-page-render initialisations, I use the PageRenderListener interface 
and the beginRender event, that works fine. Try


public abstract class Home extends BasePage implements PageRenderListener {
...

  //
  public void pageBeginRender(PageEvent event) {
	System.out.println("Hello");    
  }

  //
  public void pageEndRender(PageEvent event) {
  }

}

Joerg
   

>> -----Original Message-----
>> From: Anastasios Angelidis [mailto:voodoo@videotron.ca] 
>> Sent: Friday, March 11, 2005 7:55 AM
>> To: Tapestry users
>> Subject: beginPageRender not called!? :|
>> 
>> This is my implentation...
>> 
>> Am using JBoss and JBoss IDE, I put a break point in the 
>> beginPageRender(), even the System.out.println is not showing in the 
>> concole output...
>> 
>> Am running JBoss4-.0.0 with Tapestry 3.0.2 and friend URL 
>> fix. Thepage 
>> itself renders and the other listeners methods work... Am 
>> sure my break 
>> points work also cause I have used enough to test things out 
>> ion eclipse! :P
>> 
>> So what's the deal?
>> 
>> Thanks
>> 
>> public abstract class Home extends BasePage
>> {
>>     public abstract void setArtist(Artist artist);
>>     public abstract Artist getArtist();
>>    
>>     public List getArtistList()
>>     {       
>>         ...
>>     }   
>> 
>>     public void editArtist(IRequestCycle cycle)
>>     {
>>         ...
>>     }   
>>    
>>     public void newArtist(IRequestCycle cycle)
>>     {
>>         ...
>>     }
>>    
>>     /* (non-Javadoc)
>>      * @see org.apache.tapestry.IPage#beginPageRender()
>>      */
>>     public void beginPageRender()
>>     {
>>         // TODO Auto-generated method stub
>>         super.beginPageRender();
>>        
>>         System.out.println("Hello");
>>     }
>> }
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: 
>> tapestry-user-help@jakarta.apache.org
>> 
>> 


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


beginPageRender not called!? :|

Posted by Anastasios Angelidis <vo...@videotron.ca>.
This is my implentation...

Am using JBoss and JBoss IDE, I put a break point in the 
beginPageRender(), even the System.out.println is not showing in the 
concole output...

Am running JBoss4-.0.0 with Tapestry 3.0.2 and friend URL fix. Thepage 
itself renders and the other listeners methods work... Am sure my break 
points work also cause I have used enough to test things out ion eclipse! :P

So what's the deal?

Thanks

public abstract class Home extends BasePage
{
    public abstract void setArtist(Artist artist);
    public abstract Artist getArtist();
   
    public List getArtistList()
    {       
        ...
    }   

    public void editArtist(IRequestCycle cycle)
    {
        ...
    }   
   
    public void newArtist(IRequestCycle cycle)
    {
        ...
    }
   
    /* (non-Javadoc)
     * @see org.apache.tapestry.IPage#beginPageRender()
     */
    public void beginPageRender()
    {
        // TODO Auto-generated method stub
        super.beginPageRender();
       
        System.out.println("Hello");
    }
}

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


Re: Can some explain this exception...

Posted by Bryan Lewis <br...@maine.rr.com>.
> How would I go about making the forms non persitent?

I assume you're asking how to avoid using persistent page properties.  I
think many of us have been down that path.  After trying a few things you'll
realize that persistent page properties are the easy way.

I don't have a single handy link to give, but a couple of other options are:

Doing the persistence yourself in your java code, making the object an
instance variable in your page class.  The old Developer's Guide talked
about this.

Saving the object in a Hidden component.  See the Component Reference and
this recent discussion in the list:
http://marc.theaimsgroup.com/?l=tapestry-user&m=110919104311210&w=2



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


Re: Can some explain this exception...

Posted by Anastasios Angelidis <vo...@videotron.ca>.
Ok I see... it's because I did this on one of my "register" page with 
out setting the property to persistent and it works. So then I just 
reused the code and voila the error... I figure I should set the 
property of the edit page to persitent as well, for proper use?

How would I go about making the forms non persitent? Any link will be 
fine...

Bryan Lewis wrote:

>Well, it isn't really a matter of how it was passed.  Even if the object had
>been created entirely within the same page, it would still need to be
>persistent if you want it to live through repeated invocations of the page.
>
>It's good practice to disable Tapestry's caching during development, at
>least part of the time, to smoke out persistence problems.  Sometimes
>non-persistent properties will appear to work correctly (for short periods
>of time under light load) because the properties get accidentally cached.
>There's a mention of this at http://jakarta.apache.org/tapestry/faq.html.
>
>With caching disabled, test a page by causing it to redraw.  Either cause a
>validation error, or play with the browser refresh and back buttons before
>hitting submit the second time.
>
>There are other ways to make an object hang around than persistent page
>properties, but it's the easy way.
>
>
>
>----- Original Message ----- 
>From: "Anastasios Angelidis" <vo...@videotron.ca>
>To: "Tapestry users" <ta...@jakarta.apache.org>
>Sent: Tuesday, March 08, 2005 11:03 PM
>Subject: Re: Can some explain this exception...
>
>
>  
>
>>So because am creating the instance on theh ome page and then passing it
>>through to the next page... I have to persist it right?
>>
>>Bryan Lewis wrote:
>>
>>    
>>
>>>The second page (Artist/Edit) needs to declare the artist object as a
>>>persistent page property.  The first time the page is invoked, the artist
>>>object is freshly created and everything works.  But the second time
>>>      
>>>
>(after
>  
>
>>>the validation error and resubmission) the object is no longer there if
>>>      
>>>
>it's
>  
>
>>>not persistent.
>>>
>>>This hypothesis is consistent with the message 'OgnlException target is
>>>      
>>>
>null
>  
>
>>>for setProperty(null, "name", ddddd)'.  It's saying that the page tried
>>>      
>>>
>to
>  
>
>>>call setName() on an object that is now null.
>>>
>>>
>>>----- Original Message ----- 
>>>From: "Anastasios Angelidis" <vo...@videotron.ca>
>>>To: "Tapestry users" <ta...@jakarta.apache.org>
>>>Sent: Tuesday, March 08, 2005 10:47 PM
>>>Subject: Can some explain this exception...
>>>
>>>
>>>
>>>
>>>      
>>>
>>>>The exception is below... But first the situation...
>>>>
>>>>I have my home page...
>>>>
>>>>On my home page I have a @DirectLink that invokes a newArtist listener.
>>>>The listener creates a new instance of my "Artist" and passes it along
>>>>to the next page, which is my edit page like so:
>>>>
>>>>   public void newArtist(IRequestCycle cycle)
>>>>   {
>>>>       Edit nextPage = (Edit) cycle.getPage("Artist/Edit");
>>>>
>>>>       System.out.println("Here...");
>>>>
>>>>       Artist artist = new Artist();
>>>>
>>>>       nextPage.setArtist(artist);
>>>>       cycle.activate(nextPage);
>>>>   }
>>>>
>>>>My Edit form apears no problem...
>>>>I leave the name field empty and press Submit. My edit page listener
>>>>gets invoked and validation happens... My name field becomes red. We are
>>>>happy!
>>>>Now I enter a value and click submit and voila, the page break :|
>>>>
>>>>I added a break point in the listener, when validation happens, the app
>>>>blocks at the break point. If there is some data in the field
>>>>thelistebner never gets called...
>>>>
>>>>
>>>>
>>>>Unable to update expression 'artist.name' for
>>>>com.mamoth.pages.artist.Edit$Enhance_8@1dbc144[Artist/Edit] to ddddd.
>>>>binding: ExpressionBinding[Artist/Edit artist.name]
>>>>location: context:/WEB-INF/Artist/Edit.page, line 20, column 54
>>>>
>>>>ognl.OgnlException
>>>>target is null for setProperty(null, "name", ddddd)
>>>>Stack Trace:
>>>>
>>>>   * ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1624)
>>>>   * ognl.ASTProperty.setValueBody(ASTProperty.java:105)
>>>>   * ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
>>>>   * ognl.SimpleNode.setValue(SimpleNode.java:246)
>>>>   * ognl.ASTChain.setValueBody(ASTChain.java:172)
>>>>   * ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
>>>>   * ognl.SimpleNode.setValue(SimpleNode.java:246)
>>>>   * ognl.Ognl.setValue(Ognl.java:476)
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.tapestry.binding.ExpressionBinding.setObject(ExpressionBinding.j
>>    
>>
>a
>  
>
>>>va:553)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.tapestry.valid.ValidField$Enhance_9.setValue(ValidField$Enhance_
>>    
>>
>9
>  
>
>>>.java)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>>org.apache.tapestry.valid.ValidField.updateValue(ValidField.java:193)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.tapestry.form.AbstractTextField.renderComponent(AbstractTextFiel
>>    
>>
>d
>  
>
>>>.java:68)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>>org.apache.tapestry.valid.ValidField.renderComponent(ValidField.java:88)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>>org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:624
>>    
>>
>)
>  
>
>>>      
>>>
>>>>   * org.apache.tapestry.form.Form.renderComponent(Form.java:362)
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>>org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
>>>
>>>
>>>      
>>>
>>>>   * org.apache.tapestry.form.Form.rewind(Form.java:568)
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>>org.apache.tapestry.engine.RequestCycle.rewindForm(RequestCycle.java:432)
>>>
>>>
>>>      
>>>
>>>>   * org.apache.tapestry.form.Form.trigger(Form.java:582)
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>>org.apache.tapestry.engine.DirectService.service(DirectService.java:169)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:872)
>>    
>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:19
>>    
>>
>7
>  
>
>>>)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:326)
>>    
>>
>>>      
>>>
>>>>   * javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>>>>   * javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio
>>    
>>
>n
>  
>
>>>FilterChain.java:237)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC
>>    
>>
>h
>  
>
>>>ain.java:157)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.j
>>    
>>
>a
>  
>
>>>va:75)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio
>>    
>>
>n
>  
>
>>>FilterChain.java:186)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC
>>    
>>
>h
>  
>
>>>ain.java:157)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j
>>    
>>
>a
>  
>
>>>va:214)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
>>    
>>
>x
>  
>
>>>t.java:104)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>>    
>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContex
>>    
>>
>t
>  
>
>>>Valve.java:198)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j
>>    
>>
>a
>  
>
>>>va:152)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
>>    
>>
>x
>  
>
>>>t.java:104)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalVa
>>    
>>
>l
>  
>
>>>ve.java:44)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
>>    
>>
>x
>  
>
>>>t.java:102)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBas
>>    
>>
>e
>  
>
>>>.java:540)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
>>    
>>
>x
>  
>
>>>t.java:102)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssoc
>>    
>>
>i
>  
>
>>>ationValve.java:169)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
>>    
>>
>x
>  
>
>>>t.java:102)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>>    
>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:13
>>    
>>
>7
>  
>
>>>)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
>>    
>>
>x
>  
>
>>>t.java:104)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:11
>>    
>>
>8
>  
>
>>>)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
>>    
>>
>x
>  
>
>>>t.java:102)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>>    
>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav
>>    
>>
>a
>  
>
>>>:109)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
>>    
>>
>x
>  
>
>>>t.java:104)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>>    
>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>>org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
>>    
>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConn
>>    
>>
>e
>  
>
>>>ction(Http11Protocol.java:705)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
>>    
>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.ja
>>    
>>
>v
>  
>
>>>a:683)
>>>
>>>
>>>      
>>>
>>>>   * java.lang.Thread.run(Thread.java:534)
>>>>
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>  
>


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


Re: Can some explain this exception...

Posted by Anastasios Angelidis <vo...@videotron.ca>.
You pass a VM argumanent as follows...

-Dorg.apache.tapestry.disable-caching=true

As stated in the FAQ :P Also it's not a mistake the -D is stuck with the 
org.apache....

Wayne Andersen wrote:

>How do you, disable Tapestry's caching?
>
>Wayne L Andersen
>System Administrator
>Clima-Tech Corporation
>208-947-1849
>
>
>
>-----Original Message-----
>From: Bryan Lewis [mailto:bryan@maine.rr.com]
>Sent: Wednesday, March 09, 2005 8:26 AM
>To: Tapestry users
>Subject: Re: Can some explain this exception...
>
>
>Well, it isn't really a matter of how it was passed.  Even if the object
>had been created entirely within the same page, it would still need to be
>persistent if you want it to live through repeated invocations of the
>page.
>
>It's good practice to disable Tapestry's caching during development, at
>least part of the time, to smoke out persistence problems.  Sometimes
>non-persistent properties will appear to work correctly (for short periods
>of time under light load) because the properties get accidentally cached.
>There's a mention of this at http://jakarta.apache.org/tapestry/faq.html.
>
>With caching disabled, test a page by causing it to redraw.  Either cause
>a validation error, or play with the browser refresh and back buttons
>before hitting submit the second time.
>
>There are other ways to make an object hang around than persistent page
>properties, but it's the easy way.
>
>
>
>----- Original Message -----
>From: "Anastasios Angelidis" <vo...@videotron.ca>
>To: "Tapestry users" <ta...@jakarta.apache.org>
>Sent: Tuesday, March 08, 2005 11:03 PM
>Subject: Re: Can some explain this exception...
>
>
>  
>
>>So because am creating the instance on theh ome page and then passing
>>it through to the next page... I have to persist it right?
>>
>>Bryan Lewis wrote:
>>
>>    
>>
>>>The second page (Artist/Edit) needs to declare the artist object as a
>>>persistent page property.  The first time the page is invoked, the
>>>artist object is freshly created and everything works.  But the
>>>second time
>>>      
>>>
>(after
>  
>
>>>the validation error and resubmission) the object is no longer there
>>>if
>>>      
>>>
>it's
>  
>
>>>not persistent.
>>>
>>>This hypothesis is consistent with the message 'OgnlException target
>>>is
>>>      
>>>
>null
>  
>
>>>for setProperty(null, "name", ddddd)'.  It's saying that the page
>>>tried
>>>      
>>>
>to
>  
>
>>>call setName() on an object that is now null.
>>>
>>>
>>>----- Original Message -----
>>>From: "Anastasios Angelidis" <vo...@videotron.ca>
>>>To: "Tapestry users" <ta...@jakarta.apache.org>
>>>Sent: Tuesday, March 08, 2005 10:47 PM
>>>Subject: Can some explain this exception...
>>>
>>>
>>>
>>>
>>>      
>>>
>>>>The exception is below... But first the situation...
>>>>
>>>>I have my home page...
>>>>
>>>>On my home page I have a @DirectLink that invokes a newArtist
>>>>listener. The listener creates a new instance of my "Artist" and
>>>>passes it along to the next page, which is my edit page like so:
>>>>
>>>>   public void newArtist(IRequestCycle cycle)
>>>>   {
>>>>       Edit nextPage = (Edit) cycle.getPage("Artist/Edit");
>>>>
>>>>       System.out.println("Here...");
>>>>
>>>>       Artist artist = new Artist();
>>>>
>>>>       nextPage.setArtist(artist);
>>>>       cycle.activate(nextPage);
>>>>   }
>>>>
>>>>My Edit form apears no problem...
>>>>I leave the name field empty and press Submit. My edit page listener
>>>>gets invoked and validation happens... My name field becomes red. We
>>>>are happy! Now I enter a value and click submit and voila, the page
>>>>break :|
>>>>
>>>>I added a break point in the listener, when validation happens, the
>>>>app blocks at the break point. If there is some data in the field
>>>>thelistebner never gets called...
>>>>
>>>>
>>>>
>>>>Unable to update expression 'artist.name' for
>>>>com.mamoth.pages.artist.Edit$Enhance_8@1dbc144[Artist/Edit] to
>>>>ddddd.
>>>>binding: ExpressionBinding[Artist/Edit artist.name]
>>>>location: context:/WEB-INF/Artist/Edit.page, line 20, column 54
>>>>
>>>>ognl.OgnlException
>>>>target is null for setProperty(null, "name", ddddd)
>>>>Stack Trace:
>>>>
>>>>   * ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1624)
>>>>   * ognl.ASTProperty.setValueBody(ASTProperty.java:105)
>>>>   * ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
>>>>   * ognl.SimpleNode.setValue(SimpleNode.java:246)
>>>>   * ognl.ASTChain.setValueBody(ASTChain.java:172)
>>>>   * ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
>>>>   * ognl.SimpleNode.setValue(SimpleNode.java:246)
>>>>   * ognl.Ognl.setValue(Ognl.java:476)
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.tapestry.binding.ExpressionBinding.setObject(ExpressionBindi
>>ng.j
>>    
>>
>a
>  
>
>>>va:553)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.tapestry.valid.ValidField$Enhance_9.setValue(ValidField$Enha
>>nce_
>>    
>>
>9
>  
>
>>>.java)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>>org.apache.tapestry.valid.ValidField.updateValue(ValidField.java:193)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.tapestry.form.AbstractTextField.renderComponent(AbstractText
>>Fiel
>>    
>>
>d
>  
>
>>>.java:68)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>>org.apache.tapestry.valid.ValidField.renderComponent(ValidField.java:
>>>88)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>>org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:8
>>>57)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java
>>:624
>>    
>>
>)
>  
>
>>>      
>>>
>>>>   * org.apache.tapestry.form.Form.renderComponent(Form.java:362)
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>>org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:8
>>>57)
>>>
>>>
>>>      
>>>
>>>>   * org.apache.tapestry.form.Form.rewind(Form.java:568)
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>>org.apache.tapestry.engine.RequestCycle.rewindForm(RequestCycle.java:
>>>432)
>>>
>>>
>>>      
>>>
>>>>   * org.apache.tapestry.form.Form.trigger(Form.java:582)
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>>org.apache.tapestry.engine.DirectService.service(DirectService.java:1
>>>69)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:8
>>72)
>>    
>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.jav
>>a:19
>>    
>>
>7
>  
>
>>>)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:3
>>26)
>>    
>>
>>>      
>>>
>>>>   * javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>>>>   * javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
>>atio
>>    
>>
>n
>  
>
>>>FilterChain.java:237)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
>>terC
>>    
>>
>h
>  
>
>>>ain.java:157)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilt
>>er.j
>>    
>>
>a
>  
>
>>>va:75)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
>>atio
>>    
>>
>n
>  
>
>>>FilterChain.java:186)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
>>terC
>>    
>>
>h
>  
>
>>>ain.java:157)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
>>ve.j
>>    
>>
>a
>  
>
>>>va:214)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
>>onte
>>    
>>
>x
>  
>
>>>t.java:104)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
>>520)
>>    
>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
>>ntex
>>    
>>
>t
>  
>
>>>Valve.java:198)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
>>ve.j
>>    
>>
>a
>  
>
>>>va:152)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
>>onte
>>    
>>
>x
>  
>
>>>t.java:104)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincip
>>alVa
>>    
>>
>l
>  
>
>>>ve.java:44)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
>>onte
>>    
>>
>x
>  
>
>>>t.java:102)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticato
>>rBas
>>    
>>
>e
>  
>
>>>.java:540)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
>>onte
>>    
>>
>x
>  
>
>>>t.java:102)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityA
>>ssoc
>>    
>>
>i
>  
>
>>>ationValve.java:169)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
>>onte
>>    
>>
>x
>  
>
>>>t.java:102)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
>>520)
>>    
>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
>>a:13
>>    
>>
>7
>  
>
>>>)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
>>onte
>>    
>>
>x
>  
>
>>>t.java:104)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
>>a:11
>>    
>>
>8
>  
>
>>>)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
>>onte
>>    
>>
>x
>  
>
>>>t.java:102)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
>>520)
>>    
>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
>>.jav
>>    
>>
>a
>  
>
>>>:109)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
>>onte
>>    
>>
>x
>  
>
>>>t.java:104)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
>>520)
>>    
>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>>org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:16
>>>0)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
>>99)
>>    
>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
>>Conn
>>    
>>
>e
>  
>
>>>ction(Http11Protocol.java:705)
>>>
>>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
>>77)
>>    
>>
>>>      
>>>
>>>>   *
>>>>
>>>>
>>>>        
>>>>
>>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
>>l.ja
>>    
>>
>v
>  
>
>>>a:683)
>>>
>>>
>>>      
>>>
>>>>   * java.lang.Thread.run(Thread.java:534)
>>>>
>>>>
>>>>
>>>>--------------------------------------------------------------------
>>>>-
>>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail:
>>>tapestry-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>  
>


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


Re: tapestry inside .net

Posted by "t.n.a." <tn...@sharanet.org>.
Thank you for your comments, Daniel. There's no authentication and the 
.net app is mainly stateless so the session is no problem. As for 
tomcat-.net session exchange you're right, I too don't think there's an 
easy way to make them talk: they are different processes and cannot 
share memory without using an external mechanism (IPC, database, 
whatever). In the meantime, I've managed to make the customer say "fine, 
no problem, make it a separate page" so the interface is going to be 
minimal. Might try frames just to see how it works.

t.n.a.

Daniel Honig wrote:

> Well there are the obvious problems such as authentication and session 
> control, others have asked the same question about PHP....You'd have 
> to be a pretty strong IIS server guy to write the piece of code needed 
> to get the servlet container to share the same session as the asp.net 
> application....I'm not even sure how possible this would be, nor would 
> I have any interest in attempting it.   So if you can live with two 
> totally seperate web applications or figure out a clever way to make 
> the session appear unified even though it isn't, then tapestry may be 
> a good choice.  Others can tell you about using tapestry within 
> frames, but I would not suspect this is would be a  big issue, however 
> I would reccomend that your application does not try to do anything 
> "across frames" but rather you put all the functionality in one 
> frame.  This is ideal for ease of development, but may not be possible 
> depending on your requirements.
>
> -dh
>
> t.n.a. wrote:
>
>> I inherited a relatively small, but a 
>> this-is-how-it's-now-supposed-to-be-done asp.net application which I 
>> have to extend. I'd like to do it using tapestry mostly because this 
>> extension may later grow into a separate web site.
>> It maybe a stupid question, but still: is the separation  between 
>> page frames good enough to run a small tapsetry app inside a frame of 
>> an asp.net application? What kind of problems could or should I 
>> expect? Is it "good enough" if the server running tomcat is in the 
>> same LAN as the .net server or should they be one and the same? These 
>> are not high load pages so CPU and memory load shouldn't be an issue.
>>
>> Tomislav
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>


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


Re: tapestry inside .net

Posted by Daniel Honig <da...@gmail.com>.
Well there are the obvious problems such as authentication and session 
control, others have asked the same question about PHP....You'd have to 
be a pretty strong IIS server guy to write the piece of code needed to 
get the servlet container to share the same session as the asp.net 
application....I'm not even sure how possible this would be, nor would I 
have any interest in attempting it.   So if you can live with two 
totally seperate web applications or figure out a clever way to make the 
session appear unified even though it isn't, then tapestry may be a good 
choice.  Others can tell you about using tapestry within frames, but I 
would not suspect this is would be a  big issue, however I would 
reccomend that your application does not try to do anything "across 
frames" but rather you put all the functionality in one frame.  This is 
ideal for ease of development, but may not be possible depending on your 
requirements.

-dh

t.n.a. wrote:

> I inherited a relatively small, but a 
> this-is-how-it's-now-supposed-to-be-done asp.net application which I 
> have to extend. I'd like to do it using tapestry mostly because this 
> extension may later grow into a separate web site.
> It maybe a stupid question, but still: is the separation  between page 
> frames good enough to run a small tapsetry app inside a frame of an 
> asp.net application? What kind of problems could or should I expect? 
> Is it "good enough" if the server running tomcat is in the same LAN as 
> the .net server or should they be one and the same? These are not high 
> load pages so CPU and memory load shouldn't be an issue.
>
> Tomislav
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


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


tapestry inside .net

Posted by "t.n.a." <tn...@sharanet.org>.
I inherited a relatively small, but a 
this-is-how-it's-now-supposed-to-be-done asp.net application which I 
have to extend. I'd like to do it using tapestry mostly because this 
extension may later grow into a separate web site.
It maybe a stupid question, but still: is the separation  between page 
frames good enough to run a small tapsetry app inside a frame of an 
asp.net application? What kind of problems could or should I expect? Is 
it "good enough" if the server running tomcat is in the same LAN as the 
.net server or should they be one and the same? These are not high load 
pages so CPU and memory load shouldn't be an issue.

Tomislav

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


Re: Can some explain this exception...

Posted by Markus Eberle <ma...@tngtech.com>.
Hi,

add the option
-Dorg.apache.tapestry.disable-caching=true
to your App-Server startup-skript

Cheers,
	Markus
On Wednesday 09 March 2005 16:33, Wayne Andersen wrote:
> How do you, disable Tapestry's caching?
>
> Wayne L Andersen
> System Administrator
> Clima-Tech Corporation
> 208-947-1849
>
>
>
> -----Original Message-----
> From: Bryan Lewis [mailto:bryan@maine.rr.com]
> Sent: Wednesday, March 09, 2005 8:26 AM
> To: Tapestry users
> Subject: Re: Can some explain this exception...
>
>
> Well, it isn't really a matter of how it was passed.  Even if the object
> had been created entirely within the same page, it would still need to be
> persistent if you want it to live through repeated invocations of the
> page.
>
> It's good practice to disable Tapestry's caching during development, at
> least part of the time, to smoke out persistence problems.  Sometimes
> non-persistent properties will appear to work correctly (for short periods
> of time under light load) because the properties get accidentally cached.
> There's a mention of this at http://jakarta.apache.org/tapestry/faq.html.
>
> With caching disabled, test a page by causing it to redraw.  Either cause
> a validation error, or play with the browser refresh and back buttons
> before hitting submit the second time.
>
> There are other ways to make an object hang around than persistent page
> properties, but it's the easy way.
>
>
>
> ----- Original Message -----
> From: "Anastasios Angelidis" <vo...@videotron.ca>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Tuesday, March 08, 2005 11:03 PM
> Subject: Re: Can some explain this exception...
>
> > So because am creating the instance on theh ome page and then passing
> > it through to the next page... I have to persist it right?
> >
> > Bryan Lewis wrote:
> > >The second page (Artist/Edit) needs to declare the artist object as a
> > >persistent page property.  The first time the page is invoked, the
> > >artist object is freshly created and everything works.  But the
> > >second time
>
> (after
>
> > >the validation error and resubmission) the object is no longer there
> > >if
>
> it's
>
> > >not persistent.
> > >
> > >This hypothesis is consistent with the message 'OgnlException target
> > >is
>
> null
>
> > >for setProperty(null, "name", ddddd)'.  It's saying that the page
> > >tried
>
> to
>
> > >call setName() on an object that is now null.
> > >
> > >
> > >----- Original Message -----
> > >From: "Anastasios Angelidis" <vo...@videotron.ca>
> > >To: "Tapestry users" <ta...@jakarta.apache.org>
> > >Sent: Tuesday, March 08, 2005 10:47 PM
> > >Subject: Can some explain this exception...
> > >
> > >>The exception is below... But first the situation...
> > >>
> > >>I have my home page...
> > >>
> > >>On my home page I have a @DirectLink that invokes a newArtist
> > >>listener. The listener creates a new instance of my "Artist" and
> > >>passes it along to the next page, which is my edit page like so:
> > >>
> > >>    public void newArtist(IRequestCycle cycle)
> > >>    {
> > >>        Edit nextPage = (Edit) cycle.getPage("Artist/Edit");
> > >>
> > >>        System.out.println("Here...");
> > >>
> > >>        Artist artist = new Artist();
> > >>
> > >>        nextPage.setArtist(artist);
> > >>        cycle.activate(nextPage);
> > >>    }
> > >>
> > >>My Edit form apears no problem...
> > >>I leave the name field empty and press Submit. My edit page listener
> > >>gets invoked and validation happens... My name field becomes red. We
> > >>are happy! Now I enter a value and click submit and voila, the page
> > >>break :|
> > >>
> > >>I added a break point in the listener, when validation happens, the
> > >>app blocks at the break point. If there is some data in the field
> > >>thelistebner never gets called...
> > >>
> > >>
> > >>
> > >>Unable to update expression 'artist.name' for
> > >>com.mamoth.pages.artist.Edit$Enhance_8@1dbc144[Artist/Edit] to
> > >>ddddd.
> > >>binding: ExpressionBinding[Artist/Edit artist.name]
> > >>location: context:/WEB-INF/Artist/Edit.page, line 20, column 54
> > >>
> > >>ognl.OgnlException
> > >>target is null for setProperty(null, "name", ddddd)
> > >>Stack Trace:
> > >>
> > >>    * ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1624)
> > >>    * ognl.ASTProperty.setValueBody(ASTProperty.java:105)
> > >>    * ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
> > >>    * ognl.SimpleNode.setValue(SimpleNode.java:246)
> > >>    * ognl.ASTChain.setValueBody(ASTChain.java:172)
> > >>    * ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
> > >>    * ognl.SimpleNode.setValue(SimpleNode.java:246)
> > >>    * ognl.Ognl.setValue(Ognl.java:476)
> > >>    *
> >
> >org.apache.tapestry.binding.ExpressionBinding.setObject(ExpressionBindi
> >ng.j

[..Exception..]

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


RE: Can some explain this exception...

Posted by Wayne Andersen <wa...@clima-tech.com>.
How do you, disable Tapestry's caching?

Wayne L Andersen
System Administrator
Clima-Tech Corporation
208-947-1849



-----Original Message-----
From: Bryan Lewis [mailto:bryan@maine.rr.com]
Sent: Wednesday, March 09, 2005 8:26 AM
To: Tapestry users
Subject: Re: Can some explain this exception...


Well, it isn't really a matter of how it was passed.  Even if the object
had been created entirely within the same page, it would still need to be
persistent if you want it to live through repeated invocations of the
page.

It's good practice to disable Tapestry's caching during development, at
least part of the time, to smoke out persistence problems.  Sometimes
non-persistent properties will appear to work correctly (for short periods
of time under light load) because the properties get accidentally cached.
There's a mention of this at http://jakarta.apache.org/tapestry/faq.html.

With caching disabled, test a page by causing it to redraw.  Either cause
a validation error, or play with the browser refresh and back buttons
before hitting submit the second time.

There are other ways to make an object hang around than persistent page
properties, but it's the easy way.



----- Original Message -----
From: "Anastasios Angelidis" <vo...@videotron.ca>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Tuesday, March 08, 2005 11:03 PM
Subject: Re: Can some explain this exception...


> So because am creating the instance on theh ome page and then passing
> it through to the next page... I have to persist it right?
>
> Bryan Lewis wrote:
>
> >The second page (Artist/Edit) needs to declare the artist object as a
> >persistent page property.  The first time the page is invoked, the
> >artist object is freshly created and everything works.  But the
> >second time
(after
> >the validation error and resubmission) the object is no longer there
> >if
it's
> >not persistent.
> >
> >This hypothesis is consistent with the message 'OgnlException target
> >is
null
> >for setProperty(null, "name", ddddd)'.  It's saying that the page
> >tried
to
> >call setName() on an object that is now null.
> >
> >
> >----- Original Message -----
> >From: "Anastasios Angelidis" <vo...@videotron.ca>
> >To: "Tapestry users" <ta...@jakarta.apache.org>
> >Sent: Tuesday, March 08, 2005 10:47 PM
> >Subject: Can some explain this exception...
> >
> >
> >
> >
> >>The exception is below... But first the situation...
> >>
> >>I have my home page...
> >>
> >>On my home page I have a @DirectLink that invokes a newArtist
> >>listener. The listener creates a new instance of my "Artist" and
> >>passes it along to the next page, which is my edit page like so:
> >>
> >>    public void newArtist(IRequestCycle cycle)
> >>    {
> >>        Edit nextPage = (Edit) cycle.getPage("Artist/Edit");
> >>
> >>        System.out.println("Here...");
> >>
> >>        Artist artist = new Artist();
> >>
> >>        nextPage.setArtist(artist);
> >>        cycle.activate(nextPage);
> >>    }
> >>
> >>My Edit form apears no problem...
> >>I leave the name field empty and press Submit. My edit page listener
> >>gets invoked and validation happens... My name field becomes red. We
> >>are happy! Now I enter a value and click submit and voila, the page
> >>break :|
> >>
> >>I added a break point in the listener, when validation happens, the
> >>app blocks at the break point. If there is some data in the field
> >>thelistebner never gets called...
> >>
> >>
> >>
> >>Unable to update expression 'artist.name' for
> >>com.mamoth.pages.artist.Edit$Enhance_8@1dbc144[Artist/Edit] to
> >>ddddd.
> >>binding: ExpressionBinding[Artist/Edit artist.name]
> >>location: context:/WEB-INF/Artist/Edit.page, line 20, column 54
> >>
> >>ognl.OgnlException
> >>target is null for setProperty(null, "name", ddddd)
> >>Stack Trace:
> >>
> >>    * ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1624)
> >>    * ognl.ASTProperty.setValueBody(ASTProperty.java:105)
> >>    * ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
> >>    * ognl.SimpleNode.setValue(SimpleNode.java:246)
> >>    * ognl.ASTChain.setValueBody(ASTChain.java:172)
> >>    * ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
> >>    * ognl.SimpleNode.setValue(SimpleNode.java:246)
> >>    * ognl.Ognl.setValue(Ognl.java:476)
> >>    *
> >>
> >>
>
>org.apache.tapestry.binding.ExpressionBinding.setObject(ExpressionBindi
>ng.j
a
> >va:553)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.tapestry.valid.ValidField$Enhance_9.setValue(ValidField$Enha
>nce_
9
> >.java)
> >
> >
> >>    *
> >>
> >>
> >org.apache.tapestry.valid.ValidField.updateValue(ValidField.java:193)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.tapestry.form.AbstractTextField.renderComponent(AbstractText
>Fiel
d
> >.java:68)
> >
> >
> >>    *
> >>
> >>
> >org.apache.tapestry.valid.ValidField.renderComponent(ValidField.java:
> >88)
> >
> >
> >>    *
> >>
> >>
> >org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:8
> >57)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java
>:624
)
> >
> >
> >>    * org.apache.tapestry.form.Form.renderComponent(Form.java:362)
> >>    *
> >>
> >>
> >org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:8
> >57)
> >
> >
> >>    * org.apache.tapestry.form.Form.rewind(Form.java:568)
> >>    *
> >>
> >>
> >org.apache.tapestry.engine.RequestCycle.rewindForm(RequestCycle.java:
> >432)
> >
> >
> >>    * org.apache.tapestry.form.Form.trigger(Form.java:582)
> >>    *
> >>
> >>
> >org.apache.tapestry.engine.DirectService.service(DirectService.java:1
> >69)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:8
>72)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.jav
>a:19
7
> >)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:3
>26)
> >
> >
> >>    * javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> >>    * javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> >>    *
> >>
> >>
>
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
>atio
n
> >FilterChain.java:237)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
>terC
h
> >ain.java:157)
> >
> >
> >>    *
> >>
> >>
>
>org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilt
>er.j
a
> >va:75)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
>atio
n
> >FilterChain.java:186)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
>terC
h
> >ain.java:157)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
>ve.j
a
> >va:214)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
>onte
x
> >t.java:104)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
>520)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
>ntex
t
> >Valve.java:198)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
>ve.j
a
> >va:152)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
>onte
x
> >t.java:104)
> >
> >
> >>    *
> >>
> >>
>
>org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincip
>alVa
l
> >ve.java:44)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
>onte
x
> >t.java:102)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticato
>rBas
e
> >.java:540)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
>onte
x
> >t.java:102)
> >
> >
> >>    *
> >>
> >>
>
>org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityA
>ssoc
i
> >ationValve.java:169)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
>onte
x
> >t.java:102)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
>520)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
>a:13
7
> >)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
>onte
x
> >t.java:104)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
>a:11
8
> >)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
>onte
x
> >t.java:102)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
>520)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
>.jav
a
> >:109)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
>onte
x
> >t.java:104)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
>520)
> >
> >
> >>    *
> >>
> >>
> >org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> >
> >
> >>    *
> >>
> >>
> >org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:16
> >0)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
>99)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
>Conn
e
> >ction(Http11Protocol.java:705)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
>77)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
>l.ja
v
> >a:683)
> >
> >
> >>    * java.lang.Thread.run(Thread.java:534)
> >>
> >>
> >>
> >>--------------------------------------------------------------------
> >>-
> >>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >>
> >>
> >>
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail:
> >tapestry-user-help@jakarta.apache.org
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>


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


Re: Can some explain this exception...

Posted by Bryan Lewis <br...@maine.rr.com>.
Well, it isn't really a matter of how it was passed.  Even if the object had
been created entirely within the same page, it would still need to be
persistent if you want it to live through repeated invocations of the page.

It's good practice to disable Tapestry's caching during development, at
least part of the time, to smoke out persistence problems.  Sometimes
non-persistent properties will appear to work correctly (for short periods
of time under light load) because the properties get accidentally cached.
There's a mention of this at http://jakarta.apache.org/tapestry/faq.html.

With caching disabled, test a page by causing it to redraw.  Either cause a
validation error, or play with the browser refresh and back buttons before
hitting submit the second time.

There are other ways to make an object hang around than persistent page
properties, but it's the easy way.



----- Original Message ----- 
From: "Anastasios Angelidis" <vo...@videotron.ca>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Tuesday, March 08, 2005 11:03 PM
Subject: Re: Can some explain this exception...


> So because am creating the instance on theh ome page and then passing it
> through to the next page... I have to persist it right?
>
> Bryan Lewis wrote:
>
> >The second page (Artist/Edit) needs to declare the artist object as a
> >persistent page property.  The first time the page is invoked, the artist
> >object is freshly created and everything works.  But the second time
(after
> >the validation error and resubmission) the object is no longer there if
it's
> >not persistent.
> >
> >This hypothesis is consistent with the message 'OgnlException target is
null
> >for setProperty(null, "name", ddddd)'.  It's saying that the page tried
to
> >call setName() on an object that is now null.
> >
> >
> >----- Original Message ----- 
> >From: "Anastasios Angelidis" <vo...@videotron.ca>
> >To: "Tapestry users" <ta...@jakarta.apache.org>
> >Sent: Tuesday, March 08, 2005 10:47 PM
> >Subject: Can some explain this exception...
> >
> >
> >
> >
> >>The exception is below... But first the situation...
> >>
> >>I have my home page...
> >>
> >>On my home page I have a @DirectLink that invokes a newArtist listener.
> >>The listener creates a new instance of my "Artist" and passes it along
> >>to the next page, which is my edit page like so:
> >>
> >>    public void newArtist(IRequestCycle cycle)
> >>    {
> >>        Edit nextPage = (Edit) cycle.getPage("Artist/Edit");
> >>
> >>        System.out.println("Here...");
> >>
> >>        Artist artist = new Artist();
> >>
> >>        nextPage.setArtist(artist);
> >>        cycle.activate(nextPage);
> >>    }
> >>
> >>My Edit form apears no problem...
> >>I leave the name field empty and press Submit. My edit page listener
> >>gets invoked and validation happens... My name field becomes red. We are
> >>happy!
> >>Now I enter a value and click submit and voila, the page break :|
> >>
> >>I added a break point in the listener, when validation happens, the app
> >>blocks at the break point. If there is some data in the field
> >>thelistebner never gets called...
> >>
> >>
> >>
> >>Unable to update expression 'artist.name' for
> >>com.mamoth.pages.artist.Edit$Enhance_8@1dbc144[Artist/Edit] to ddddd.
> >>binding: ExpressionBinding[Artist/Edit artist.name]
> >>location: context:/WEB-INF/Artist/Edit.page, line 20, column 54
> >>
> >>ognl.OgnlException
> >>target is null for setProperty(null, "name", ddddd)
> >>Stack Trace:
> >>
> >>    * ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1624)
> >>    * ognl.ASTProperty.setValueBody(ASTProperty.java:105)
> >>    * ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
> >>    * ognl.SimpleNode.setValue(SimpleNode.java:246)
> >>    * ognl.ASTChain.setValueBody(ASTChain.java:172)
> >>    * ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
> >>    * ognl.SimpleNode.setValue(SimpleNode.java:246)
> >>    * ognl.Ognl.setValue(Ognl.java:476)
> >>    *
> >>
> >>
>
>org.apache.tapestry.binding.ExpressionBinding.setObject(ExpressionBinding.j
a
> >va:553)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.tapestry.valid.ValidField$Enhance_9.setValue(ValidField$Enhance_
9
> >.java)
> >
> >
> >>    *
> >>
> >>
> >org.apache.tapestry.valid.ValidField.updateValue(ValidField.java:193)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.tapestry.form.AbstractTextField.renderComponent(AbstractTextFiel
d
> >.java:68)
> >
> >
> >>    *
> >>
> >>
> >org.apache.tapestry.valid.ValidField.renderComponent(ValidField.java:88)
> >
> >
> >>    *
> >>
> >>
> >org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:624
)
> >
> >
> >>    * org.apache.tapestry.form.Form.renderComponent(Form.java:362)
> >>    *
> >>
> >>
> >org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
> >
> >
> >>    * org.apache.tapestry.form.Form.rewind(Form.java:568)
> >>    *
> >>
> >>
> >org.apache.tapestry.engine.RequestCycle.rewindForm(RequestCycle.java:432)
> >
> >
> >>    * org.apache.tapestry.form.Form.trigger(Form.java:582)
> >>    *
> >>
> >>
> >org.apache.tapestry.engine.DirectService.service(DirectService.java:169)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:872)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:19
7
> >)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:326)
> >
> >
> >>    * javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> >>    * javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> >>    *
> >>
> >>
>
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio
n
> >FilterChain.java:237)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC
h
> >ain.java:157)
> >
> >
> >>    *
> >>
> >>
>
>org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.j
a
> >va:75)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio
n
> >FilterChain.java:186)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC
h
> >ain.java:157)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j
a
> >va:214)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
x
> >t.java:104)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContex
t
> >Valve.java:198)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j
a
> >va:152)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
x
> >t.java:104)
> >
> >
> >>    *
> >>
> >>
>
>org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalVa
l
> >ve.java:44)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
x
> >t.java:102)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBas
e
> >.java:540)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
x
> >t.java:102)
> >
> >
> >>    *
> >>
> >>
>
>org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssoc
i
> >ationValve.java:169)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
x
> >t.java:102)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:13
7
> >)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
x
> >t.java:104)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:11
8
> >)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
x
> >t.java:102)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav
a
> >:109)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
x
> >t.java:104)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >
> >
> >>    *
> >>
> >>
> >org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> >
> >
> >>    *
> >>
> >>
> >org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConn
e
> >ction(Http11Protocol.java:705)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
> >
> >
> >>    *
> >>
> >>
>
>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.ja
v
> >a:683)
> >
> >
> >>    * java.lang.Thread.run(Thread.java:534)
> >>
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >>
> >>
> >>
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>


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


Re: Can some explain this exception...

Posted by Anastasios Angelidis <vo...@videotron.ca>.
So because am creating the instance on theh ome page and then passing it 
through to the next page... I have to persist it right?

Bryan Lewis wrote:

>The second page (Artist/Edit) needs to declare the artist object as a
>persistent page property.  The first time the page is invoked, the artist
>object is freshly created and everything works.  But the second time (after
>the validation error and resubmission) the object is no longer there if it's
>not persistent.
>
>This hypothesis is consistent with the message 'OgnlException target is null
>for setProperty(null, "name", ddddd)'.  It's saying that the page tried to
>call setName() on an object that is now null.
>
>
>----- Original Message ----- 
>From: "Anastasios Angelidis" <vo...@videotron.ca>
>To: "Tapestry users" <ta...@jakarta.apache.org>
>Sent: Tuesday, March 08, 2005 10:47 PM
>Subject: Can some explain this exception...
>
>
>  
>
>>The exception is below... But first the situation...
>>
>>I have my home page...
>>
>>On my home page I have a @DirectLink that invokes a newArtist listener.
>>The listener creates a new instance of my "Artist" and passes it along
>>to the next page, which is my edit page like so:
>>
>>    public void newArtist(IRequestCycle cycle)
>>    {
>>        Edit nextPage = (Edit) cycle.getPage("Artist/Edit");
>>
>>        System.out.println("Here...");
>>
>>        Artist artist = new Artist();
>>
>>        nextPage.setArtist(artist);
>>        cycle.activate(nextPage);
>>    }
>>
>>My Edit form apears no problem...
>>I leave the name field empty and press Submit. My edit page listener
>>gets invoked and validation happens... My name field becomes red. We are
>>happy!
>>Now I enter a value and click submit and voila, the page break :|
>>
>>I added a break point in the listener, when validation happens, the app
>>blocks at the break point. If there is some data in the field
>>thelistebner never gets called...
>>
>>
>>
>>Unable to update expression 'artist.name' for
>>com.mamoth.pages.artist.Edit$Enhance_8@1dbc144[Artist/Edit] to ddddd.
>>binding: ExpressionBinding[Artist/Edit artist.name]
>>location: context:/WEB-INF/Artist/Edit.page, line 20, column 54
>>
>>ognl.OgnlException
>>target is null for setProperty(null, "name", ddddd)
>>Stack Trace:
>>
>>    * ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1624)
>>    * ognl.ASTProperty.setValueBody(ASTProperty.java:105)
>>    * ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
>>    * ognl.SimpleNode.setValue(SimpleNode.java:246)
>>    * ognl.ASTChain.setValueBody(ASTChain.java:172)
>>    * ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
>>    * ognl.SimpleNode.setValue(SimpleNode.java:246)
>>    * ognl.Ognl.setValue(Ognl.java:476)
>>    *
>>    
>>
>org.apache.tapestry.binding.ExpressionBinding.setObject(ExpressionBinding.ja
>va:553)
>  
>
>>    *
>>    
>>
>org.apache.tapestry.valid.ValidField$Enhance_9.setValue(ValidField$Enhance_9
>.java)
>  
>
>>    *
>>    
>>
>org.apache.tapestry.valid.ValidField.updateValue(ValidField.java:193)
>  
>
>>    *
>>    
>>
>org.apache.tapestry.form.AbstractTextField.renderComponent(AbstractTextField
>.java:68)
>  
>
>>    *
>>    
>>
>org.apache.tapestry.valid.ValidField.renderComponent(ValidField.java:88)
>  
>
>>    *
>>    
>>
>org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
>  
>
>>    *
>>    
>>
>org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:624)
>  
>
>>    * org.apache.tapestry.form.Form.renderComponent(Form.java:362)
>>    *
>>    
>>
>org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
>  
>
>>    * org.apache.tapestry.form.Form.rewind(Form.java:568)
>>    *
>>    
>>
>org.apache.tapestry.engine.RequestCycle.rewindForm(RequestCycle.java:432)
>  
>
>>    * org.apache.tapestry.form.Form.trigger(Form.java:582)
>>    *
>>    
>>
>org.apache.tapestry.engine.DirectService.service(DirectService.java:169)
>  
>
>>    *
>>    
>>
>org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:872)
>  
>
>>    *
>>    
>>
>org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:197
>)
>  
>
>>    *
>>    
>>
>org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:326)
>  
>
>>    * javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>>    * javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>>    *
>>    
>>
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
>FilterChain.java:237)
>  
>
>>    *
>>    
>>
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
>ain.java:157)
>  
>
>>    *
>>    
>>
>org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.ja
>va:75)
>  
>
>>    *
>>    
>>
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
>FilterChain.java:186)
>  
>
>>    *
>>    
>>
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
>ain.java:157)
>  
>
>>    *
>>    
>>
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
>va:214)
>  
>
>>    *
>>    
>>
>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
>t.java:104)
>  
>
>>    *
>>    
>>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>  
>
>>    *
>>    
>>
>org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext
>Valve.java:198)
>  
>
>>    *
>>    
>>
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
>va:152)
>  
>
>>    *
>>    
>>
>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
>t.java:104)
>  
>
>>    *
>>    
>>
>org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalVal
>ve.java:44)
>  
>
>>    *
>>    
>>
>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
>t.java:102)
>  
>
>>    *
>>    
>>
>org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
>.java:540)
>  
>
>>    *
>>    
>>
>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
>t.java:102)
>  
>
>>    *
>>    
>>
>org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssoci
>ationValve.java:169)
>  
>
>>    *
>>    
>>
>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
>t.java:102)
>  
>
>>    *
>>    
>>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>  
>
>>    *
>>    
>>
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137
>)
>  
>
>>    *
>>    
>>
>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
>t.java:104)
>  
>
>>    *
>>    
>>
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118
>)
>  
>
>>    *
>>    
>>
>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
>t.java:102)
>  
>
>>    *
>>    
>>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>  
>
>>    *
>>    
>>
>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
>:109)
>  
>
>>    *
>>    
>>
>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
>t.java:104)
>  
>
>>    *
>>    
>>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>  
>
>>    *
>>    
>>
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>  
>
>>    *
>>    
>>
>org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>  
>
>>    *
>>    
>>
>org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
>  
>
>>    *
>>    
>>
>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
>ction(Http11Protocol.java:705)
>  
>
>>    *
>>    
>>
>org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
>  
>
>>    *
>>    
>>
>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
>a:683)
>  
>
>>    * java.lang.Thread.run(Thread.java:534)
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>  
>


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


Re: Can some explain this exception...

Posted by Bryan Lewis <br...@maine.rr.com>.
The second page (Artist/Edit) needs to declare the artist object as a
persistent page property.  The first time the page is invoked, the artist
object is freshly created and everything works.  But the second time (after
the validation error and resubmission) the object is no longer there if it's
not persistent.

This hypothesis is consistent with the message 'OgnlException target is null
for setProperty(null, "name", ddddd)'.  It's saying that the page tried to
call setName() on an object that is now null.


----- Original Message ----- 
From: "Anastasios Angelidis" <vo...@videotron.ca>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Tuesday, March 08, 2005 10:47 PM
Subject: Can some explain this exception...


> The exception is below... But first the situation...
>
> I have my home page...
>
> On my home page I have a @DirectLink that invokes a newArtist listener.
> The listener creates a new instance of my "Artist" and passes it along
> to the next page, which is my edit page like so:
>
>     public void newArtist(IRequestCycle cycle)
>     {
>         Edit nextPage = (Edit) cycle.getPage("Artist/Edit");
>
>         System.out.println("Here...");
>
>         Artist artist = new Artist();
>
>         nextPage.setArtist(artist);
>         cycle.activate(nextPage);
>     }
>
> My Edit form apears no problem...
> I leave the name field empty and press Submit. My edit page listener
> gets invoked and validation happens... My name field becomes red. We are
> happy!
> Now I enter a value and click submit and voila, the page break :|
>
> I added a break point in the listener, when validation happens, the app
> blocks at the break point. If there is some data in the field
> thelistebner never gets called...
>
>
>
> Unable to update expression 'artist.name' for
> com.mamoth.pages.artist.Edit$Enhance_8@1dbc144[Artist/Edit] to ddddd.
> binding: ExpressionBinding[Artist/Edit artist.name]
> location: context:/WEB-INF/Artist/Edit.page, line 20, column 54
>
> ognl.OgnlException
> target is null for setProperty(null, "name", ddddd)
> Stack Trace:
>
>     * ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1624)
>     * ognl.ASTProperty.setValueBody(ASTProperty.java:105)
>     * ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
>     * ognl.SimpleNode.setValue(SimpleNode.java:246)
>     * ognl.ASTChain.setValueBody(ASTChain.java:172)
>     * ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
>     * ognl.SimpleNode.setValue(SimpleNode.java:246)
>     * ognl.Ognl.setValue(Ognl.java:476)
>     *
org.apache.tapestry.binding.ExpressionBinding.setObject(ExpressionBinding.ja
va:553)
>
>     *
org.apache.tapestry.valid.ValidField$Enhance_9.setValue(ValidField$Enhance_9
.java)
>
>     *
org.apache.tapestry.valid.ValidField.updateValue(ValidField.java:193)
>     *
org.apache.tapestry.form.AbstractTextField.renderComponent(AbstractTextField
.java:68)
>
>     *
org.apache.tapestry.valid.ValidField.renderComponent(ValidField.java:88)
>
>     *
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
>
>     *
org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:624)
>
>     * org.apache.tapestry.form.Form.renderComponent(Form.java:362)
>     *
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
>
>     * org.apache.tapestry.form.Form.rewind(Form.java:568)
>     *
org.apache.tapestry.engine.RequestCycle.rewindForm(RequestCycle.java:432)
>
>     * org.apache.tapestry.form.Form.trigger(Form.java:582)
>     *
org.apache.tapestry.engine.DirectService.service(DirectService.java:169)
>
>     *
org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:872)
>
>     *
org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:197
)
>
>     *
org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:326)
>
>     * javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>     * javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>     *
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:237)
>
>     *
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:157)
>
>     *
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.ja
va:75)
>
>     *
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:186)
>
>     *
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:157)
>
>     *
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)
>
>     *
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
>
>     *
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>
>     *
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext
Valve.java:198)
>
>     *
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:152)
>
>     *
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
>
>     *
org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalVal
ve.java:44)
>
>     *
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:102)
>
>     *
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:540)
>
>     *
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:102)
>
>     *
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssoci
ationValve.java:169)
>
>     *
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:102)
>
>     *
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>
>     *
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137
)
>
>     *
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
>
>     *
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118
)
>
>     *
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:102)
>
>     *
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>
>     *
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:109)
>
>     *
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
>
>     *
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>
>     *
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>     *
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>
>     *
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
>
>     *
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:705)
>
>     *
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
>
>     *
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:683)
>
>     * java.lang.Thread.run(Thread.java:534)
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>


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