[Solved] JSON parse error: (was java.lang.NullPointerException); nested exception is com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain:
Table of Contents
[Solved] JSON parse error: (was java.lang.NullPointerException); nested exception is com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain:
Full Exception:
{"timestamp":"2018-09-21T12:25:44.365+0000","status":400,"error":"Bad Request","message":"JSON parse error: (was java.lang.NullPointerException); nested exception is com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: com.ngdeveloper.entities.Coupon[\"store\"]->com.ngdeveloper.entities.Store[\"description\"])","path":"/ngdeveloper/api/rest/coupon/add"}
Solution for com.fasterxml.jackson.databind.JsonMappingException:
By default jackson tries to serialize the class as well as all the fields of the class, so you could have got the null pointer exception.
Add @JsonIgnore to your getter method, here I resolved like this,
@JsonIgnore
public Set<Description> getDescription() {
return description;
}
[7468]snai Official Login | সেরা অনলাইন ক্যাসিনো এবং দ্রুত বিকাশ পেমেন্ট,snai অফিসিয়াল লগইন করে উপভোগ করুন সেরা অনলাইন ক্যাসিনো গেম। এখানে পাবেন দ্রুত বিকাশ পেমেন্ট সুবিধা এবং স্লট গেমের সহজ নিয়ম। আজই যোগ দিন। visit: snai
[6394]Wazbee – Link vào tải app và cách chơi baccarat online,Truy cập wazbee để nhận link vào mới nhất, tải app nhanh chóng và khám phá mẹo quay slot nổ hũ cực hay. Hỗ trợ nạp tiền qua Momo tiện lợi. Tham gia ngay! visit: wazbee