MyFaces Core
  1. MyFaces Core
  2. MYFACES-3607

NamingContainer causes incorrect FacesException: Component with id:XXX not found

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 2.1.7, 2.1.8
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows 7, Tomcat 7

      Description

      Certain page structure can cause incorrect "Component with id:XXX not found".
      For example, the '<f:ajax render="messagesDiv" />' on this page:

      <!DOCTYPE html >
      <html xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
      <h:head>
      </h:head>
      <h:body>
      <h:form id="myForm">
      <h:dataTable value="#

      {application.servletNames}

      ">
      <h:column>
      <h:commandButton value="CLICK">
      <f:ajax render="messagesDiv" />
      </h:commandButton>
      </h:column>
      </h:dataTable>
      <h:messages id="messagesDiv"/>
      </h:form>
      </h:body>
      </html>

      Is causing this exception:

      12/09/2012 00:07:11,672 ERROR ExceptionHandlerFactory:66: Context attributes: {}, Component: null, PhaseId: RENDER_RESPONSE(6)
      javax.faces.FacesException: Component with id:messagesDiv not found
      at org.apache.myfaces.renderkit.html.HtmlAjaxBehaviorRenderer.getComponentId(HtmlAjaxBehaviorRenderer.java:411)
      at org.apache.myfaces.renderkit.html.HtmlAjaxBehaviorRenderer.build(HtmlAjaxBehaviorRenderer.java:384)
      at org.apache.myfaces.renderkit.html.HtmlAjaxBehaviorRenderer.mapToString(HtmlAjaxBehaviorRenderer.java:356)
      at org.apache.myfaces.renderkit.html.HtmlAjaxBehaviorRenderer.makeAjax(HtmlAjaxBehaviorRenderer.java:157)
      at org.apache.myfaces.renderkit.html.HtmlAjaxBehaviorRenderer.getScript(HtmlAjaxBehaviorRenderer.java:101)
      at javax.faces.component.behavior.ClientBehaviorBase.getScript(ClientBehaviorBase.java:99)
      at org.apache.myfaces.shared.renderkit.html.HtmlRendererUtils._appendClientBehaviourScript(HtmlRendererUtils.java:2007)
      at org.apache.myfaces.shared.renderkit.html.HtmlRendererUtils.getClientBehaviorScript(HtmlRendererUtils.java:1986)
      at org.apache.myfaces.shared.renderkit.html.HtmlRendererUtils.buildBehaviorChain(HtmlRendererUtils.java:2157)
      at org.apache.myfaces.shared.renderkit.html.HtmlRendererUtils.buildBehaviorChain(HtmlRendererUtils.java:2122)
      at org.apache.myfaces.shared.renderkit.html.HtmlButtonRendererBase.buildBehaviorizedOnClick(HtmlButtonRendererBase.java:393)
      at org.apache.myfaces.shared.renderkit.html.HtmlButtonRendererBase.encodeEnd(HtmlButtonRendererBase.java:209)
      at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:663)
      at javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:543)
      at javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:539)
      at org.apache.myfaces.shared.renderkit.html.HtmlTableRendererBase.renderColumnBody(HtmlTableRendererBase.java:689)
      at org.apache.myfaces.shared.renderkit.html.HtmlTableRendererBase.encodeColumnChild(HtmlTableRendererBase.java:648)
      at org.apache.myfaces.shared.renderkit.html.HtmlTableRendererBase.encodeInnerHtml(HtmlTableRendererBase.java:502)
      at org.apache.myfaces.shared.renderkit.html.HtmlTableRendererBase.encodeChildren(HtmlTableRendererBase.java:214)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:632)
      at javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:530)
      at javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:539)
      at javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:539)
      at javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:539)
      at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.renderView(FaceletViewDeclarationLanguage.java:1972)
      at org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:285)
      at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:59)
      at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:116)
      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:241)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:199)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
      at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1812)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:722)

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Moshe Elisha
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development