1

I have a JAX-RS client which is as follow:

MyObj myObj = new MyObj();
myObj .setRemark("My test case");
myObj .setSomeDate( LocalDate.now());
...

 WebResource webResource = client
            .resource("my_url");

    webResource
            .header("apikey", "mykey")
            .accept("application/json")
            .type("application/json")
            .post(MyObj.class, myObj );

Evrything works fine for JDK8. But then when I switched to JDK7, it starts giving this error: javax.ws.rs.WebApplicationException: com.owlike.genson.JsonBindingException: Failed to serialize object of type class MyObj

I am using Genson v1.4. Any help would be appreciated.

xcoder
  • 1,336
  • 2
  • 17
  • 44

0 Answers0