title: java.lang.NoSuchMethodError: org.primefaces.model.menu.MenuItem.getClientId()Ljava/lang/String
body: <p>I am having a problem when trying to add a p:menuitem to a menu. The following code is a file for a menu bar, which will be included on other webpages.</p>
  
  <pre><code>&lt;ui:composition 
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:ps="http://primefaces.org/spark"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:p="http://primefaces.org/ui"&gt;
  
  &lt;h:outputStylesheet name="css/spark-layout-blue.css" library="spark-layout" /&gt;
  
  &lt;h:form&gt;  
      &lt;ps:menu id="layout-menu"&gt;
          &lt;p:submenu label="Opções" &gt;  
              &lt;p:menuitem /&gt;
          &lt;/p:submenu&gt;  
      &lt;/ps:menu&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p><br>
  It does not matter what I put inside the p:menuitem, when I try to run it I get this:</p>
  
  <pre><code>HTTP Status 500 - org.primefaces.model.menu.MenuItem.getClientId()Ljava/lang/String;
  
  type Exception report
  
  message org.primefaces.model.menu.MenuItem.getClientId()Ljava/lang/String;
  
  description The server encountered an internal error that prevented it from fulfilling this request.
  
  exception
  
  javax.servlet.ServletException: org.primefaces.model.menu.MenuItem.getClientId()Ljava/lang/String;
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:659)
      org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:70)
      org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
  
  root cause
  
  java.lang.NoSuchMethodError: org.primefaces.model.menu.MenuItem.getClientId()Ljava/lang/String;
      org.primefaces.spark.component.menu.SparkMenuRenderer.encodeElement(SparkMenuRenderer.java:87)
      org.primefaces.spark.component.menu.SparkMenuRenderer.encodeElements(SparkMenuRenderer.java:77)
      org.primefaces.spark.component.menu.SparkMenuRenderer.encodeSubmenu(SparkMenuRenderer.java:264)
      org.primefaces.spark.component.menu.SparkMenuRenderer.encodeElement(SparkMenuRenderer.java:115)
      org.primefaces.spark.component.menu.SparkMenuRenderer.encodeElements(SparkMenuRenderer.java:77)
      org.primefaces.spark.component.menu.SparkMenuRenderer.encodeMarkup(SparkMenuRenderer.java:59)
      org.primefaces.component.menu.BaseMenuRenderer.encodeEnd(BaseMenuRenderer.java:105)
      javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:919)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1903)
      javax.faces.render.Renderer.encodeChildren(Renderer.java:176)
      javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:889)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1896)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1899)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1899)
      com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:451)
      com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
      com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
      com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
      org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:70)
      org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
  </code></pre>
  
  <p>If I take the p:menuitem off, it runs normaly. </p>
  
  <p>Any help?</p>