title: java.lang.NoSuchMethodException: userAuth.User.<init>()
body: <p>I have the class with validation:</p>
  
  <pre><code>public class User {
      @Size(min=3, max=20, message="User name must be between 3 and 20 characters long")
      @Pattern(regexp="^[a-zA-Z0-9]+$", message="User name must be alphanumeric with no spaces")
      private String name;
  
      @Size(min=6, max=20, message="Password must be between 6 and 20 characters long")
      @Pattern(regexp="^(?=.*[0-9])(?=.*[a-zA-Z])([a-zA-Z0-9]+)$", message="Password must contains at least one number")
      private String password;
  
      public User(String _name, String _password){
          super();
          name = _name;
          password = _password;
      }
  
      public String getName(){
          return name;
      }
  
      public String getPassword(){
          return password;
      }
  
      public void setPassword(String newPassword){
          password = newPassword;
      }
  
  }
  </code></pre>
  
  <p>when I validate values, I got the message:</p>
  
  <pre><code>SEVERE: Servlet.service() for servlet osAppServlet threw exception
  java.lang.NoSuchMethodException: userAuth.User.&lt;init&gt;()
  </code></pre>
  
  <p>where is the problem?</p>