title: IllegalArgumentException for JSF view while loading page
body: <p>Even I am trying to open simple JSF page it is throwing exception, I am not getting even single hint what is wrong with the code.</p>
  
  <p>i have xhtml like this</p>
  
  <p><p>
  </p>
  
  <pre><code>    &lt;table border="0" bordercolor="red" width="100%" cellspacing="0"
          cellpadding="0"&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;h:messages errorClass="crudMessageError"
                      styleClass="crudmessagebackground" infoClass="crudmessageInfo"
                      layout="table" /&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td width="100%" align="left"&gt;
  
              &lt;a4j:form id="searchTrans"&gt;
                      &lt;table width="99%" border="0" bordercolor="red" cellpadding="3"
                          cellspacing="0" class="bodyTable"&gt;
  
                          &lt;tr&gt;
                              &lt;td colspan="4"&gt;
                                  &lt;table width="100%" cellpadding="3" cellspacing="0"&gt;
                                      &lt;tr&gt;
  
                                          &lt;td width="15%"&gt;&lt;h:outputText
                                                  value="#{label.counterPartOne}" class="globalHd" /&gt;&lt;/td&gt;
                                          &lt;td width="120px"&gt;&lt;h:inputText id="txtCounterPart1"
                                                  value="" &gt;
                                              &lt;/h:inputText&gt;&lt;/td&gt;
                                          &lt;td width="15%"&gt;&lt;h:outputText
                                                  value="#{label.counterPartTwo}" class="globalHd" /&gt;&lt;/td&gt;
                                          &lt;td width="120px"&gt;&lt;h:inputText id="txtCounterPart2"
                                                  value="" required="true"
                                                  styleClass="mandatoryTextField"
                                                  requiredMessage="#{validation.customerRequiredMessage}"
                                                  validator="#{customerController.validateForm}"
                                                  maxlength="15"&gt;
                                              &lt;/h:inputText&gt;&lt;/td&gt;
                                      &lt;/tr&gt;
  
  
                                      &lt;tr&gt;
  
                                          &lt;td width="15%"&gt;&lt;h:outputText
                                                  value="#{label.transactionsGroup}" class="globalHd" /&gt;&lt;/td&gt;
                                          &lt;td width="120px"&gt;&lt;h:selectOneMenu id="DDLTransGrp"
                                                  value=""&gt;
                                                  &lt;f:selectItem id="1" itemLabel="Type1" itemValue="Type1" /&gt;
                                                  &lt;f:selectItem id="2" itemLabel="Type2" itemValue="Type2" /&gt;
                                                  &lt;f:selectItem id="3" itemLabel="Type3" itemValue="Type3" /&gt;
                                                  &lt;f:selectItem id="4" itemLabel="Type4" itemValue="Type4" /&gt;
                                                  &lt;f:selectItem id="5" itemLabel="Type5" itemValue="Type5" /&gt;
  
                                              &lt;/h:selectOneMenu&gt;&lt;/td&gt;
  
                                          &lt;td width="15%"&gt;&lt;h:outputText
                                                  value="#{label.transactionType}" class="globalHd" /&gt;&lt;/td&gt;
                                          &lt;td width="120px"&gt;&lt;h:selectOneMenu id="DDLTransType"
                                                  value=""&gt;
                                                  &lt;f:selectItem id="1" itemLabel="Type1" itemValue="Type1" /&gt;
                                                  &lt;f:selectItem id="2" itemLabel="Type2" itemValue="Type2" /&gt;
                                                  &lt;f:selectItem id="3" itemLabel="Type3" itemValue="Type3" /&gt;
                                                  &lt;f:selectItem id="4" itemLabel="Type4" itemValue="Type4" /&gt;
                                                  &lt;f:selectItem id="5" itemLabel="Type5" itemValue="Type5" /&gt;
  
                                              &lt;/h:selectOneMenu&gt;&lt;/td&gt;
  
                                      &lt;/tr&gt;
                                      &lt;tr&gt;
  
                                          &lt;td width="15%"&gt;
                                          &lt;h:outputText
                                                  value="#{label.profitCenter}" class="globalHd" /&gt;
                                                  &lt;/td&gt;
                                          &lt;td width="120px"&gt;
                                          &lt;h:inputText id="txtProfitCenter" value="" /&gt;
                                          &lt;/td&gt;
  
                                      &lt;td width="15%"&gt;    
                                      &lt;h:outputText value="#{label.outstandingOnly}" class="globalHd" /&gt;&lt;/td&gt;
  
                                      &lt;td width="120px"&gt;
                                      &lt;h:selectBooleanCheckbox value=""  id="chkOutstanding"/&gt;
                                      &lt;/td&gt;
                                      &lt;/tr&gt;
  
                                  &lt;tr&gt;
                                  &lt;td width="15%"&gt;
                                  &lt;h:outputText value="#{label.completed}" class="globalHd" /&gt;
  
                                  &lt;/td&gt;
                                  &lt;td width="120px"&gt;
                                  &lt;h:selectBooleanCheckbox value=""  id="chkComplete"/&gt;
                                  &lt;/td&gt;
  
                                  &lt;td width="15%"&gt;
                                      &lt;h:outputText value="#{label.positionDesk}" class="globalHd" /&gt;
                                  &lt;/td&gt;
                                  &lt;td width="120px"&gt;
                                  &lt;h:selectBooleanCheckbox value=""  id="chkPositionDesk"/&gt;
                                  &lt;/td&gt;                                   
  
                                  &lt;/tr&gt;
  
  
                                  &lt;tr&gt;
                                  &lt;td width="15%"&gt;
                                      &lt;h:outputText value="#{label.currency}" class="globalHd" /&gt;
                                  &lt;/td&gt;
  
                                  &lt;td width="120px"&gt;&lt;h:selectOneMenu id="DDLTransType"
                                                  value=""&gt;
                                                  &lt;f:selectItem id="1" itemLabel="SAR" itemValue="SAR" /&gt;
                                                  &lt;f:selectItem id="2" itemLabel="USD" itemValue="USD" /&gt;                                         
  
                                              &lt;/h:selectOneMenu&gt;&lt;/td&gt;
  
  
  
                                  &lt;td width="15%"&gt;
                                      &lt;h:outputText value="#{label.tradingOfficer}" class="globalHd" /&gt;
                                  &lt;/td&gt;
                                  &lt;td width="120px"&gt;
                                          &lt;h:inputText value=""  id="txtTradingOfficer"/&gt;
                                          &lt;/td&gt;
  
  
                                  &lt;/tr&gt;
  
                                  &lt;tr&gt;
                                  &lt;td width="15%"&gt;&lt;/td&gt;
  
                                  &lt;td style="width: 60px"&gt;
  
  
                  &lt;a4j:commandButton id="searchButton" value="#{button.search}" styleClass="mybutton"     /&gt;  
  
  
  
  
                  &lt;/td&gt;
  
                                  &lt;/tr&gt;
  
                                  &lt;/table&gt;
                                  &lt;/td&gt;
                          &lt;/tr&gt;
  
                      &lt;/table&gt;
  
                  &lt;/a4j:form&gt;&lt;/td&gt;
  
          &lt;/tr&gt;
  
      &lt;/table&gt;
  &lt;/ui:composition&gt;
  </code></pre>
  
  <p></p>
  
  <p>This the main exception i am getting when try to load xhtml page</p>
  
  <pre><code>javax.servlet.ServletException: 1
  javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
  org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
  org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
  org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
  org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
  org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
  org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
  org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
  org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
  org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
  org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
  org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
  org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
  org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:277)
  org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
  org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
  org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
  org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
  org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
  org.springframework.security.concurrent.ConcurrentSessionFilter.doFilterHttp(ConcurrentSessionFilter.java:99)
  org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
  com.bsf.web.core.SessionTimeOutFilter.doFilter(SessionTimeOutFilter.java:75)
  org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
  org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
  org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)
  org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
  org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:112)
  org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
  org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  </code></pre>
  
  <p>This is root cause produce by same exception.</p>
  
  <p>root cause </p>
  
  <pre><code>java.lang.IllegalArgumentException: 1
  javax.faces.component.UIComponentBase.validateId(UIComponentBase.java:549)
  javax.faces.component.UIComponentBase.setId(UIComponentBase.java:351)
  com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:151)
  com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
  com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
  com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
  com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
  com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
  com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
  com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
  com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:119)
  com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
  com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
  com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
  com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
  com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
  com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:140)
  com.sun.facelets.tag.ui.IncludeHandler.apply(IncludeHandler.java:65)
  com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
  com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:73)
  com.sun.facelets.tag.jstl.core.IfHandler.apply(IfHandler.java:54)
  com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
  com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:119)
  com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
  com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
  com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
  com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
  com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
  com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:140)
  com.sun.facelets.tag.ui.IncludeHandler.apply(IncludeHandler.java:65)
  com.sun.facelets.tag.jstl.core.IfHandler.apply(IfHandler.java:54)
  com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
  com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
  com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
  com.sun.facelets.tag.jstl.core.ForEachHandler.apply(ForEachHandler.java:175)
  com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
  com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
  com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
  com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:119)
  com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
  com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
  com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
  com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
  com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
  com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:140)
  com.sun.facelets.tag.ui.IncludeHandler.apply(IncludeHandler.java:65)
  com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:73)
  com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
  com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
  com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
  com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
  com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
  com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
  com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
  com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:140)
  com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113)
  com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
  com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
  com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
  com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:524)
  com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:567)
  org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
  org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
  com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
  com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
  com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
  javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
  org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
  org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
  org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
  org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
  org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
  org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
  org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
  org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
  org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
  org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
  org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
  org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
  org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:277)
  org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
  org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
  org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
  org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
  org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
  org.springframework.security.concurrent.ConcurrentSessionFilter.doFilterHttp(ConcurrentSessionFilter.java:99)
  org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
  com.bsf.web.core.SessionTimeOutFilter.doFilter(SessionTimeOutFilter.java:75)
  org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
  org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
  org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)
  org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
  org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:112)
  org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
  org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  </code></pre>