3 Replies Latest reply on Dec 21, 2012 10:01 AM by Zeus Alberto Martínez Navarro

    java.lang.ClassCastException RichFaces 3.3.1

    Vinicius Faleiro Newbie

      Hello!!!!

       

      Does someone know what is going on?

       

      While testing the rich:page component, I got this error:

       

      This is my test page:

      <%@page contentType="text/html" pageEncoding="UTF-8"%>
      <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
      <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
      <%@taglib prefix="rich" uri="http://richfaces.ajax4jsf.org/rich"%>
      <%@taglib prefix="a4j" uri="https://ajax4jsf.dev.java.net/ajax"%> width="980" sidebarPosition="left" sidebarWidth="300">
              <f:facet name="header">
                      header
              </f:facet>
              <f:facet name="sidebar">
                      menu  stuff
              </f:facet>
                        body of the components
              <f:facet name="footer">
                  footer
              </f:facet>
          </rich:page>
      <rich:page
      

       

      java.lang.ClassCastException: org.ajax4jsf.component.AjaxViewRoot cannot be cast to org.richfaces.component.html.HtmlPage
              at org.richfaces.taglib.PageTag.setProperties(PageTag.java:264)
              at javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:614)
              at javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1142)
              at org.apache.jsp.Main_jsp._jspx_meth_rich_page_0(Main_jsp.java from :98)
              at org.apache.jsp.Main_jsp._jspService(Main_jsp.java from :67)
              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.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 com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:410)
              at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:468)
              at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:140)
              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:110)
              at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
              at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
              at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
              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:178)
              at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
              at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
              at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
              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.StandardWrapperValve.invoke(StandardWrapperValve.java:313)
              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:1093)
              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:1093)
              at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:291)
              at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:666)
              at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:597)
              at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:872)
              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.connector.grizzly.TaskBase.run(TaskBase.java:264)
              at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)