1 Reply Latest reply on May 10, 2006 10:53 AM by Gavin King

    PropertyNotFoundException

    Stefan Willems Newbie

      Hi,

      I'm trying to build my own Seam-Apllication, having an error for some days now.

      the stacktrace:

      14:58:36,634 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
      javax.faces.el.PropertyNotFoundException: Bean: $Proxy94, property: formulare
       at org.apache.myfaces.el.PropertyResolverImpl.getPropertyDescriptor(PropertyResolverImpl.java:445)
       at org.apache.myfaces.el.PropertyResolverImpl.getPropertyDescriptor(PropertyResolverImpl.java:416)
       at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:379)
       at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:71)
       at org.apache.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate(ELParserHelper.java:532)
       at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
       at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:378)
       at javax.faces.component.UIData.getValue(UIData.java:779)
       at javax.faces.component.UIData.createDataModel(UIData.java:545)
       at javax.faces.component.UIData.getDataModel(UIData.java:534)
       at javax.faces.component.UIData.getRowCount(UIData.java:103)
       at org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeInnerHtml(HtmlTableRendererBase.java:124)
       at org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeChildren(HtmlTableRendererBase.java:94)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:319)
       at javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:343)
       at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:251)
       at org.apache.myfaces.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTagBase.java:55)
       at org.apache.jsp.hauptmenu_jsp._jspx_meth_h_dataTable_0(hauptmenu_jsp.java:178)
       at org.apache.jsp.hauptmenu_jsp._jspx_meth_f_view_0(hauptmenu_jsp.java:128)
       at org.apache.jsp.hauptmenu_jsp._jspService(hauptmenu_jsp.java:88)
       at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
       at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
       at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
       at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
       at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
       at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
       at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
       at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:59)
       at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       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:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      14:58:36,638 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
      javax.faces.FacesException: Bean: $Proxy94, property: formulare
       at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)
       at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
       at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:59)
       at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       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:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: org.apache.jasper.JasperException: Bean: $Proxy94, property: formulare
       at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
       at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
       at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
       at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
       at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
       at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
       at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
       ... 23 more
      


      The JSP:
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
      
      
      <html>
      <head>
      .
      .
      .
       <f:view>
       <h:dataTable value="#{hauptmenu.formulare}"
       var="links">
       <h:column>
       <h:outputLink value="#{links.name}">
       <h:outputText value="#{links.beschreibung}" />
       </h:outputLink>
       </h:column>
       </h:dataTable>
       </f:view>
      .
      .
      .
      


      The Component:
      package gv.walzen.beans;
      
      import java.util.*;
      
      import javax.persistence.EntityManager;
      import javax.persistence.PersistenceContext;
      
      
      import org.jboss.seam.annotations.In;
      import org.jboss.seam.annotations.Out;
      import org.jboss.seam.annotations.datamodel.DataModel;
      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.annotations.Factory;
      import org.jboss.seam.contexts.Context;
      import org.jboss.seam.core.FacesMessages;
      import javax.ejb.Interceptors;
      import javax.ejb.Stateful;
      
      import org.jboss.seam.ejb.SeamInterceptor;
      
      import gv.walzen.entities.Mitarbeiter;
      import gv.walzen.entities.Formulare;
      import gv.walzen.interfaces.Hauptmenu;
      
      @Stateful
      @Name("hauptmenu")
      @Interceptors(SeamInterceptor.class)
      
      public class HauptmenuBean implements Hauptmenu
      {
      
       @PersistenceContext
       private EntityManager walzenDB;
      
       @In
       private Context sessionContext;
      
       @In(create=true)
       private FacesMessages facesMessages;
      
       @Out
       public List<Formulare> formulare;
      
       @Factory("formulare")
       public void showMenu(){
       //Eingeloggten Mitarbeiter besorgen
       Mitarbeiter ma = (Mitarbeiter) sessionContext.get("loggedinUser");
       if ( ma != null ){
       formulare = walzenDB.createQuery("select f.name, f.beschreibung from Formulare f, Berechtigungen b, Rollen r, Mitarbeiterrollen mr, Mitarbeiter m " +
       " where f.id=b.formulare " +
       " and mr.rollen=r.id" +
       " and mr.mitarbeiter=m.id" +
       " and m.id = :mitarbeiter")
       .setParameter("mitarbeiter",ma.getId())
       .getResultList();
       }else{
       facesMessages.add("Sie sind nicht eingeloggt!");
       }
       }
      
      }
      


      Can anybody help me?

      Thanks in advace

      Stefan