title: Getting javax.validation.NoProviderFoundException exception even after adding the dependencies
body: <p>I am new to Java and maven. I might be missing something obvious, but I am not able to figure it out.</p>
  <p>I was trying to add javax validations to my project following the link :
  <a href="https://www.baeldung.com/javax-validation" rel="noreferrer">https://www.baeldung.com/javax-validation</a></p>
  <p>And I have added the following dependencies</p>
  <pre><code>      &lt;dependency&gt;
          &lt;groupId&gt;javax.validation&lt;/groupId&gt;
          &lt;artifactId&gt;validation-api&lt;/artifactId&gt;
          &lt;version&gt;2.0.1.Final&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt;
          &lt;version&gt;6.0.13.Final&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
          &lt;groupId&gt;org.glassfish&lt;/groupId&gt;
          &lt;artifactId&gt;javax.el&lt;/artifactId&gt;
          &lt;version&gt;3.0.0&lt;/version&gt;
        &lt;/dependency&gt;
  </code></pre>
  <p>I have tried group ids org.hibernate and org.hibernate.validator also.</p>
  <p>But I was getting a runtime error during the execution of buildDefaultValidatorFactory() of:</p>
  <pre><code>import javax.validation.Validation;
  import javax.validation.Validator;
  Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
  </code></pre>
  <p>I was getting the following error</p>
  <pre><code>Method threw 'javax.validation.NoProviderFoundException' exception.
  Unable to create a Configuration, because no Bean Validation provider could be found. Add a provider like Hibernate Validator (RI) to your classpath.
  </code></pre>
  <p>What am I missing? Let me know if you need some key info. I have been fighting with this for hours. So, thanks in advance.</p>