title: Validator method not found
body: <p>I am writing a JSF page, where user can change his password. I based my solution on the code example from JavaServer Faces (3rd edition) book by David Geary and Cay S. Horstmann. Here is my code:</p>
  
  <pre><code>&lt;h:inputText id="oldPassword" required="true"
      validator="#{accountBean.validateOldPassword}"&gt;
      &lt;f:ajax event="blur" render="oldPasswordError" /&gt;
  &lt;/h:inputText&gt;
  &lt;h:message for="oldPassword" id="oldPasswordError" style="color: red" /&gt;
  </code></pre>
  
  <p>Part of <em>AccountBean.java</em>:</p>
  
  <pre><code>@Named("accountBean")
  @SessionScoped
  public class AccountBean implements Serializable {
      private String login;
      private String password;
  
      (...)
      public void validateOldPassword(FacesContext context, UIComponent component, Object value) {
          if (!(((String)value).equals(password)))
              throw new ValidatorException(new FacesMessage("Invalid password"));
      }
  }
  </code></pre>
  
  <p>Now, when I deploy this into JBoss AS 7.0.2 and try to use I get such error rendered near old password field:</p>
  
  <pre><code>/changePassword.xhtml @28,54 validator="#{accountBean.validateOldPassword}": Method not found: pl.edu.pw.mini.smartdialer.presentation.AccountBean@d1ff44.validateOldPassword(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)
  </code></pre>
  
  <p>It claims that method cannot be found, why?
  This is nearly copy/paste from the book and still not working.
  I have no idea where to find a bug. Could you help me?</p>