title: Property 'productCategoryName' not found on type java.lang.String
body: <p>I have checked as much as i can ,but i could not find where the problem is , i have seen few stack overflow Questions related to mine but mostly they all seems missing # .
      and i have seen somewhere that old version of mojora lib may cause this exceptions.i checked Names i am using in hibernate beans they all looks good but am not able to locate the problem .....</p>
  
  <p>My Html Page:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE html 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:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      xmlns:t="http://myfaces.apache.org/tomahawk"&gt;
  
  &lt;h:body&gt;
  
      &lt;ui:composition template="/WEB-INF/templates/layout.xhtml"&gt;
          &lt;ui:param name="category" value="Admin" /&gt;
          &lt;ui:param name="item" value="Create User" /&gt;
          &lt;ui:param name="user" value="#{createUserAccountBean}" /&gt;
          &lt;ui:define name="content"&gt;
          &lt;h:form id="productsForm"&gt;
                  &lt;div class="headerbg"&gt;
                      &lt;div id="innerheaderbg"&gt;
                          &lt;div id="iconarea"&gt;
                              &lt;img src="#{request.contextPath}/images/headerimages/productlist.png" /&gt;
                          &lt;/div&gt;
                          &lt;div id="headertextarea"&gt;
                              &lt;p class="headingtext"&gt;Order&lt;/p&gt;
                              &lt;p id="breadCrumbtext"&gt;Order &amp;#160;&lt;img src="#{request.contextPath}/images/error-bullet.gif" /&gt;
                                  &amp;#160;Product Category List
                              &lt;/p&gt;
                          &lt;/div&gt;
                          &lt;div id="otherarea"&gt;&lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;p:growl /&gt;
  
  
               &lt;div class="widget widget-table action-table"&gt;
                  &lt;div class="widget-header"&gt; &lt;i class="icon-th-list"&gt;&lt;/i&gt;
                      &lt;h3&gt;Product List&lt;/h3&gt;
                  &lt;p:spacer width="10px" height="30px"/&gt;  
                  &lt;h:outputLabel value="Product Category" style="color:#0A8FFF;font-weight:bold;margin-bottom:50px;"/&gt;
                  &lt;p:selectOneMenu value="#{productBean.productCategoryId}" id="pFilter" &gt;
                          &lt;f:selectItem itemLabel="--All--" itemValue="all" noSelectionOption="false"/&gt;
                          &lt;f:selectItems value="#{productCategoryBean.categoriesList}" var="category" 
                                                 itemLabel="#{category.productCategoryName}"
                                                 itemValue="#{category.productCategoryId}" /&gt;
                          &lt;p:ajax update=":productsForm:productsTable" event="change" listener="#{productBean.filterProducts}" /&gt;
                  &lt;/p:selectOneMenu&gt;
                  &lt;/div&gt;  &lt;!-- /widget-header --&gt;
  
                  &lt;div class="widget-content"&gt;
  
                      &lt;p:dataTable id="productsTable" value="#{productBean.products}" var="products" rowIndexVar="rowIndex"  
                               paginator="true" rows="10" paginatorPosition="bottom" 
                               paginatorTemplate="{FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}" widgetVar="dt_products"&gt;
                      &lt;p:column headerText="S.No"&gt;#{rowIndex+1}&lt;/p:column&gt;
                      &lt;p:column headerText="Product Name"&gt;#{products.name}&lt;/p:column&gt;
                      &lt;p:column headerText="Product Code"&gt;#{products.code}&lt;/p:column&gt;
                      &lt;p:column headerText="Price"&gt;#{products.price}&lt;/p:column&gt;
                      &lt;/p:dataTable&gt;
  
  
                  &lt;/div&gt;  &lt;!-- /widget-content --&gt;
              &lt;/div&gt;
              &lt;/h:form&gt;
              &lt;br&gt;&lt;/br&gt;
          &lt;/ui:define&gt;
      &lt;/ui:composition&gt;
  &lt;/h:body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and here is my bean, ProductCategoryBean.java:</p>
  
  <pre><code>    @Named(value = "productCategoryBean")
      @Scope("session")
      public class ProductCategoryBean 
      {
          private java.util.List&lt;ProductCategory&gt; categoriesList;
  
      public java.util.List&lt;ProductCategory&gt; getCategoriesList() 
      {
          categoriesList.removeAll(Collections.singleton(null));
          return categoriesList;
      }
  
      public void setCategoriesList(java.util.List&lt;ProductCategory&gt; categoriesList) 
      {
          this.categoriesList = categoriesList;
      }
      }
  </code></pre>
  
  <p>Am Initializing categories list while Login  in at LoginBean.java</p>
  
  <pre><code>    @Named(value = "loginBean")
      @Scope("session")
      public class LoginBean {
  
          @Inject
          private UserService userService;
  
          @Inject
          private StocktrackService stocktrackService;
  
          @Inject
          private MenuController menuController;
  
          @Inject
          private CheckOut checkOut;
  
  
          @Inject
          private ProductCategoryBean categoryBean;
  
          @Inject
          private ProductsBean productsBean;
  
  
          private String userName;
          private String password;
          private String statusMessage;
  
          HttpSession session = (HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(true);
  
          public String getUserName() {
              return userName;
          }
  
          public void setUserName(String userName) {
              this.userName = userName;
          }
  
          public String getPassword() {
              return password;
          }
  
          public void setPassword(String password) {
              this.password = password;
          }
  
          public String getStatusMessage() {
              return statusMessage;
          }
  
          public void setStatusMessage(String statusMessage) {
              this.statusMessage = statusMessage;
          }
  
          public String login() throws EncryptionException, ServiceException 
          {
              StringEncrypter se = new StringEncrypter("DES");
              String encpassword = se.encrypt(getPassword());
              UserAccount userAccount = userService.validateLogin(userName,
                      encpassword);
              if (userAccount == null) {
                  statusMessage = "The username or password is incorrect.";
                  return "login.xhtml";
              }
              session.setAttribute("UserAccount", userAccount);
              statusMessage = "";
              menuController.setTopmenu(menuLoader(userAccount));
                  checkOut.setUserId(userAccount.getUserId());
                  checkOut.setUsername(userAccount.getUserName());
                  checkOut.setUserAccount(userAccount);
  
              //setting category list of ProductCategoryBean
              categoryBean.setCategoriesList(stocktrackService.getProductCategory());
              //setting product list of ProductListBean
              productsBean.setProducts(stocktrackService.getProduct());
  
              return "/pages/leave/home.xhtml?faces-redirect=true";
          }
           }
  </code></pre>
  
  <p>Am getting the following Error:</p>
  
  <pre><code>&gt; Feb 09, 2015 1:04:54 PM
  &gt; com.sun.faces.application.view.FaceletViewHandlingStrategy
  &gt; handleRenderException SEVERE: Error Rendering
  &gt; View[/pages/order/products.xhtml] javax.faces.FacesException:
  &gt; javax.el.PropertyNotFoundException: /pages/order/products.xhtml @52,59
  &gt; itemLabel="#{category.productCategoryName}": Property
  &gt; 'productCategoryName' not found on type java.lang.String  at
  &gt; javax.faces.component.UIComponentBase$AttributesMap.get(UIComponentBase.java:2364)
  &gt;   at
  &gt; org.primefaces.renderkit.InputRenderer.createSelectItem(InputRenderer.java:102)
  &gt;   at
  &gt; org.primefaces.renderkit.InputRenderer.getSelectItems(InputRenderer.java:86)
  &gt;   at
  &gt; org.primefaces.component.selectonemenu.SelectOneMenuRenderer.encodeMarkup(SelectOneMenuRenderer.java:71)
  &gt;   at
  &gt; org.primefaces.component.selectonemenu.SelectOneMenuRenderer.encodeEnd(SelectOneMenuRenderer.java:65)
  &gt;   at
  &gt; javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
  &gt;   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786)
  &gt;   at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)    at
  &gt; javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
  &gt;   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
  &gt;   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
  &gt;   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
  &gt;   at
  &gt; com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:419)
  &gt;   at
  &gt; com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125)
  &gt;   at
  &gt; com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
  &gt;   at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
  </code></pre>