Yes, so ArticleUIBean has the getter and setter.

The magical part happens when I remove "implements IArticleUIBean"
from AbstractArticleUIBean (a super class of ArticleUIBean) - then
everything works.

(IArticleUIBean also has the getters/setters defined as well... but it
shouldn't matter, should it?).

-Dave

On 6/2/05, Mike Burati <[EMAIL PROTECTED]> wrote:
> 
> From the looks of the code in the PropertyResolverImpl where you're
> getting that exception, it's Java reflection that's saying that there's
> no such setter (write method) for that property:
> 
>         PropertyDescriptor propertyDescriptor =
> getPropertyDescriptor(base, name);
>         Method m = propertyDescriptor.getWriteMethod();
>         if (m == null)
>         {
>             throw new PropertyNotFoundException(
>                 "Bean: " + base.getClass().getName() + ", property: " +
> name);
>         }
> 
> Might be worth trying similar code standalone on your bean.
> Note, base is the instance of the bean class (ArticleUIBean in your
> case) and name is the name of the property.
> 
> So ArticleUIBean contains a public method setSecretsBean ?
> 
> From the location of the exception, it looks like reflection is finding
> the property, but not a public writer method for it.
> If it wasn't finding the property at all, I would expect the exception
> to come from getPropertyDescriptor instead of from setProperty.
> 
> 
> 
> 
> -----Original Message-----
> From: David Tashima [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 02, 2005 1:57 PM
> To: [EMAIL PROTECTED]
> Cc: MyFaces Discussion
> Subject: Re: PropertyNotFoundException when managed bean implements an
> interface?
> 
> Here is the trace:
> 109687 [http-8080-Processor24] ERROR
> org.apache.myfaces.el.PropertyResolverImpl  -
> com.winerhino.ui.ArticleUIBean
> javax.faces.el.PropertyNotFoundException: Bean:
> com.winerhino.ui.ArticleUIBean, property: secretsBean
> 
>         at
> org.apache.myfaces.el.PropertyResolverImpl.setProperty(PropertyResolverI
> mpl.java:372)
>         at
> org.apache.myfaces.el.PropertyResolverImpl.setValue(PropertyResolverImpl
> .java:180)
>         at
> org.apache.myfaces.config.ManagedBeanBuilder.initializeProperties(Manage
> dBeanBuilder.java:151)
>         at
> org.apache.myfaces.config.ManagedBeanBuilder.buildManagedBean(ManagedBea
> nBuilder.java:63)
>         at
> org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResol
> verImpl.java:328)
>         at
> org.apache.myfaces.el.ValueBindingImpl$ELVariableResolver.resolveVariabl
> e(ValueBindingImpl.java:637)
>         at
> org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124)
>         at
> org.apache.myfaces.el.ValueBindingImpl.resolveToBaseAndProperty(ValueBin
> dingImpl.java:518)
> 
>         at
> org.apache.myfaces.el.MethodBindingImpl.resolveToBaseAndProperty(MethodB
> indingImpl.java:195)
>         at
> org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:12
> 3)
>         at
> org.apache.myfaces.application.ActionListenerImpl.processAction(ActionLi
> stenerImpl.java:62)
>         at javax.faces.component.UICommand.broadcast(UICommand.java:106)
>         at
> javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:110)
>         at
> javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:184)
>         at
> org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleIm
> pl.java:271)
>         at
> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:10
> 2)
>         at
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:109)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> tionFilterChain.java:252)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> erChain.java:173)
>         at
> org.apache.myfaces.component.html.util.MultipartFilter.doFilter(Multipar
> tFilter.java:105)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> tionFilterChain.java:202)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> erChain.java:173)
>         at
> com.winerhino.servlet.HibernateFilter.doFilter(HibernateFilter.java:41)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> tionFilterChain.java:202)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> erChain.java:173)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> e.java:213)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
> e.java:178)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> :126)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> :105)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
> java:107)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
> 48)
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:85
> 6)
>         at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
> onnection(Http11Protocol.java:744)
>         at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
> .java:527)
>         at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
> erWorkerThread.java:80)
>         at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
> .java:684)
>         at java.lang.Thread.run(Unknown Source)
> 
> 
> 
> 
> 
> On 6/2/05, Martin Marinschek <[EMAIL PROTECTED]> wrote:
> > can you post the stacktrace?
> >
> > regards,
> >
> > Martin
> >
> > On 6/2/05, David Tashima <[EMAIL PROTECTED]> wrote:
> > > Hey everyone,
> > >
> > > I get a very weird PropertyNotFoundException when trying to
> > > initialize a managed bean whose class implements an interface. It
> > > can't find the setter for a property, even though the setter exists
> > > on both the class and the interface.
> > >
> > > When I strip the "implements IInterface", it works great.
> > >
> > > This doesn't make any sense to me, as I didn't change any of the
> > > face-config.xml (it still points to the original class).
> > >
> > > Has anyone seen this? I'm on 1.0.9.
> > >
> > > -Dave
> > >
> >
>

Reply via email to