1 Reply Latest reply on Jul 22, 2009 5:12 PM by Joris Mans

    Getting an Expression Error: Named Object: org.richfaces.spa

    Joris Mans Newbie

      I have created an application in Eclipse (from scratch, manually added all dependencies) in which I can use spring, hibernate, jsf/richfaces.

      Everything works except for the richfaces part. When using some very simple jsf it shows in the browser, however as soon as I add richfaces and i put for instance

      <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
      <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
      
      ....
      
      <rich:spacer width="1" height="50" />
      ....


      in my jsp file I get the following error:

      javax.faces.FacesException: Expression Error: Named Object: org.richfaces.spacer not found.
      com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:570)
      javax.faces.webapp.UIComponentELTag.createComponent(UIComponentELTag.java:226)
      javax.faces.webapp.UIComponentClassicTagBase.createChild(UIComponentClassicTagBase.java:486)
      javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:670)
      javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1142)
      org.apache.jsp.index_jsp._jspx_meth_rich_005fspacer_005f0(index_jsp.java:187)
      org.apache.jsp.index_jsp._jspx_meth_h_005fform_005f0(index_jsp.java:150)
      org.apache.jsp.index_jsp._jspx_meth_f_005fview_005f0(index_jsp.java:106)
      org.apache.jsp.index_jsp._jspService(index_jsp.java:69)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:410)
      com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:468)
      com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:140)
      com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
      com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
      org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
      org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)


      I have been searching for hours but I cannot fix it, it is driving me crazy :/
      I have RichFaces 3.3.1 and I am running the application on Tomcat 6.0.



        • 1. Re: Getting an Expression Error: Named Object: org.richfaces
          Joris Mans Newbie

          This is my web.xml file

          <?xml version="1.0" encoding="UTF-8"?>
          <web-app version="2.5"
           xmlns="http://java.sun.com/xml/ns/javaee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
           http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
           <welcome-file-list>
           <welcome-file>index.jsp</welcome-file>
           </welcome-file-list>
           <context-param>
           <param-name>contextConfigLocation</param-name>
           <param-value>classpath:spring.cfg.xml</param-value>
           </context-param>
           <filter>
           <display-name>RichFaces Filter</display-name>
           <filter-name>richfaces</filter-name>
           <filter-class>org.ajax4jsf.Filter</filter-class>
           </filter>
           <filter-mapping>
           <filter-name>richfaces</filter-name>
           <servlet-name>Faces Servlet</servlet-name>
           <dispatcher>REQUEST</dispatcher>
           <dispatcher>FORWARD</dispatcher>
           <dispatcher>INCLUDE</dispatcher>
           </filter-mapping>
          <servlet>
           <servlet-name>Faces Servlet</servlet-name>
           <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
           <load-on-startup>1</load-on-startup>
          </servlet>
          <servlet-mapping>
           <servlet-name>Faces Servlet</servlet-name>
           <url-pattern>*.jsf</url-pattern>
          </servlet-mapping>
          
           <listener>
           <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
          </listener>
          </web-app>