Hi all I am getting the following error whenever I am trying to invoke validator in my spring
Servlet.service() for servlet spring threw exception: java.lang
The problem is actually in Validator class you are using NewUserRegistration's object which is wrong because you want to validate your User's object not your NewUserRegistration's object.
@Override
public boolean supports(Class> classz)
{
return NewUserRegistration.class.equals(classz);
}
which should be
@Override
public boolean supports(Class> classz)
{
return User.class.equals(classz);
}