Error "self-reference leading to cycle" error when returning JSON from a JAX-RS resource in EAP 6
Issue
When return a model object that should be parsed to JSON format from our JAX-RS resource we have the following exception:
org.codehaus.jackson.map.JsonMappingException: Direct self-reference leading to cycle (through reference chain: ${your model class})
Environment
- JBoss Enterprise Application Platform (EAP)
- 6.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.