last day (15 days later) » 

17:44
0
Q: Infinite recursion occurs on a JSON retrieval of a basic class even though there are no relationships to other entities

developer10I have this simple class (Spring Boot + JPA/Hibernate) that is being used just for testing. @Entity @Table public class User { @Id @Column @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @Column(name="first_name") private String firstName; @Col...

can u send exception stack trace?
@aliakbarazizkhani I've added a part of the console output, is that what you asked for?
are u sure User.java that write this question is main User.java that used in your app?
i think you use some annotation that is not in this user.java
@aliakbarazizkhani No, this is the only User.java entity class, I ran debug once again and made 100% sure that no annotations are present and then I re-pasted the part of output (you can re-check it - it's probably the same). There is another entity class named Company but it is in no way connected to this User.java entity class.
check this :add @JsonIgnore on id
do you have owner property in User.java?
are u using spring data rest?
17:44
@aliakbarazizkhani I'll try it right now. You can see the whole User.java class in my post. And yes, I am using Spring Data Rest (I have spring-boot-starter-data-rest in my pom.xml
if you use spring data rest . i think this is a bug
Hello @aliakbarazizkhani
Take a look at this screenshot to get an idea where it starts to loop: prntscr.com/h67o75
i think this is a bug
ask question in gitter spring data room
17:48
Could be. Btw, having @Jsonignore on the Id didn't help. Thanks for the advice anyway

last day (15 days later) »