Karthik
Karthik

Reputation: 51

Jackson with Spring Boot

Hi i used Jackson Faster for fetching the Data from Relational tables to avoid iteration while converting from POJO to JSON.

After i Posting same Entity Object While it's giving an error.

Error:

ERROR 
. c.j.MappingJackson2HttpMessageConverter : 
Failed to evaluate deserialization for type 
[simple type, class com.nbfc.entity.CustmastState]:
com.fasterxml.jackson.databind.JsonMappingException:
Multiple back-reference properties with name 'defaultReference'

Jackson: Multiple back-reference properties with name.

Please check this once..

Upvotes: 0

Views: 6750

Answers (1)

Steve
Steve

Reputation: 9480

It sounds like your entity contains a reference to another entity which has a reference back to it. Jackson doesn't like these circular references.

Hence the @JsonBackReference annotation. Annotate the entity reference with that annotation and Jackson will avoid such infinite loops.

Upvotes: 2

Related Questions