Jackson parsing exception -(although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value Jackson parsing exception -(although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value json json

Jackson parsing exception -(although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value


Finally I was able to solve this problem. This issue was a result of wrong code written in side my publisher code where, first I was encrypting my payload by converting my entried payload as json object (using jackson), later I was again storing that json payload inside object with header and trying to convert that object into string(again using jackson converter). In this process, I was converting entire payload to string twice, as a result I was introducing extra \r\n into my payload which I was sending through kafka. While converting back to object from json to object, this extra \r\n was causing the problem what I pasted earlier.

As a solution, I have stored the already converted json object into another object with jackson annotation @JsonRawData . This prevent adding extra \r\n.