title: @QueryParam incorrect parameter type on a Java class
body: <p>I have a GET request call as follow and I am getting an </p>
  
  <blockquote>
    <p>Incorrect parameter type error </p>
  </blockquote>
  
  <pre><code>@GET
  @Produces(MediaType.APPLICATION_JSON)
  @Consumes(MediaType.APPLICATION_JSON)
  @Path("/apiData")
  MyReturnResponse getData(@QueryParam("request") MyRequestClass apiRequest);
  </code></pre>
  
  <p>Here is the request class:</p>
  
  <pre><code>public class MyRequestClass {
      @NotNull(message = "application name is required")
      public String applicationName;
  
      @NotNull(message = "code type is required")
      public String codeType;
  
      @NotNull(message = "request date is required")
      public String requestDate;
  }
  </code></pre>
  
  <p>I am not sure as to why I am getting this. The following are the suggestion from my IDE. </p>
  
  <blockquote>
    <p>Be a primitive type.<br>
    Have a constructor that accepts a single String argument.<br>
    Have a static method named valueOf or fromString that accepts a 
    single String argument (see, for example, Integer.valueOf(String)).<br>
    Have a registered implementation of ParamConverterProvider JAX-RS 
    extension SPI that returns a ParamConverter instance capable of a 
    "from string" conversion for the type.<br>
    Be List, Set or SortedSet, where T satisfies 2, 3 or 4 
    above. The resulting collection is read-only.</p>
  </blockquote>
  
  <p>What do I need to do? Please help.</p>