title: Jax-Rs: Mapping json input to a bean using BeanParam doesn't work
body: <p>I'm using the annotation @BeanParam on my Rest method to map the JSON input to my bean. The problem is that @BeanParam isn't mapping the input.</p>
  
  <p>This is the method:</p>
  
  <pre><code>@POST
  @Path("/test")
  @Produces(MediaType.APPLICATION_JSON)
  @Consumes(MediaType.APPLICATION_JSON)
  public String test(@Context HttpServletResponse servletResponse, @BeanParam MyBean mb) 
  </code></pre>
  
  <p>MyBean.java:</p>
  
  <pre><code>public class MyBean{
  
  @QueryParam("a")
  private String a;
  
  public MyBean(@QueryParam("a") String s) {
      this.a= s;
  }
  
  public String getA() {
      return a;
  }
  
  public void setA(String a) {
      this.a= a;
  }
  
  }
  </code></pre>
  
  <p>My pom.xml is:</p>
  
  <pre><code>&lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;javax-servlet.version&gt;4.0.1&lt;/javax-servlet.version&gt;
      &lt;jackson.version&gt;2.9.7&lt;/jackson.version&gt;
      &lt;version.jersey&gt;2.25&lt;/version.jersey&gt;
  &lt;/properties&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
          &lt;version&gt;${javax-servlet.version}&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.glassfish.jersey.core&lt;/groupId&gt;
          &lt;artifactId&gt;jersey-server&lt;/artifactId&gt;
          &lt;version&gt;${version.jersey}&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.glassfish.jersey.containers&lt;/groupId&gt;
          &lt;artifactId&gt;jersey-container-servlet&lt;/artifactId&gt;
          &lt;version&gt;${version.jersey}&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-core&lt;/artifactId&gt;
          &lt;version&gt;${jackson.version}&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
          &lt;version&gt;${jackson.version}&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>I'm using Java 8, Jersey 2.25 and WildFly 14.
  The Rest service class extends org.glassfish.jersey.server.ResourceConfig.</p>
  
  <p>I'm not understanding why isn't working.</p>