Stakover flow error with Jackson applied on JPA Entities to generate JSON
I have a JPA code with OneToMany relationship. A Customer has a list of Item to check out. However, the code continue to generate StackOverflowError . Once, I had resolved this one by applying @JsonIgnore while fetching the List<Item> from Customer entity. But even that does not seem to work anymore. In Customer class: @OneToMany(mappedBy = "customer", orphanRemoval = true) @JsonIgnore private List<Item> items; In Item class: @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "CUSTOMER_ID", nullable = false) private Customer customer; And CustomerRest class: @Path("customers") public class