Unable to find a MessageBodyReader of content-type application/json and type class java.lang.String

前端 未结 8 676
野的像风
野的像风 2020-12-01 18:20

I am using RestEasy client with jackson providers and getting the above error

clientside code is:

ClientRequest request = new ClientRequest(url);
re         


        
8条回答
  •  再見小時候
    2020-12-01 18:44

    I had a similar problem and I realized that the problem was related with the version of resteasy-jackson-provider. I just moved from 3.0.4.Final to 3.0.5.Final and the problem disappeared.

    Additionally I also realized that if I change the third line to the following the result was the expected with no need to change the dependencies.

    Response response = request.get(Object.class).toString();
    

提交回复
热议问题