3 Replies Latest reply on Dec 12, 2012 6:05 AM by Rashid Mahmood

    Problem Using RichFaces + MyFaces 1.2.5 + Tomahawk + Facelet

    Jose Herrera Newbie

      Hi, can anybody help me with this problem.

      I'm using MyFaces + Tomahawk + Facelets without problems, but when I added RichFaces I got the previous message.

      /Componente.jsf No saved view state could be found for the view identifier: /Componente.jsf

      Caused by:
      javax.faces.application.ViewExpiredException - /Componente.jsfNo saved view state could be found for the view identifier: /Componente.jsf



      this is the trace
      javax.faces.application.ViewExpiredException: /Componente.jsfNo saved view state could be found for the view identifier: /Componente.jsf
      at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:88)
      at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:103)
      at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:151)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:301)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:154)
      at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:260)
      at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:366)
      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:493)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:619)



      This is my web.xml configuration 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">
      <!--Comienza richfaces -->
      <context-param>
      <param-name>org.richfaces.SKIN</param-name>
      <param-value>blueSky</param-value>
      </context-param>

      <display-name>RichFaces Filter</display-name>
      <filter-name>richfaces</filter-name>
      <filter-class>org.ajax4jsf.Filter</filter-class>

      <filter-mapping>
      <filter-name>richfaces</filter-name>
      <servlet-name>Faces Servlet</servlet-name>
      REQUEST
      FORWARD
      INCLUDE
      </filter-mapping>
      <context-param>

      <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>

      <param-value>com.sun.facelets.FaceletViewHandler</param-value>

      </context-param>
      <!-- Termina RichFaces -->

      <context-param>
      <param-name>com.sun.faces.verifyObjects</param-name>
      <param-value>false</param-value>
      </context-param>
      <context-param>
      <param-name>com.sun.faces.validateXml</param-name>
      <param-value>true</param-value>
      </context-param>
      <context-param>
      <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
      <param-value>server</param-value>
      </context-param>
      <context-param>
      <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
      <param-value>.xhtml</param-value>
      </context-param>
      <context-param>
      <param-name>facelets.DEVELOPMENT</param-name>
      <param-value>false</param-value>
      </context-param>
      <context-param>
      <param-name>facelets.SKIP_COMMENTS</param-name>
      <param-value>true</param-value>
      </context-param>

      <context-param>
      This parameter tells MyFaces if javascript code should be allowed in the
      rendered HTML output.
      If javascript is allowed, command_link anchors will have javascript code
      that submits the corresponding form.
      If javascript is not allowed, the state saving info and nested parameters
      will be added as url parameters.
      Default: "true"
      <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
      <param-value>true</param-value>
      </context-param>
      <context-param>
      <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
      <param-value>false</param-value>
      </context-param>
      <context-param>
      If true, rendered HTML code will be formatted, so that it is "human readable".
      i.e. additional line separators and whitespace will be written, that do not
      influence the HTML code.
      Default: "true"
      <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
      <param-value>true</param-value>
      </context-param>
      <context-param>
      If true, a javascript function will be rendered that is able to restore the
      former vertical scroll on every request. Convenient feature if you have pages
      with long lists and you do not want the browser page to always jump to the top
      if you trigger a link or button action that stays on the same page.
      Default: "false"
      <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
      <param-value>true</param-value>
      </context-param>
      <!-- Tomahawk -->

      <filter-name>extensionsFilter</filter-name>
      <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>

      <!-- extension mapping for adding , , and other resource tags
      to JSF-pages
      -->
      <filter-mapping>
      <filter-name>extensionsFilter</filter-name>
      <servlet-name>Faces Servlet</servlet-name>
      </filter-mapping>
      <!-- extension mapping for serving page-independent resources
      (javascript, stylesheets, images, etc.)
      -->
      <filter-mapping>
      <filter-name>extensionsFilter</filter-name>
      <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
      </filter-mapping>
      <!-- Termina Tomahawk -->

      <servlet-name>Faces Servlet</servlet-name>
      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
      <load-on-startup>1</load-on-startup>

      <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>*.jsf</url-pattern>
      </servlet-mapping>
      <session-config>
      <session-timeout>
      30
      </session-timeout>
      </session-config>
      <welcome-file-list>
      <welcome-file>/template-client.jsf</welcome-file>
      </welcome-file-list>
      </web-app>

        • 1. Re: Problem Using RichFaces + MyFaces 1.2.5 + Tomahawk + Fac
          Ilya Shaikovsky Master

          Check that view handler not defined twice(in web.xml and faces-config). Remove any duplicate if so.

          • 2. Re: Problem Using RichFaces + MyFaces 1.2.5 + Tomahawk + Fac
            Jose Herrera Newbie

            Thanks, in the faces-config.xml was the view handler
            I remove the lines, and my application worked properly.

            • 3. Re: Problem Using RichFaces + MyFaces 1.2.5 + Tomahawk + Facelet
              Rashid Mahmood Newbie

              Hi,

               

              I am using Spring 2.0.5 + MyFaces 2.1.9. + Tomahawk It is working fine. When i added Richfaces 3.1.6, it gives me same exception:

               

              15:42:26,161 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/i8Microbank].[Faces Servlet]] (http-localhost-127.0.0.1-8080-3) Servlet.service() for servlet Faces Servlet threw exception: javax.faces.application.ViewExpiredException: /ah-web/searchDistributors.jsfNo saved view state could be found for the view identifier: /ah-web/searchDistributors.jsf

                        at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:132) [myfaces-bundle-2.1.9.jar:]

                        at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:170) [myfaces-bundle-2.1.9.jar:]

                        at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117) [myfaces-bundle-2.1.9.jar:]

                        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197) [myfaces-api-2.1.9.jar:]

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                        at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:100) [tomahawk-1.1.6.jar:]

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                        at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141) [richfaces-impl-3.1.6.GA.jar:]

                        at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281) [richfaces-impl-3.1.6.GA.jar:]

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                        at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119) [sitemesh-2.3.jar:]

                        at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55) [sitemesh-2.3.jar:]

                        at org.extremecomponents.table.filter.SitemeshPageFilter.doFilter(SitemeshPageFilter.java:39) [extremecomponents-1.0.1.jar:]

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                        at org.extremecomponents.table.filter.AbstractExportFilter.doFilter(AbstractExportFilter.java:49) [extremecomponents-1.0.1.jar:]

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96) [spring-2.0.5.jar:]

                        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) [spring-2.0.5.jar:]

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265) [acegi-security-1.0.4.jar:]

                        at com.inov8.iserv.webapp.filter.ForceChangePasswordFilter.doFilter(ForceChangePasswordFilter.java:67) [classes:]

                        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) [acegi-security-1.0.4.jar:]

                        at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) [acegi-security-1.0.4.jar:]

                        at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) [acegi-security-1.0.4.jar:]

                        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) [acegi-security-1.0.4.jar:]

                        at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110) [acegi-security-1.0.4.jar:]

                        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) [acegi-security-1.0.4.jar:]

                        at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) [acegi-security-1.0.4.jar:]

                        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) [acegi-security-1.0.4.jar:]

                        at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142) [acegi-security-1.0.4.jar:]

                        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) [acegi-security-1.0.4.jar:]

                        at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81) [acegi-security-1.0.4.jar:]

                        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) [acegi-security-1.0.4.jar:]

                        at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:229) [acegi-security-1.0.4.jar:]

                        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) [acegi-security-1.0.4.jar:]

                        at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:106) [acegi-security-1.0.4.jar:]

                        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) [acegi-security-1.0.4.jar:]

                        at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:286) [acegi-security-1.0.4.jar:]

                        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) [acegi-security-1.0.4.jar:]

                        at org.acegisecurity.concurrent.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:95) [acegi-security-1.0.4.jar:]

                        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) [acegi-security-1.0.4.jar:]

                        at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149) [acegi-security-1.0.4.jar:]

                        at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98) [acegi-security-1.0.4.jar:]

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                        at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147) [tomahawk-1.1.6.jar:]

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                        at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]

                        at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]

                        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                        at java.lang.Thread.run(Unknown Source) [:1.7.0_09]