4 Replies Latest reply on Jun 18, 2009 9:12 AM by Tom Fusillo

    Error with org.ajax4jsf.renderkit.AjaxChildrenRenderer.encod

    Tom Fusillo Newbie

      All,

      Please take a look at the following stack trace. We are new to using Richfaces and are having this problem relative to a Richtree implementation. Each time we click oin a node in the Richtree, it loads a table on the page that pulls from a DB. What worries me is the number of:

      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren

      errors. I don't understand why there are so many.

      SEVERE: Exception in the filter chain
      javax.servlet.ServletException: Servlet execution threw an exception
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:313)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      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: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(Unknown Source)
      Caused by: java.lang.StackOverflowError
      at java.lang.AbstractStringBuilder.append(Unknown Source)
      at java.lang.StringBuilder.append(Unknown Source)
      at org.ajax4jsf.javascript.ScriptUtils.addEncodedString(ScriptUtils.java:176)
      at org.ajax4jsf.javascript.ScriptUtils.toScript(ScriptUtils.java:113)
      at org.ajax4jsf.javascript.ScriptUtils.toScript(ScriptUtils.java:103)
      at org.ajax4jsf.javascript.ScriptUtils.toScript(ScriptUtils.java:103)
      at org.richfaces.renderkit.ScriptOptions.appendScript(ScriptOptions.java:48)
      at org.ajax4jsf.javascript.ScriptStringBase.toScript(ScriptStringBase.java:39)
      at org.ajax4jsf.javascript.ScriptUtils.toScript(ScriptUtils.java:58)
      at org.richfaces.renderkit.NodeRendererBase.getScriptOptions(NodeRendererBase.java:370)
      at org.richfaces.renderkit.html.TreeNodeRenderer.doEncodeBegin(TreeNodeRenderer.java:312)
      at org.richfaces.renderkit.html.TreeNodeRenderer.doEncodeBegin(TreeNodeRenderer.java:106)
      at org.ajax4jsf.renderkit.RendererBase.encodeBegin(RendererBase.java:100)
      at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:809)
      at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:275)
      at org.richfaces.renderkit.TreeRendererBase$DataVisitorWithLastElement.process(TreeRendererBase.java:2
      at org.richfaces.model.AbstractTreeDataModel.processElement(AbstractTreeDataModel.java:116)
      at org.richfaces.model.TreeDataModel.doWalk(TreeDataModel.java:115)
      at org.richfaces.model.TreeDataModel.doWalk(TreeDataModel.java:154)
      at org.richfaces.model.TreeDataModel.doWalk(TreeDataModel.java:154)
      at org.richfaces.model.TreeDataModel.walk(TreeDataModel.java:178)
      at org.richfaces.component.UITree.walk(UITree.java:422)
      at org.richfaces.renderkit.TreeRendererBase.writeContent(TreeRendererBase.java:672)
      at org.richfaces.renderkit.TreeRendererBase.encodeChildren(TreeRendererBase.java:618)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:827)
      at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:277)
      at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)
      at org.ajax4jsf.renderkit.html.AjaxOutputPanelRenderer.encodeChildren(AjaxOutputPanelRenderer.java:78)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:827)
      at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:277)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:166)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157)
      at org.ajax4jsf.renderkit.AjaxContainerRenderer.encodeAjax(AjaxContainerRenderer.java:123)
      at org.ajax4jsf.component.AjaxViewRoot.encodeAjax(AjaxViewRoot.java:677)
      at org.ajax4jsf.component.AjaxViewRoot.encodeChildren(AjaxViewRoot.java:548)
      at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:277)
      at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)
      at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:279)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:166)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157)
      at org.ajax4jsf.renderkit.AjaxContainerRenderer.encodeAjax(AjaxContainerRenderer.java:123)
      at org.ajax4jsf.component.AjaxViewRoot.encodeAjax(AjaxViewRoot.java:677)
      at org.ajax4jsf.component.AjaxViewRoot.encodeChildren(AjaxViewRoot.java:548)
      at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:277)
      at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)
      at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:279)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:166)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83)

        • 2. Re: Error with org.ajax4jsf.renderkit.AjaxChildrenRenderer.e
          Tom Fusillo Newbie

          Here's my code:

          <%@page contentType="text/html"%>
          <%@page pageEncoding="UTF-8"%>
          
          <%@taglib uri="http://java.sun.com/jsf/core"% prefix="f"%>
          <%@taglib uri="http://java.sun.com/jsf/html"% prefix="h"%>
          <%@taglib uri="http://richfaces.org/rich" prefix="rich"%>
          <%@taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
          
          <html>
           <head>
           <meta http-equiv="Content-Style-Type" content="text/css" />
           <title>WRAMC TBI Database</title>
           <link href="css/layout.css" rel="stylesheet" type="text/css" />
           </head>
           <body>
           <f:view>
           <a4j:outputPanel ajaxRendered="true">
           <img src="images/WRTopBanner.jpg"/>
           <rich:tabPanel style="width:995px;">
           <rich:tab label="Home">
           <h:outputText value="Testing Home"/>
           </rich:tab>
           <rich:tab label="Workspace">
           <rich:tabPanel>
           <rich:tab label="Table">
           <h:panelGrid columns="2">
           <h:form>
           <a4j:outputPanel ajaxRendered="true">
           <rich:tree id="nav" value="#{tree.tablesNode}" switchType="client" var="table"
           nodeSelectListener="#{tree.processTreeNodeImplSelection}"
           style="width:295px; height:500px;" nodeFace="#{table.type}"
           ajaxSubmitSelection="true">
           <rich:treeNode type="root">
           <h:outputText value="#{table.name}"/>
           </rich:treeNode>
           <rich:treeNode type="table">
           <h:outputText id="tables" value="#{table.name}">
           <rich:contextMenu attachTo="tables" submitMode="ajax">
           <rich:menuItem value="Open Table" ignoreDupResponses="true">
           <a4j:actionparam name="tableName" value="#{table.name}" assignTo="#{tree.table}"
           actionListener="#{tree.processTable}"/>
           </rich:menuItem>
           </rich:contextMenu>
           </h:outputText>
           </rich:treeNode>
           <rich:treeNode type="variable">
           <h:outputText id="tableVar" value="#{table.name}" />
           <rich:contextMenu attachTo="tableVar" submitMode="ajax">
           <rich:menuItem value="Filter" ignoreDupResponses="true">
           <a4j:actionparam name="filterId" value="#{table.id}" assignTo="#{tree.filterId}"
           actionListener="#{tree.processFilter}"/>
           <rich:componentControl for="filter" operation="show" event="onclick"/>
           </rich:menuItem>
           </rich:contextMenu>
           </rich:treeNode>
           </rich:tree>
           </a4j:outputPanel>
           </h:form>
           <!-- Includes would go here for each tab -->
           <a4j:include id="dataTable" viewId="#{tree.page}"/>
           </h:panelGrid>
           </rich:tab>
           <rich:tab label="Statistics"></rich:tab>
           </rich:tabPanel>
           <h:outputText value="Testing Workspace"/>
           </rich:tab>
           </rich:tabPanel>
           <a4j:outputPanel ajaxRendered="true">
           <rich:modalPanel id="filter" autosized="true">
           <f:facet name="header">
           <h:panelGroup>
           <h:outputText value="Filter" />
           </h:panelGroup>
           </f:facet>
           <f:facet name="controls">
           <h:panelGroup>
           <h:graphicImage value="/images/close.png" id="close"/>
           <rich:componentControl for="filter" attachTo="close" operation="hide" event="onclick" />
           </h:panelGroup>
           </f:facet>
           <a4j:include id="filterPanel" viewId="#{tree.filterPage}"/>
           </rich:modalPanel>
           </a4j:outputPanel>
           </a4j:outputPanel>
           </f:view>
          </body>
          </html>


          I forgot to mention that this problem only occurs in Internet Explorer. In Firefox this error does not get thrown. I'm also running this on Tomcat 6.0.18.