I am receiving com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No value type configured for ObjectReader
problem while executing below code
Jackson version is jackson-databind-2.9.9.jar
public <T> T parsingData(String body) {
try {
return getObjectMapper().reader().readValue(body);
} catch (IOException ioe) {
ioe.printStackTrace();
}
}
Below exact Exception i'm getting in printStackTrace
and can find the String body
which is exposed in the exception.
com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No value type configured for ObjectReader
at [Source: (String)"{
"timestamp": "2019-06-04T09:36:50.086+02:00",
"path": "/api/check/85358/checking/246syb-f3f2-4756-91da-dae3e8ce774b/test/22462da-c4e2-45ca-bd27-246/rows/8bc3965a-ae22-4d7f-b770-262sgs24/port",
"status": 400,
"error": "Internal Server Error",
"message": "[owner.firstName2:size:1:30, owner.lastName2:size:1:30]",
"errorCode": 200000
}
"; line: 1, column: 1]
Updated: Could you please explain me why am i receiving this exception? Is this because that I haven't provide Class
or TypeReference
?