1 Reply Latest reply on Dec 22, 2007 12:18 PM by pmuir

    javax.el.PropertyNotFoundException

    vikramchhetryy

      Hi all,
      My code looks like this:-
      User.java

      @Entity
      @Name("userBean")
      @Scope(SESSION)
      @Table(name = "abcd")
      public class User implements Serializable {
      
       private static final long serialVersionUID = -7928759431732764467L;
       private String StrUserName;
       private String StrPassword;
      
       @Id
       @NotNull
       public String getStrUserName() {
       return StrUserName;
       }
       public void setStrUserName(String strUserName) {
       StrUserName = strUserName;
       }
       @NotNull
       public String getStrPassword() {
       return StrPassword;
       }
       public void setStrPassword(String strPassword) {
       StrPassword = strPassword;
       }
      
      }
      


      login.xhtml

      <div class="dialog">
       <h:panelGrid columns="2" rowClasses="prop" columnClasses="name,value">
       <h:outputLabel for="StrUserName">Username</h:outputLabel>
       <h:inputText id="StrUserName"
       value="#{userBean.StrUserName}"/>
       <h:outputLabel for="StrPassword">Password</h:outputLabel>
       <h:inputSecret id="StrPassword"
       value="#{userBean.StrPassword}"/>
       </h:panelGrid>
       </div>


      I m getting following exception while loading login page

      javax.el.PropertyNotFoundException: /login.xhtml @26,64 value="#{userBean.StrUserName}": Property 'StrUserName' not found on type com.xyz.user.User


      Any help would be appreciated.

      Regards,
      Vikram