title: java.lang.IllegalStateException: Component javax.faces.component.UIViewRoot@19ded20 not expected type
body: <p>I'm retrieving this exception when I open a JSF page. How is this caused and how can I fix it?</p>
  
  <pre><code>org.apache.jasper.JasperException: An exception occurred processing JSP page /searchResultJSF.jsp at line 18
  
  15:     &lt;body&gt;
  16:         &lt;h1&gt;SEARCH RESULT&lt;/h1&gt;
  17:       
  18:         &lt;h:dataTable id ="abc" value="#{SearchBean.dealerList}" var="dealer"&gt;
  19:                           &lt;h:column&gt;
  20:                               &lt;f:facet name="header" &gt;
  21:                                   &lt;h:outputText value="Dealer name "/&gt;
  
  
  Stacktrace:
      org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
      com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
      com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442)
      com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115)
      com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
      com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
      org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
  
  root cause
  
  javax.servlet.ServletException: javax.servlet.jsp.JspException: java.lang.IllegalStateException: Component javax.faces.component.UIViewRoot@19ded20 not expected type.  Expected: javax.faces.component.UIData.  Perhaps you're missing a tag?
      org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)
      org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
      org.apache.jsp.searchResultJSF_jsp._jspService(searchResultJSF_jsp.java:94)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
      com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
      com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442)
      com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115)
      com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
      com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
      org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
  
  root cause
  
  java.lang.IllegalStateException: Component javax.faces.component.UIViewRoot@19ded20 not expected type.  Expected: javax.faces.component.UIData.  Perhaps you're missing a tag?
      com.sun.faces.taglib.html_basic.DataTableTag.setProperties(DataTableTag.java:265)
      javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:604)
      javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1126)
      com.sun.faces.taglib.html_basic.DataTableTag.doStartTag(DataTableTag.java:372)
      org.apache.jsp.searchResultJSF_jsp._jspx_meth_h_005fdataTable_005f0(searchResultJSF_jsp.java:117)
      org.apache.jsp.searchResultJSF_jsp._jspService(searchResultJSF_jsp.java:84)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
      com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
      com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442)
      com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115)
      com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
      com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
      org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
  </code></pre>