I am getting jackson deserialisation error when I upgraded spring cloud netflix from 1.3.0.M1 -> 1.3.0.RELEASE.
The Post request that I hit is
Received [POST /wms-mdm/catalog HTTP/1.1
Host: localhost:8093
Content-Type: application/json
Origin: http://localhost:8093
Accept-Encoding: gzip, deflate
Connection: keep-alive
Accept: */*
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12) AppleWebKit/602.1.50 (KHTML, like Gecko) Version/10.0 Safari/602.1.50
Referer: http://localhost:8093/wms-mdm/swagger-ui.html
Content-Length: 99
Accept-Language: en-us
With Data
{
"clientCatalogId": "7",
"shortDescription": "Dummy Catalog",
"longDescription": "Dummy Catalog"
}]
The error I am getting is:
com.fasterxml.jackson.databind.JsonMappingException: Could not find creator property with name 'id' (in class com.gor.platform.mdm.core.pojo.Catalog) at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:270) ~[jackson-databind-2.8.7.jar:2.8.7] at com.fasterxml.jackson.databind.DeserializationContext.reportMappingException(DeserializationContext.java:1234) ~[jackson-databind-2.8.7.jar:2.8.7] at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.addBeanProps(BeanDeserializerFactory.java:551) ~[jackson-databind-2.8.7.jar:2.8.7] at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.buildBeanDeserializer(BeanDeserializerFactory.java:226) ~[jackson-databind-2.8.7.jar:2.8.7] at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.createBeanDeserializer(BeanDeserializerFactory.java:141) ~[jackson-databind-2.8.7.jar:2.8.7] at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer2(DeserializerCache.java:403) ~[jackson-databind-2.8.7.jar:2.8.7] at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(DeserializerCache.java:349) ~[jackson-databind-2.8.7.jar:2.8.7] at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:264) ~[jackson-databind-2.8.7.jar:2.8.7] at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:244) ~[jackson-databind-2.8.7.jar:2.8.7] at com.fasterxml.jackson.databind.deser.DeserializerCache.hasValueDeserializerFor(DeserializerCache.java:191) ~[jackson-databind-2.8.7.jar:2.8.7] at com.fasterxml.jackson.databind.DeserializationContext.hasValueDeserializerFor(DeserializationContext.java:421) ~[jackson-databind-2.8.7.jar:2.8.7] at com.fasterxml.jackson.databind.ObjectMapper.canDeserialize(ObjectMapper.java:2713) ~[jackson-databind-2.8.7.jar:2.8.7] at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.canRead(AbstractJackson2HttpMessageConverter.java:162) ~[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodArgumentResolver.readWithMessageConverters(AbstractMessageConverterMethodArgumentResolver.java:195) [spring-webmvc-4.3.7.RELEASE.jar:4.3.7.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.readWithMessageConverters(RequestResponseBodyMethodProcessor.java:150) [spring-webmvc-4.3.7.RELEASE.jar:4.3.7.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.resolveArgument(RequestResponseBodyMethodProcessor.java:128) [spring-webmvc-4.3.7.RELEASE.jar:4.3.7.RELEASE] at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:121) [spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
When I downgrade netflix cloud to old version things works fine. Anyone can help?
lombok
? Can you pasteCatalog
pojo class?@AllArgsConstructor
annotation alone and check?@JsonIgnoreProperties(ignoreUnknown = true)
annotation toCatalog
pojo class?