I am having a org.joda.time.DateTime field in my API response object. The application gives proper response as json but when the Accept header is set to application/xml it fails with error
Caused by:
com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Joda date/time typeorg.joda.time.DateTimenot supported by default: add Module "com.fasterxml.jackson.datatype:jackson-datatype-joda" to enable handling (through reference chain: com.abc.xyz.dto.requestqueuelist.RequestByIdDto["dateCreated"])
But I do have the jackson-datatype-joda library in my project. The issue started in recent versions and jackson version in the project is 2.14.3. What could be the reason for this issue and how to resolve this?