3 Replies Latest reply on Jun 6, 2007 11:06 AM by John Robinson

    ajax4jsf does not work with jsf 1.1, facelets 1.0.14 and tom

    John Robinson Newbie

      It just doesn't seem to work at all. Here's the stacktrace that I get:

      SEVERE: Error Rendering View[/pages/findingChanges.xhtml]
      java.lang.IllegalStateException: Duplicate component ID 'form:_id2' found in view.
      at com.sun.faces.application.StateManagerImpl.removeTransientChildrenAndFacets(StateManagerImpl.java:173)
      at com.sun.faces.application.StateManagerImpl.removeTransientChildrenAndFacets(StateManagerImpl.java:199)
      at com.sun.faces.application.StateManagerImpl.removeTransientChildrenAndFacets(StateManagerImpl.java:181)
      at com.sun.faces.application.StateManagerImpl.removeTransientChildrenAndFacets(StateManagerImpl.java:181)
      at com.sun.faces.application.StateManagerImpl.saveSerializedView(StateManagerImpl.java:85)
      at org.ajax4jsf.framework.ajax.AjaxStateManager.saveSerializedView(AjaxStateManager.java:90)
      at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:471)
      at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
      at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:233)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
      at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
      at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
      at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
      at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
      at java.lang.Thread.run(Thread.java:595)


      Here's the page:

      <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:t="http://myfaces.apache.org/tomahawk"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
      xmlns:cm="http://mycomany.com/jsf">


      <f:loadBundle basename="resources" var="msgs" />
      <meta http-equiv="pragma" content="no-cache"/>
      <meta http-equiv="cache-control" content="no-cache"/>
      <meta http-equiv="cache-control" content="no-store"/>
      <meta http-equiv="expires" content="0"/>

      <h:outputText value="#{msgs.title}" />
      <t:stylesheet path="/css/style.css"/>


      <h:form styleClass="form" id="form">
      <h:panelGrid columns="1" styleClass="mainAreaStyle" headerClass="headerStyle">
      <f:facet name="header">
      <cm:menuBar/>
      </f:facet>

      <h:outputText value="#{msgs.header}" styleClass="headerMessageText"/>

      <f:subview id="schemaSelector">
      <cm:schemaSelector/>
      </f:subview>

      <t:div forceId="true" id="middleSectionSearching" >
      <a4j:outputPanel id="count" >
      <h:outputFormat value="#{msgs.findingChangesPercentComplete}" styleClass="message">
      <f:param value="#{findChangesBean.percentage}"/>
      </h:outputFormat>
      </a4j:outputPanel>
      <a4j:poll id="poll" reRender="poll, count" interval="1000" action="#{findChangesBean.pollAction}"/>

      </t:div>

      </h:panelGrid>

      </h:form>



      The poll should update the page to show the percentage complete, but it isn't working it just displays 0 and eventually forwards on to the next page. There are other problems that I've found with the tomahawk tree2 component and a4j:support but I'd like to get this sorted out first.

      I've racked my brains and searched google and the forums but can't get it to work. Any help would be very much appreciated.