we are using Resteasy 3.9.0.Final in our vanilla java project. I have an api method which reads a POJO(Request) written in Jackson com.fasterxml.jackson.core:jackson-annotations:2.10.0.
@Override
@POST
@GZIP
@Path("/api")
public Response call( @HeaderParam("host") @ApiParam(value = "host", required = true) String hostName,
@ApiParam(value = "", required = true) Request request) {
But while reading it i get error -
“detailedErrorMessage”: “{\“messageDetails\“:\“Unrecognized field \\\“id\\\” (Class com.abc.api.platform.xyz.pqr), not marked as ignorable\\n at [Sou
at org.codehaus.jackson.map.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:53)
at org.codehaus.jackson.map.deser.StdDeserializationContext.unknownFieldException(StdDeserializationContext.java:267)
at org.codehaus.jackson.map.deser.std.StdDeserializer.reportUnknownProperty(StdDeserializer.java:673)
at org.codehaus.jackson.map.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:659)
But when I explicit read request in string and convert it into a Request class using ObjectMapper of Fasterxml then it works fine. How to force the api method to read POJO with FasterXML ObjectMapper instead of CodeHaus?
I have this in my dependency tree also
[INFO] +- org.jboss.resteasy:resteasy-jackson-provider:jar:3.9.0.Final:compile
[INFO] | +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
[INFO] | +- org.codehaus.jackson:jackson-jaxrs:jar:1.9.13:compile
[INFO] | \- org.codehaus.jackson:jackson-xc:jar:1.9.13:compile
org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
org.codehaus.mojo:build-helper-maven-plugin:maven-plugin:3.3.0:compile