I am new to use jackson in my project, and today i meet a issue, i try to 
parse the reason, but cant.

I have a object, and set a construct by @JsonCreator, like the blow picture.


When i test with the normal situation, the result is ok. But when i 
transfer a String var to Integer var, i meet the issue.

I have write a ExceptionMapper, it will mapper all exception to a response, 
include the Jackson exception. All action

is normal until the exception object be serialized to json, i got 
StackOverFlow error because of infinite recursion. 

Like this:


i try to debug the flow, this is flow description:

1. the exception occur in the deserialization action when jackson read json 
string from client,

my test string is {"post_id": "test", "post_title": "test"}.

2. and then the exception is proceed by my exception mapper, i set this 
exception object as 

response body.

3. then the server write json response by jackson, when write it, appear 
the infinite recursion error.

This is my exception logic:


and my debug picture(before the error occur, it is serialize flow):


Really need help to find the issue. 

Tip: when i removed the method that has @JsonCreator annotation, the 
infinite recursion error disappear!


You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jackson-user+unsubscr...@googlegroups.com.
To post to this group, send email to jackson-user@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to