title: UnrecognizedPropertyException: Unrecognized field not marked as ignorable at Source: org.apache.catalina.connector.CoyoteInputStream@14ec141
body: <p>I am making rest web-services my code is:</p>
  
  <pre><code>@Path("/add")
  @POST
  @Produces(MediaType.APPLICATION_JSON)
  public Response addMembers(List&lt;GroupMemberMap&gt; groupMemberMaps){
      String message = "";            
      System.out.println("Inside addMembers of class "+this.toString());      
      try {
          DBConnection.insertMembers(groupMemberMaps);
          message = "Member(s) added";
          return Response.status(Status.CREATED)
                  .entity(message)
                  .type(MediaType.TEXT_PLAIN)
                  .build();
      } catch(SQLException sqle){
          System.out.println("addMembers catch sqle");
          message = "A problem occured while adding members : "+sqle.getMessage();
          return Response.status(Status.INTERNAL_SERVER_ERROR)
                  .entity(message)
                  .type(MediaType.TEXT_PLAIN)
                  .build();
      }
      catch (Exception e) {
          // TODO Auto-generated catch block
          System.out.println("Inside addMembers catch  "+e.getMessage());
          message = "A problem occured while adding members : "+e.getMessage();
          return Response.status(Status.INTERNAL_SERVER_ERROR)
                  .entity(message)
                  .type(MediaType.TEXT_PLAIN)
                  .build();
      }       
  }
  </code></pre>
  
  <p>but when i call it with this Json :</p>
  
  <pre><code>[
  {
      "userId":"3",
      "groupId":"4"
  }
  ]
  </code></pre>
  
  <p>I'm getting following Exception:</p>
  
  <blockquote>
    <p>javax.servlet.ServletException: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "userId" (Class com.tazligen.model.GroupMemberMap), not marked as ignorable at [Source: org.apache.catalina.connector.CoyoteInputStream@14ec141; line: 2, column: 15] (through reference chain: com.tazligen.model.GroupMemberMap["userId"])</p>
  </blockquote>
  
  <p>My GrouMemberMap model class is :</p>
  
  <pre><code>package com.tazligen.model;
  
  @XmlRootElement
  public class GroupMemberMap {
  
  private String userId;
  private String groupId;
  
  public String getUserid() {
      return userId;
  }
  public void setUserid(String userId) {
      this.userId = userId;
  }
  public String getGroupId() {
      return groupId;
  }
  public void setGroupId(String groupId) {
      this.groupId = groupId;
  }       }
  </code></pre>
  
  <p>I have tried another method just like this :</p>
  
  <pre><code>@Path("/membertest")
  @POST   
  public String test(List&lt;User&gt; members){
      return "Test subresource members working";
  }
  </code></pre>
  
  <p>with json </p>
  
  <pre><code>[{
  "userId":"3",
  "userName":"John"}]
  </code></pre>
  
  <p>but this works alright :/</p>
  
  <p>Need Someone help.</p>