0

I am making a call to a Rest service developed using Dropwizard and able to successfully make calls to Get requests however Post request to the same service (another end point offcourse) is not working. It gives a 500 server error and in the logs I see the following exception:

Classcast exception: io.dropwizard.jetty.BiDiGzipHandler$WrappedInputStream cannot be cast to org.eclipse.jetty.server.request

Here is a snippet of how I am making a call:

RequestPojo pojo = new RequestPojo (123, "test");
ObjectMapper mapper = new ObjectMapper();
String json=null;
try{
  json = mapper.writeValueAsString(pojo);
}
catch(Exception e){
   //loggers
}
Response response = target.request().accept(MediaType.Application_JSON).post(Entity.json(jsonString);
String id = response.readEntity(new GenericType<Map>(){}.get("generatedID"));

I hardly see anything for this exception on any of the posts. Can some one help me with this exception. Thanks for any help.

Arunabh
  • 167
  • 1
  • 7
  • 18

0 Answers0