dhis2 / dhis2-java-client

DHIS 2 API client for Java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RestClientException found while want to fetch any dhis2 object type through rest service call

sohelsarder opened this issue · comments

Dear Altruist,

Thanks, for your great work!!. But I am getting error and could not fetch any object from dhis2. Can you please suggest what I am missing?

Service URL: https://play.dhis2.org/2.29/api/dataElements/fbfJHSPpUQD

Error:
RestClientException: Could not extract response: no suitable HttpMessageConverter found for response type [class org.hisp.dhis.model.DataElement] and content type [application/json;charset=UTF-8]

Thanks,
Sohel

I am not sure it seems there is problem with model classes where the response json can not correctly mapped with respective model classes. Can you please give me your further thoughts on it.

I have added dependency in pom file that resolved the issues,

com.fasterxml.jackson.core jackson-databind 2.9.0