You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Neil Clayton <ne...@cloudnine.net.nz> on 2003/06/01 12:52:51 UTC

Upgrading to 2.4 alpha 5 (from 2.2)

well, it has been a while since I've had the chance to do any Tapestry 
stuff, but I found time this weekend!
So, time to upgrade from 2.2 to 2.4.

I've got the following page specification (partial):
    <component id="editJobName" type="Contrib:ValidatingTextField">
        <string-binding name="displayName" key="jobNameLabel"/>
        <binding name="displayWidth" expression='40'/>
        <binding name="minimumLength" expression='1'/>
        <binding name="required" expression='true'/>
        <binding name="text" 
expression='getEngine().getVisit().getJobBeingEdited().jobName'/>
    </component>

Yet when the page is rendered, I get the exception detailed below.
Seems to me that there is a problem calling the setValueBinding in the 
enhanced class, but I don't know why. 
I'm not sure if it's being caused by an NPE (perhaps the visit is null?) 
or if it's a syntax issue? (ognl upgrade...) or why....

I'm a little confused :-)

Can anyone give me some pointers of what to look for, especially since 
this is not new code, but code that used to work on Tapestry2.2.
In terms of "upgrading", all I've done is fixed all the package names, 
and modified the app specification with an updated property for the 
visit class (it changed when the package name change was done).

also, is there any way to get hold of the autogenerated class files?
I've done a brief search over the news postings, but didn't see 
anything.  I'm guessing not, since the're generated at runtime...

Regards,
Neil Clayton

--------- Exception trace --------

Unable to update expression '<parsed expression>' of 
org.apache.tapestry.contrib.valid.ValidatingTextField$Enhance_22@78b4c4[JobEditor/editJobName] 
to ExpressionBinding[JobEditor 
getEngine().getVisit().getJobBeingEdited().jobName].

Method "setTextBinding" failed for object 
org.apache.tapestry.contrib.valid.ValidatingTextField$Enhance_22@78b4c4[JobEditor/editJobName]
java.lang.AbstractMethodError
org.apache.tapestry.valid.ValidField.setValueBinding(Lorg/apache/tapestry/IBinding;)V 

Stack Trace:

    * org.apache.tapestry.contrib.valid.ValidatingTextField.setTextBinding(ValidatingTextField.java:149)
    * sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    * sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    * sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    * java.lang.reflect.Method.invoke(Method.java:324)
    * ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java)
    * ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java)
    * ognl.OgnlRuntime.callMethod(OgnlRuntime.java)
    * ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java)
    * ognl.ObjectPropertyAccessor.setPossibleProperty(ObjectPropertyAccessor.java)
    * ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java)
    * ognl.OgnlRuntime.setProperty(OgnlRuntime.java)
    * ognl.ASTProperty.setValue(ASTProperty.java)
    * ognl.Ognl.setValue(Ognl.java)
    * org.apache.tapestry.util.prop.OgnlUtils.set(OgnlUtils.java:143)
    * org.apache.tapestry.util.prop.OgnlUtils.set(OgnlUtils.java:126)
    * org.apache.tapestry.AbstractComponent.setBinding(AbstractComponent.java:660)
    * org.apache.tapestry.pageload.PageLoader.bind(PageLoader.java:310)
    * org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:500)
    * org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:758)
    * org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:193)
    * org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:236)
    * org.apache.tapestry.engine.RequestCycle.setPage(RequestCycle.java:607)
    * tcdc.da4.server.console.components.job.JobsView.editJob(JobsView.java:74)





Re: Upgrading to 2.4 alpha 5 (from 2.2)

Posted by Neil Clayton <ne...@cloudnine.net.nz>.
Could be....

When using 3.0 (from CVS HEAD), I get:

Method 'public abstract org.apache.tapestry.IBinding 
org.apache.tapestry.contrib.valid.ValidatingTextField.getValueBinding()' 
(declared in class 
org.apache.tapestry.contrib.valid.ValidatingTextField) has no 
implementation in class 
org.apache.tapestry.contrib.valid.ValidatingTextField (or enhanced 
subclass org.apache.tapestry.contrib.valid.ValidatingTextField$Enhance_22).
location: 
classpath:/org/apache/tapestry/contrib/valid/ValidatingTextField.jwc, 
line 7
Stack Trace:

    * org.apache.tapestry.enhance.DefaultComponentClassEnhancer.validateEnhancedClass(DefaultComponentClassEnhancer.java:214)
    * org.apache.tapestry.enhance.DefaultComponentClassEnhancer.constructComponentClass(DefaultComponentClassEnhancer.java:164)
    * org.apache.tapestry.enhance.DefaultComponentClassEnhancer.getEnhancedClass(DefaultComponentClassEnhancer.java:118)
    * org.apache.tapestry.pageload.PageLoader.instantiateComponent(PageLoader.java:681)
    * org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:562)
    * org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:835)
    * org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:194)
    * org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:236)
    * org.apache.tapestry.engine.RequestCycle.setPage(RequestCycle.java:607)



I have to disappear to work, so this *could* be due to something I've 
done (well, being in the ValidatingTextField, perhaps not :-), I've lont 
looked really closely at this yet - just thought I would post the info 
for others + mb.

Have a happy day :-)

Neil


Howard M. Lewis Ship wrote:

>I'm pretty certain that this is a real bug; I got the NumericField component (and friends) to
>compile, but never figured out if they actually worked under the new system.
>
>--
>Howard M. Lewis Ship
>Creator, Tapestry: Java Web Components
>http://jakarta.apache.org/tapestry
>
>
>  
>



RE: Upgrading to 2.4 alpha 5 (from 2.2)

Posted by "Howard M. Lewis Ship" <hl...@attbi.com>.
I'm pretty certain that this is a real bug; I got the NumericField component (and friends) to
compile, but never figured out if they actually worked under the new system.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry



> -----Original Message-----
> From: Neil Clayton [mailto:neil@cloudnine.net.nz] 
> Sent: Sunday, June 01, 2003 4:16 PM
> To: Tapestry users
> Subject: Re: Upgrading to 2.4 alpha 5 (from 2.2)
> 
> 
> Also, if it helps, I've attached a debug log from the servlet 
> container, 
> which is the log from when I hit the button, to the bottom of 
> the stack 
> trace:
> 
> 
> 31657411 [tcpConnection-8080-2] INFO   - Begin service 
> /console/console
> 31657411 [tcpConnection-8080-2] DEBUG  - Retrieved 
> tcdc.da4.server.console.pages.Jobs@14596d5[Jobs] from 
> MultiKey[Jobs, en_GB] 31657411 [tcpConnection-8080-2] DEBUG  
> - Set page to 
> tcdc.da4.server.console.pages.Jobs@14596d5[Jobs]
> 31657411 [tcpConnection-8080-2] DEBUG  - Getting adaptor for class 
> java.lang.Boolean
> 31657411 [tcpConnection-8080-2] DEBUG  - Found 
> org.apache.tapestry.Tapestry$BooleanAdaptor@15093f1 in cache 
> 31657411 [tcpConnection-8080-2] DEBUG  - Invoking listener 
> method public 
> void tcdc.da4.server.console.components.job.JobsView.edit
> Job(org.apache.tapestry.IRequestCycle) on 
> tcdc.da4.server.console.components.job.JobsView@bdb375[Jobs/jo
> bListing]
> 31657411 [tcpConnection-8080-2] INFO   - User clicked to edit 
> job  New job
> 31657411 [tcpConnection-8080-2] DEBUG  - Setting dirty flag. 
> 31657411 [tcpConnection-8080-2] DEBUG  - Set page to 
> JobEditor 31657411 [tcpConnection-8080-2] DEBUG  - Retrieved 
> null from 
> MultiKey[JobEditor, en_GB]
> 31657411 [tcpConnection-8080-2] DEBUG  - Retrieved 
> org.apache.tapestry.pageload.PageLoader@127ff0d from 
> org.apache.tapestry.PageLo
> ader
> 31657411 [tcpConnection-8080-2] DEBUG  - Resolving unknown component 
> 'Submit' in Namespace@1777b1[<application>]
> 31657411 [tcpConnection-8080-2] DEBUG  - Checking: 
> classpath:/tcdc/da4/server/console/Submit.jwc
> 31657411 [tcpConnection-8080-2] DEBUG  - 
> getResource(/tcdc/da4/server/console/Submit.jwc)
> 31657421 [tcpConnection-8080-2] DEBUG  - Not found.
> 31657421 [tcpConnection-8080-2] DEBUG  - Checking: 
> context:/WEB-INF/AdminConsole/Submit.jwc
> 31657441 [tcpConnection-8080-2] DEBUG  - Checking: 
> context:/WEB-INF/Submit.jwc
> 31657441 [tcpConnection-8080-2] DEBUG  - Checking: 
> context:/Submit.jwc 31657452 [tcpConnection-8080-2] DEBUG  - 
> Getting adaptor for class 
> org.apache.tapestry.pageload.PageLoader
> 31657452 [tcpConnection-8080-2] DEBUG  - Found 
> org.apache.tapestry.util.pool.NullPoolableAdaptor@c837cd in 
> cache 31657452 [tcpConnection-8080-2] DEBUG  - Stored 
> org.apache.tapestry.pageload.PageLoader@127ff0d into 
> org.apache.tapestry.PageLoade
> r (1 pooled)
> 31657452 [tcpConnection-8080-2] INFO   - Uncaught exception
> org.apache.tapestry.ApplicationRuntimeException: Unable to update 
> expression '<parsed expression>' of 
> org.apache.tapestry.contrib. 
> valid.ValidatingTextField$Enhance_22@43487e[JobEditor/editJobName] to 
> ExpressionBinding[JobEditor getEngine().getVisit().getJobBei 
> ngEdited().jobName].
>         at 
> org.apache.tapestry.util.prop.OgnlUtils.set(OgnlUtils.java:147)
>         at 
> org.apache.tapestry.util.prop.OgnlUtils.set(OgnlUtils.java:126)
>         at 
> org.apache.tapestry.AbstractComponent.setBinding(AbstractCompo
> nent.java:660)
>         at 
> org.apache.tapestry.pageload.PageLoader.bind(PageLoader.java:310)
>         at 
> org.apache.tapestry.pageload.PageLoader.constructComponent(Pag
> eLoader.java:500)
>         at 
> org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:758)
>         at 
> org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:193)
>         at 
> org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:236)
>         at 
> org.apache.tapestry.engine.RequestCycle.setPage(RequestCycle.java:607)
>         at 
> tcdc.da4.server.console.components.job.JobsView.editJob(JobsVi
> ew.java:74)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
> orImpl.java:39)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
> odAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at 
> org.apache.tapestry.listener.ListenerMap.invokeTargetMethod(Li
> stenerMap.java:301)
>         at 
> org.apache.tapestry.listener.ListenerMap.access$100(ListenerMa
> p.java:87)
>         at 
> org.apache.tapestry.listener.ListenerMap$SyntheticListener.inv
> oke(ListenerMap.java:141)
>         at 
> org.apache.tapestry.listener.ListenerMap$SyntheticListener.act
> ionTriggered(ListenerMap.java:146)
>         at 
> org.apache.tapestry.link.DirectLink.trigger(DirectLink.java:160)
>         at 
> org.apache.tapestry.engine.DirectService.service(DirectService
> .java:211)
>         at 
> org.apache.tapestry.engine.AbstractEngine.service(AbstractEngi
> ne.java:878)
>         at 
> tcdc.da4.server.console.ConsoleAdminEngine.service(ConsoleAdmi
> nEngine.java:21)
>         at 
> org.apache.tapestry.ApplicationServlet.doService(ApplicationSe
> rvlet.java:238)
>         at 
> org.apache.tapestry.ApplicationServlet.doGet(ApplicationServle
> t.java:199)
>         at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:126)
>         at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
>         at 
> com.caucho.server.http.FilterChainServlet.doFilter(FilterChain
> Servlet.java:96)
>         at 
> com.caucho.server.http.Invocation.service(Invocation.java:315)
>         at 
> com.caucho.server.http.CacheInvocation.service(CacheInvocation
> .java:135)
>         at 
> com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246)
>         at 
> com.caucho.server.http.HttpRequest.handleConnection(HttpReques
> t.java:163)
>         at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
>         at java.lang.Thread.run(Thread.java:536)
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 


Re: Upgrading to 2.4 alpha 5 (from 2.2)

Posted by Neil Clayton <ne...@cloudnine.net.nz>.
Also, if it helps, I've attached a debug log from the servlet container, 
which is the log from when I hit the button, to the bottom of the stack 
trace:


31657411 [tcpConnection-8080-2] INFO   - Begin service /console/console
31657411 [tcpConnection-8080-2] DEBUG  - Retrieved 
tcdc.da4.server.console.pages.Jobs@14596d5[Jobs] from MultiKey[Jobs, en_GB]
31657411 [tcpConnection-8080-2] DEBUG  - Set page to 
tcdc.da4.server.console.pages.Jobs@14596d5[Jobs]
31657411 [tcpConnection-8080-2] DEBUG  - Getting adaptor for class 
java.lang.Boolean
31657411 [tcpConnection-8080-2] DEBUG  - Found 
org.apache.tapestry.Tapestry$BooleanAdaptor@15093f1 in cache
31657411 [tcpConnection-8080-2] DEBUG  - Invoking listener method public 
void tcdc.da4.server.console.components.job.JobsView.edit
Job(org.apache.tapestry.IRequestCycle) on 
tcdc.da4.server.console.components.job.JobsView@bdb375[Jobs/jobListing]
31657411 [tcpConnection-8080-2] INFO   - User clicked to edit job  New job
31657411 [tcpConnection-8080-2] DEBUG  - Setting dirty flag.
31657411 [tcpConnection-8080-2] DEBUG  - Set page to JobEditor
31657411 [tcpConnection-8080-2] DEBUG  - Retrieved null from 
MultiKey[JobEditor, en_GB]
31657411 [tcpConnection-8080-2] DEBUG  - Retrieved 
org.apache.tapestry.pageload.PageLoader@127ff0d from 
org.apache.tapestry.PageLo
ader
31657411 [tcpConnection-8080-2] DEBUG  - Resolving unknown component 
'Submit' in Namespace@1777b1[<application>]
31657411 [tcpConnection-8080-2] DEBUG  - Checking: 
classpath:/tcdc/da4/server/console/Submit.jwc
31657411 [tcpConnection-8080-2] DEBUG  - 
getResource(/tcdc/da4/server/console/Submit.jwc)
31657421 [tcpConnection-8080-2] DEBUG  - Not found.
31657421 [tcpConnection-8080-2] DEBUG  - Checking: 
context:/WEB-INF/AdminConsole/Submit.jwc
31657441 [tcpConnection-8080-2] DEBUG  - Checking: 
context:/WEB-INF/Submit.jwc
31657441 [tcpConnection-8080-2] DEBUG  - Checking: context:/Submit.jwc
31657452 [tcpConnection-8080-2] DEBUG  - Getting adaptor for class 
org.apache.tapestry.pageload.PageLoader
31657452 [tcpConnection-8080-2] DEBUG  - Found 
org.apache.tapestry.util.pool.NullPoolableAdaptor@c837cd in cache
31657452 [tcpConnection-8080-2] DEBUG  - Stored 
org.apache.tapestry.pageload.PageLoader@127ff0d into 
org.apache.tapestry.PageLoade
r (1 pooled)
31657452 [tcpConnection-8080-2] INFO   - Uncaught exception
org.apache.tapestry.ApplicationRuntimeException: Unable to update 
expression '<parsed expression>' of org.apache.tapestry.contrib.
valid.ValidatingTextField$Enhance_22@43487e[JobEditor/editJobName] to 
ExpressionBinding[JobEditor getEngine().getVisit().getJobBei
ngEdited().jobName].
        at org.apache.tapestry.util.prop.OgnlUtils.set(OgnlUtils.java:147)
        at org.apache.tapestry.util.prop.OgnlUtils.set(OgnlUtils.java:126)
        at 
org.apache.tapestry.AbstractComponent.setBinding(AbstractComponent.java:660)
        at org.apache.tapestry.pageload.PageLoader.bind(PageLoader.java:310)
        at 
org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:500)
        at 
org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:758)
        at 
org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:193)
        at 
org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:236)
        at 
org.apache.tapestry.engine.RequestCycle.setPage(RequestCycle.java:607)
        at 
tcdc.da4.server.console.components.job.JobsView.editJob(JobsView.java:74)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at 
org.apache.tapestry.listener.ListenerMap.invokeTargetMethod(ListenerMap.java:301)
        at 
org.apache.tapestry.listener.ListenerMap.access$100(ListenerMap.java:87)
        at 
org.apache.tapestry.listener.ListenerMap$SyntheticListener.invoke(ListenerMap.java:141)
        at 
org.apache.tapestry.listener.ListenerMap$SyntheticListener.actionTriggered(ListenerMap.java:146)
        at org.apache.tapestry.link.DirectLink.trigger(DirectLink.java:160)
        at 
org.apache.tapestry.engine.DirectService.service(DirectService.java:211)
        at 
org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:878)
        at 
tcdc.da4.server.console.ConsoleAdminEngine.service(ConsoleAdminEngine.java:21)
        at 
org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:238)
        at 
org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:199)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:126)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
        at 
com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
        at com.caucho.server.http.Invocation.service(Invocation.java:315)
        at 
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
        at 
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246)
        at 
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)
        at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
        at java.lang.Thread.run(Thread.java:536)


Re: Upgrading to 2.4 alpha 5 (from 2.2)

Posted by Neil Clayton <ne...@cloudnine.net.nz>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

mines defined as 'Contrib'.

also, the stacktrace shows code entering the ValidatingTextField instance, so 
it's obviously finding it. 

I've verified that the visit object is not null (it is used before I click the 
button which causes this trace)

it's almost as though the binding is read-only.
If it helps, the code that spawns this event is as follows:

		try {
			getPage().getEngine().forgetPage("JobEditor");			
getState().setJobBeingEdited(ObjectFactory.getFactory().getJobWithName(jobName));
			cycle.setPage("JobEditor");
		} catch (FactoryException e) {
			throw new ApplicationRuntimeException("Unable to find the job with name " + 
jobName, this, e);
		}

this is kicked from from within a Submit listener method.

getState() just returns the current visit object (correctly cast). The 
variable jobName is already initialized to be "the right thing".


Neil


On Sunday 01 Jun 2003 3:56 pm, Geoff Longman wrote:
> Actually the case for 'contrib' depends on how one declares the library in
> the application spec.
>
> Geoff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+2noiLXcfQF3yrNoRAq1HAKC0TTJLpXua2bnpyfqhLQ9nz3L/cgCdGHSf
clJtN/p2K87c7+Sq1/SXN3Y=
=gZ20
-----END PGP SIGNATURE-----


Re: Upgrading to 2.4 alpha 5 (from 2.2)

Posted by Geoff Longman <gl...@intelligentworks.com>.
Actually the case for 'contrib' depends on how one declares the library in
the application spec.

Geoff

----- Original Message -----
From: <ei...@uptodata.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Sunday, June 01, 2003 9:23 AM
Subject: Re: Upgrading to 2.4 alpha 5 (from 2.2)


> i didn't look very closely but i think the type should be
>   contrib:ValidatingTextField (lowercase Contrib).
>
> thanks, eitan
>
>
> Quoting Neil Clayton <ne...@cloudnine.net.nz>:
>
> > well, it has been a while since I've had the chance to do any Tapestry
> > stuff, but I found time this weekend!
> > So, time to upgrade from 2.2 to 2.4.
> >
> > I've got the following page specification (partial):
> >     <component id="editJobName" type="Contrib:ValidatingTextField">
> >         <string-binding name="displayName" key="jobNameLabel"/>
> >         <binding name="displayWidth" expression='40'/>
> >         <binding name="minimumLength" expression='1'/>
> >         <binding name="required" expression='true'/>
> >         <binding name="text"
> > expression='getEngine().getVisit().getJobBeingEdited().jobName'/>
> >     </component>
> >
> > Yet when the page is rendered, I get the exception detailed below.
> > Seems to me that there is a problem calling the setValueBinding in the
> > enhanced class, but I don't know why.
> > I'm not sure if it's being caused by an NPE (perhaps the visit is null?)
> > or if it's a syntax issue? (ognl upgrade...) or why....
> >
> > I'm a little confused :-)
> >
> > Can anyone give me some pointers of what to look for, especially since
> > this is not new code, but code that used to work on Tapestry2.2.
> > In terms of "upgrading", all I've done is fixed all the package names,
> > and modified the app specification with an updated property for the
> > visit class (it changed when the package name change was done).
> >
> > also, is there any way to get hold of the autogenerated class files?
> > I've done a brief search over the news postings, but didn't see
> > anything.  I'm guessing not, since the're generated at runtime...
> >
> > Regards,
> > Neil Clayton
> >
> > --------- Exception trace --------
> >
> > Unable to update expression '<parsed expression>' of
> >
>
org.apache.tapestry.contrib.valid.ValidatingTextField$Enhance_22@78b4c4[JobE
ditor/editJobName]
> >
> > to ExpressionBinding[JobEditor
> > getEngine().getVisit().getJobBeingEdited().jobName].
> >
> > Method "setTextBinding" failed for object
> >
>
org.apache.tapestry.contrib.valid.ValidatingTextField$Enhance_22@78b4c4[JobE
ditor/editJobName]
> > java.lang.AbstractMethodError
> >
>
org.apache.tapestry.valid.ValidField.setValueBinding(Lorg/apache/tapestry/IB
inding;)V
> >
> >
> > Stack Trace:
> >
> >     *
> >
>
org.apache.tapestry.contrib.valid.ValidatingTextField.setTextBinding(Validat
ingTextField.java:149)
> >     * sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >     *
> >
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
> >     *
> >
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
> >     * java.lang.reflect.Method.invoke(Method.java:324)
> >     * ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java)
> >     * ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java)
> >     * ognl.OgnlRuntime.callMethod(OgnlRuntime.java)
> >     * ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java)
> >     *
> >
ognl.ObjectPropertyAccessor.setPossibleProperty(ObjectPropertyAccessor.java)
> >     *
ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java)
> >     * ognl.OgnlRuntime.setProperty(OgnlRuntime.java)
> >     * ognl.ASTProperty.setValue(ASTProperty.java)
> >     * ognl.Ognl.setValue(Ognl.java)
> >     * org.apache.tapestry.util.prop.OgnlUtils.set(OgnlUtils.java:143)
> >     * org.apache.tapestry.util.prop.OgnlUtils.set(OgnlUtils.java:126)
> >     *
> >
org.apache.tapestry.AbstractComponent.setBinding(AbstractComponent.java:660)
> >     * org.apache.tapestry.pageload.PageLoader.bind(PageLoader.java:310)
> >     *
> >
org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:5
00)
> >     *
org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:758)
> >     *
org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:193)
> >     *
org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:236)
> >     *
org.apache.tapestry.engine.RequestCycle.setPage(RequestCycle.java:607)
> >     *
> >
tcdc.da4.server.console.components.job.JobsView.editJob(JobsView.java:74)
> >
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>


Re: Upgrading to 2.4 alpha 5 (from 2.2)

Posted by ei...@uptodata.com.
i didn't look very closely but i think the type should be
  contrib:ValidatingTextField (lowercase Contrib).

thanks, eitan


Quoting Neil Clayton <ne...@cloudnine.net.nz>:

> well, it has been a while since I've had the chance to do any Tapestry 
> stuff, but I found time this weekend!
> So, time to upgrade from 2.2 to 2.4.
> 
> I've got the following page specification (partial):
>     <component id="editJobName" type="Contrib:ValidatingTextField">
>         <string-binding name="displayName" key="jobNameLabel"/>
>         <binding name="displayWidth" expression='40'/>
>         <binding name="minimumLength" expression='1'/>
>         <binding name="required" expression='true'/>
>         <binding name="text" 
> expression='getEngine().getVisit().getJobBeingEdited().jobName'/>
>     </component>
> 
> Yet when the page is rendered, I get the exception detailed below.
> Seems to me that there is a problem calling the setValueBinding in the 
> enhanced class, but I don't know why. 
> I'm not sure if it's being caused by an NPE (perhaps the visit is null?) 
> or if it's a syntax issue? (ognl upgrade...) or why....
> 
> I'm a little confused :-)
> 
> Can anyone give me some pointers of what to look for, especially since 
> this is not new code, but code that used to work on Tapestry2.2.
> In terms of "upgrading", all I've done is fixed all the package names, 
> and modified the app specification with an updated property for the 
> visit class (it changed when the package name change was done).
> 
> also, is there any way to get hold of the autogenerated class files?
> I've done a brief search over the news postings, but didn't see 
> anything.  I'm guessing not, since the're generated at runtime...
> 
> Regards,
> Neil Clayton
> 
> --------- Exception trace --------
> 
> Unable to update expression '<parsed expression>' of 
>
org.apache.tapestry.contrib.valid.ValidatingTextField$Enhance_22@78b4c4[JobEditor/editJobName]
> 
> to ExpressionBinding[JobEditor 
> getEngine().getVisit().getJobBeingEdited().jobName].
> 
> Method "setTextBinding" failed for object 
>
org.apache.tapestry.contrib.valid.ValidatingTextField$Enhance_22@78b4c4[JobEditor/editJobName]
> java.lang.AbstractMethodError
>
org.apache.tapestry.valid.ValidField.setValueBinding(Lorg/apache/tapestry/IBinding;)V
> 
> 
> Stack Trace:
> 
>     *
>
org.apache.tapestry.contrib.valid.ValidatingTextField.setTextBinding(ValidatingTextField.java:149)
>     * sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     *
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     *
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     * java.lang.reflect.Method.invoke(Method.java:324)
>     * ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java)
>     * ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java)
>     * ognl.OgnlRuntime.callMethod(OgnlRuntime.java)
>     * ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java)
>     *
> ognl.ObjectPropertyAccessor.setPossibleProperty(ObjectPropertyAccessor.java)
>     * ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java)
>     * ognl.OgnlRuntime.setProperty(OgnlRuntime.java)
>     * ognl.ASTProperty.setValue(ASTProperty.java)
>     * ognl.Ognl.setValue(Ognl.java)
>     * org.apache.tapestry.util.prop.OgnlUtils.set(OgnlUtils.java:143)
>     * org.apache.tapestry.util.prop.OgnlUtils.set(OgnlUtils.java:126)
>     *
> org.apache.tapestry.AbstractComponent.setBinding(AbstractComponent.java:660)
>     * org.apache.tapestry.pageload.PageLoader.bind(PageLoader.java:310)
>     *
> org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:500)
>     * org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:758)
>     * org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:193)
>     * org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:236)
>     * org.apache.tapestry.engine.RequestCycle.setPage(RequestCycle.java:607)
>     *
> tcdc.da4.server.console.components.job.JobsView.editJob(JobsView.java:74)
>