title: How to send JSON Object from POSTMAN to Restful webservices
body: <p>I'm trying to send json from POSTMAN to RESTful webservice. I had followed this tutorial <a href="http://docs.brightcove.com/en/perform/player-management/guides/postman.html" rel="noreferrer">url</a> for sending json through POSTMAN.</p>
  
  <p><strong>My URL :</strong></p>
  
  <p><a href="http://localhost:8080/myWebService/rest/dataInsert/insert" rel="noreferrer">http://localhost:8080/myWebService/rest/dataInsert/insert</a></p>
  
  <p><strong>My Service method:</strong></p>
  
  <pre><code>@POST
      @Path("/insert")
      @Consumes(MediaType.APPLICATION_JSON)
      public String insertData(JSONObject jsonlist) throws UnknownHostException;
  </code></pre>
  
  <p><strong>My Impl:</strong></p>
  
  <pre><code>@Override
      public String insertData(JSONObject jsonlist) throws UnknownHostException {
          System.out.println(jsonlist);
          insertDataDao.insertData(jsonlist);
          return "SUCCESS";
      }
  </code></pre>
  
  <p><strong>My DAO:</strong></p>
  
  <pre><code>public  String insertData(JSONObject jsonlist) throws UnknownHostException{
          System.out.println(jsonlist);
          MongoConnection mongoconnection = new MongoConnection();
          MongoClient mongoclient = mongoconnection.getMongoClient();
  
          MongoDatabase db = mongoclient.getDatabase("mydb");
          MongoCollection&lt;Document&gt; col = db.getCollection("col");
  
          String jsonString = jsonlist.toString();
          System.out.println(jsonString);
  
          Document doc = Document.parse(jsonString);
           col.insertOne(doc);
          System.out.println("Inserted Successfully !!!");
          return "SUCCESS";
  
      }
  </code></pre>
  
  <p>But I'm facing the below Exception:</p>
  
  <blockquote>
    <p>JBWEB000236: Servlet.service() for servlet CXFServlet threw exception: java.lang.NoSuchMethodError: javax.ws.rs.InternalServerErrorException.validate(Ljavax/ws/rs/core/Response;Ljavax/ws/rs/core/Response$Status;)Ljavax/ws/rs/core/Response;</p>
  </blockquote>
  
  <p>I'm unable to fix this issue. Can anyone please help me out regarding this ...</p>