1 Reply Latest reply on Nov 19, 2008 10:43 AM by Ilya Shaikovsky

    Having problem with rich:tree

    Anthony Galati Newbie

      I am getting the following exception when rendering.

      java.lang.ClassCastException: java.util.Vector
       at org.richfaces.model.AbstractTreeDataModel.setWrappedData(AbstractTreeDataModel.java:61)
       at org.richfaces.component.UITree.createDataModel(UITree.java:516)
       at org.richfaces.component.UITree.resetDataModel(UITree.java:292)
       at org.ajax4jsf.component.UIDataAdaptor.encodeBegin(UIDataAdaptor.java:1058)
       at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:269)
       at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:242)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
       at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
       at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:199)
       at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:194)
       at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
       at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
       at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
       at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
       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 com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
       at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
       at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
       at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
       at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:623)
       at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
       at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
       at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
       at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
       at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
       at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
       at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
       at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
       at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
       at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
       at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
       at java.lang.Thread.run(Thread.java:595)
      


      I am running on OC4J 10.1.3.3, JDK1.5, SEAM 2.0.2, richfaces 3.2.2

      here is the xhtml

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:s="http://jboss.com/products/seam/taglib"
       xmlns:rich="http://richfaces.org/rich"
       xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
      
      <head>
       <title>Seam Hello World</title>
      </head>
      <body>
       <h1>Seam Hello World</h1>
       <h:form>
       Please enter your name:<br/>
       <h:inputText value="#{person.name}" /><br/>
       </h:form>
       <rich:panel>
       <h:panelGrid columns="2">
       <rich:tree switchType="client" style="width:300px" value="#{employeeList.employees}" var="employee">
       <rich:treeNode>
       <h:outputText value="#{employee.getFullName()}" />
       </rich:treeNode>
       </rich:tree>
       <rich:scrollableDataTable rowKeyVar="rkv" frozenColCount="1" height="400px"
       id="employees" columnClasses="col"
       value="#{employeeList.employees}" var="employee" sortMode="single">
       <rich:column id="employeeNameLast">
       <f:facet name="header"><h:outputText styleClass="headerText" value="Last Name" /></f:facet>
       <h:outputText value="#{employee.nameLast}" />
       </rich:column>
       <rich:column id="employeeNameFirst">
       <f:facet name="header"><h:outputText styleClass="headerText" value="First Name" /></f:facet>
       <h:outputText value="#{employee.nameFirst}" />
       </rich:column>
       <rich:column id="employeeNameMiddle">
       <f:facet name="header"><h:outputText styleClass="headerText" value="Middle Initial" /></f:facet>
       <h:outputText value="#{employee.nameMiddle}" />
       </rich:column>
       <rich:column id="employeeNameFull">
       <f:facet name="header"><h:outputText styleClass="headerText" value="Full Name" /></f:facet>
       <h:outputText value="#{employee.getFullName()}"/>
       </rich:column>
       <rich:column id="employeeSsid">
       <f:facet name="header"><h:outputText styleClass="headerText" value="SSID" /></f:facet>
       <h:outputText value="#{employee.empInformation[0].ssid}"/>
       </rich:column>
       <rich:column id="employeePicture">
       <f:facet name="header"><h:outputText styleClass="headerText" value="Picture" /></f:facet>
       <img height="50px" width="50px" src="TestServlet?empId=#{employee.employeeId}" />
       </rich:column>
       </rich:scrollableDataTable>
       </h:panelGrid>
       </rich:panel>
      
      
      
      
      
      </body>
      </html>
      


      Any ideas?