4 Replies Latest reply on May 16, 2011 3:30 PM by alesj

    session bean doesn't have property that it has

    brianx

      this code generated by forge:

                    <ui:repeat var="entity" value="#{serviceBean.list}">
                        <li>#{entity.uid} <h:link outcome="view" value="[view]">
                            <f:param name="uid" value="#{entity.uid}"/>
                        </h:link> #{entity} </li>
                    </ui:repeat>

      ...swapped out generated ServiceBean

      @Transactional @Named @Stateful @RequestScoped public class ServiceBean extends PersistenceUtil {
        private List<Service> list=null;
        private Service service=new Service();

      ...and replaced it with

      @Transactional @Named ("serviceBean") @Stateful @RequestScoped
      @DeclareRoles({ ContainerSecurityRole.ADMIN })
      @LocalBinding(jndiBinding = ServiceQuery.LOCAL_JNDI_NAME)
      @RemoteBinding(jndiBinding = ServiceQuery.REMOTE_JNDI_NAME)
      public class ServiceQueryBean extends AbstractQuery
        implements ServiceQueryLocal, ServiceQueryRemote
      {
        /** list of services in response to initial query */
        private List<Service> list=null;
        private Service service = null;

      ...list.xhtml now throwing exception:

      10:27:06,629 SEVERE [javax.enterprise.resource.webcontainer.jsf.application] Error Rendering View[/scaffold/service/list.xhtml]: javax.el.PropertyNotFoundException: /scaffold/service/list.xhtml @40,59 value="#{serviceBean.list}": ... _$$_WeldClientProxy' does not have the property 'list'.

      ...so I obviously have something mis-configured... but what?  I even moved the ServiceQueryBean into the same package where ServiceBean was generated and renamed ServiceBean @Named ("bob") so that it couldn't be found.

      the container is finding the ServiceQueryBean, and complaining that it doesn't have 'list'.  It does, as indicated above and has public set/get methods as well.  Confused.