0 Replies Latest reply on May 19, 2010 4:38 PM by Jenni jin

    Ajax4jsf and myfaces

    Jenni jin Newbie
      Has anyone seen the following error when trying to use the following:

      Richface version: 3.2.1.GA
      Tomcat 6
      JDK 6
      MyFaces: 1.2.2 or 2.0

      Web.xml:

      ...
      <context-param>
            <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
            <param-value>true</param-value>
         </context-param>

         <context-param>
              <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
              <param-value>com.sun.facelets.FaceletViewHandler</param-value>
         </context-param>
      ...
      <context-param>
            <description>
                  Used for encrypting view state. Only relevant for client
                  side state saving. See MyFaces wiki/web site documentation
                  for instructions on how to configure an application for
                  diffenent encryption strengths.
              </description>
            <param-name>org.apache.myfaces.SECRET</param-name>
            <param-value>NzY1NDMyMTA=</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>
      ...
      <listener>
            <listener-class>
               org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
         </listener>

      faces-config.xml:
      <application>
            <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
         </application>




      javax.faces.FacesException: java.security.NoSuchAlgorithmException: Cannot find any provider supporting DES/ECB/PKCS5Padding

              at org.apache.myfaces.shared_impl.util.StateUtils.symmetric(StateUtils.java:476)
              at org.apache.myfaces.shared_impl.util.StateUtils.symmetric(StateUtils.java:514)
              at org.apache.myfaces.shared_impl.util.StateUtils.encrypt(StateUtils.java:223)
              at org.apache.myfaces.shared_impl.util.StateUtils.construct(StateUtils.java:173)
              at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.writeViewStateField(HtmlResponseStateManager.java:120)
              at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.writeState(HtmlResponseStateManager.java:111)
              at javax.faces.render.ResponseStateManager.writeState(ResponseStateManager.java:67)
              at org.apache.myfaces.application.jsp.JspStateManagerImpl.writeState(JspStateManagerImpl.java:605)
              at org.ajax4jsf.application.AjaxStateManager.writeState(AjaxStateManager.java:199)
              at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:606)
              at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
              at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:189)

              at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:122)
              at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:207)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:191)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              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.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:100)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)

              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:127)
              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:298)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)

              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
              at java.lang.Thread.run(Unknown Source)

      Caused by: java.security.NoSuchAlgorithmException: Cannot find any provider supporting DES/ECB/PKCS5Padding
              at javax.crypto.Cipher.getInstance(DashoA13*..)
              at org.apache.myfaces.shared_impl.util.StateUtils.symmetric(StateUtils.java:451)

              ... 38 more