4 Replies Latest reply on Apr 20, 2010 2:28 PM by Edilmar Alves

    Problem with RichFaces 3.3.3 + JSF 2.0

    Edilmar Alves Expert

      Hi,

       

      Today I updated my NetBeans 6.8 to use RichFaces 3.3.3.

      Then, I tested my JSF 1.2 + Facelets 1.1.14 webapp with new RichFaces and all worked fine.

       

      After this, I tried to reconfigure my webapp to use JSF 2.0 library from NB 6.8.

      I did these steps:

      1) insert into web.xml:

           <context-param>
                      <param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>
                      <param-value>true</param-value>
              </context-param>
      

      2) remove old JSF 1.2 library from webapp project

      3) insert new JSF 2.0 library to webapp project (jsf-api.jar and jsf-impl.jar)

      4) I put the richfaces-impl-jsf2-3.3.3.Final.jar instead of richfaces-impl-3.3.3.Final.jar

      5) change into faces-config.xml version 1.2 to 2.0, but this arises this error:

      javax.faces.FacesException: Can't parse configuration file: jndi:/server/sitesat2/WEB-INF/faces-config.xml: Error at line 8 column 118: cvc-enumeration-valid: Value '2.0' is not facet-valid with respect to enumeration '[1.2]'. It must be a value from the enumeration.
      

      Then, I came back to 1.2.

       

      After, the wepapp was loaded fine into my GlassFish 2.1 server, but when I tried to call the first page in Firefox, the server arised this error:

      Exception in the filter chain
      javax.servlet.ServletException: PWC1244: Servlet execution threw an exception
              at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:450)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
              at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
              at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
              at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
              at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
              at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:873)
              at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
              at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:558)
              at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:490)
              at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:382)
              at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:783)
              at org.apache.jsp.index_jsp._jspService(index_jsp.java from :47)
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:109)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
              at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:389)
              at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:486)
              at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:380)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
              at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:315)
              at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
              at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
              at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
              at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
              at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
              at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
              at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
              at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
              at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
              at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
              at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
              at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
              at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
              at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288)
              at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)
              at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:579)
              at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:831)
              at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
              at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
              at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
              at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
              at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
              at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
      Caused by: java.lang.NoSuchMethodError: javax.faces.context.FacesContext.getAttributes()Ljava/util/Map;
              at org.richfaces.context.PartialViewContextImpl.setPartialViewContextIndicator(PartialViewContextImpl.java:51)
              at org.richfaces.context.PartialViewContextImpl.resetPartialViewContextIndicator(PartialViewContextImpl.java:67)
              at org.ajax4jsf.application.AjaxStateManager.writeState(AjaxStateManager.java:70)
              at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:620)
              at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
              at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
              at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
              at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
              at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
              at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
              ... 49 more
      

       

      Now, I don't know what JAR I had missed to setup and to find the getAttributes() method...

       

      Thanks for any help.