title: UI Layout Initialization Error
body: <p>I've got a JSF layout and every time I start my server I got this error:</p>
  
  <p>/ UI Initialization Error<br />
  The center-pane element does not exist<br />
  The center-pane is a required element</p>
  
  <p>Here is my code</p>
  
  <pre><code> &lt;?xml version='1.0' encoding='UTF-8' ?&gt;
  &lt;!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;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:p="http://primefaces.org/ui"&gt;
  
      &lt;h:head&gt;
          &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
          &lt;title&gt;Meu Sistema&lt;/title&gt;
          &lt;style type="text/css"&gt;
              body {background-color: #eeeeee; font-size: 12px}
          &lt;/style&gt; 
      &lt;/h:head&gt;
      &lt;h:body&gt;
          &lt;div align="center"&gt;
  
              &lt;p:layout style="min-width:1200px;max-width:1020px;min-height:600px"&gt;  
                  &lt;p:layoutUnit position="north" size="250"&gt;  
                      &lt;h:graphicImage url="/images/funemac.png"  /&gt;
                  &lt;/p:layoutUnit&gt;  
  
                  &lt;p:layoutUnit position="west" size="220"&gt;  
  
                          &lt;h:form&gt;
                              &lt;p:menu style="width: 200px"&gt;
                                  &lt;p:submenu label="Menu"&gt;
                                      &lt;p:menuitem value="Início" action="index?faces-redirect=true"/&gt;
                                  &lt;/p:submenu&gt;
                                  &lt;p:submenu label="Autor"&gt;
                                      &lt;p:menuitem value="Novo" action="NovoAutor?faces-redirect=true"/&gt;
                                      &lt;p:menuitem value="Consulta" action="ConsultaAutor?faces-redirect=true"/&gt;
                                  &lt;/p:submenu&gt;
                                  &lt;p:submenu label="Artigo"&gt;
                                      &lt;p:menuitem value="Novo" action="EnvioArtigo?faces-redirect=true"/&gt;
                                      &lt;p:menuitem value="Consulta" action="ConsultaArtigo?faces-redirect=true"/&gt;
                                      &lt;p:menuitem value="Avaliação" action="Avaliacoes?faces-redirect=true"/&gt;
                                  &lt;/p:submenu&gt;
                                  &lt;p:submenu label="Revisor"&gt;
                                      &lt;p:menuitem value="Novo" action="NovoRevisor?faces-redirect=true"/&gt;
                                      &lt;p:menuitem value="Consulta" action="ConsultaRevisor?faces-redirect=true"/&gt;
                                  &lt;/p:submenu&gt;
                                  &lt;p:submenu label="Tema"&gt;
                                      &lt;p:menuitem value="Novo" action="NovoTema?faces-redirect=true"/&gt;
                                      &lt;p:menuitem value="Consulta" action="ConsultaTema?faces-redirect=true"/&gt;
                                  &lt;/p:submenu&gt;
                                  &lt;p:submenu label="Evento"&gt;
                                      &lt;p:menuitem value="Novo" action="NovoEvento?faces-redirect=true"/&gt;
                                      &lt;p:menuitem value="Consulta" action="ConsultaEvento?faces-redirect=true"/&gt;
                                  &lt;/p:submenu&gt;
                                  &lt;p:submenu label="Relatórios"&gt;
                                      &lt;p:menuitem value="Novo" action="Relatorios?faces-redirect=true"/&gt;                                    
                                  &lt;/p:submenu&gt;
                                  &lt;p:submenu label="Inscrições"&gt;
                                     &lt;p:menuitem value="Aluno" action="NovoParticipanteAluno?faces-redirect=true"/&gt;                                    
                                      &lt;p:menuitem value="Não Aluno" action="NovoParticipanteNaoAluno?faces-redirect=true"/&gt;                                    
                                      &lt;p:menuitem value="Palestrante" action="NovoParticipantePalestrante?faces-redirect=true"/&gt;  
                                      &lt;p:menuitem value="Inscrever-se em Evento" action="InscreverEmEvento?faces-redirect=true"/&gt;  
                                      &lt;p:menuitem value="Consulta" action="ConsultaInscricao?faces-redirect=true"/&gt;                                     
                                  &lt;/p:submenu&gt;
                              &lt;/p:menu&gt;
                          &lt;/h:form&gt;
  
                  &lt;/p:layoutUnit&gt;  
                  &lt;p:layoutUnit position="center"&gt;  
                      &lt;ui:insert name="centro"&gt;
                          Bem-Vindo!
                      &lt;/ui:insert&gt;
                  &lt;/p:layoutUnit&gt;  
              &lt;/p:layout&gt;  
          &lt;/div&gt;
      &lt;/h:body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And this is a odd fact: when I got this message I just wipe out this part of code:</p>
  
  <pre><code>&lt;p:submenu label="Inscrições"&gt;
                                 &lt;p:menuitem value="Aluno" action="NovoParticipanteAluno?faces-redirect=true"/&gt;                                    
                                  &lt;p:menuitem value="Não Aluno" action="NovoParticipanteNaoAluno?faces-redirect=true"/&gt;                                    
                                  &lt;p:menuitem value="Palestrante" action="NovoParticipantePalestrante?faces-redirect=true"/&gt;  
                                  &lt;p:menuitem value="Inscrever-se em Evento" action="InscreverEmEvento?faces-redirect=true"/&gt;  
                                  &lt;p:menuitem value="Consulta" action="ConsultaInscricao?faces-redirect=true"/&gt;                                     
                              &lt;/p:submenu&gt;
  </code></pre>
  
  <p>save it. And refresh the page so everything goes normal. Then, a put all back and when I refresh the page again it works.</p>
  
  <p>The problem is every time I rerun my server this happens.</p>
  
  <p>Can anyone tell me what is wrong?</p>