title: @NotNull annotation is not checking null queryparameter in Jersey REST resource
body: <p>I am trying to use javax.validation.validation-api for validating <code>@QueryParam</code> parameters. I have followed steps as below:</p>
  
  <ol>
  <li><p>Added dependency:</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;1.1.0.Final&lt;/version&gt;
      &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.glassfish.jersey.ext&lt;/groupId&gt;
      &lt;artifactId&gt;jersey-bean-validation&lt;/artifactId&gt;
      &lt;version&gt;2.12&lt;/version&gt;
      &lt;exclusions&gt;
          &lt;exclusion&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt;
          &lt;/exclusion&gt;
      &lt;/exclusions&gt;
  &lt;/dependency&gt;
  </code></pre></li>
  <li><p>Jersey resource:</p>
  
  <pre><code>@GET
  @Produces(MediaType.APPLICATION_JSON)
  @Path("/{param1}")
  @ValidateOnExecution
  public SomeObject get(@PathParam("param1") String param1,
      @NotNull @QueryParam("q1") String q1,
      @NotNull @QueryParam("q2") String q2) {
  
      try {
          //Assuming q1 and q2 are NOT Null here
          ...
      } catch(Exception exception) { 
          throw new WebApplicationException(exception, 
                  Response.Status.INTERNAL_SERVER_ERROR);
      }
      return someObject;
  }     
  </code></pre></li>
  <li><p>I tried giving various combination of URLs as in q1 and q2 both parameters absent, q1 absent or q2 absent. Each time, <code>@NotNull</code> is not getting detected. Means try block code is getting executed irrespective of q1 and q2 being <code>null</code>. </p></li>
  </ol>
  
  <p>What else needs to be done? </p>
  
  <p>I referred this link - <a href="https://jersey.java.net/documentation/latest/bean-validation.html#d0e11956">https://jersey.java.net/documentation/latest/bean-validation.html#d0e11956</a>. </p>
  
  <p>How to check Auto-Discoverable feature is on in my environment? </p>