Reputation: 339
the error is:
10:44:18,520 INFO [STDOUT] - Error creating form bean of class com.getcare.crud.web.StudentForm
java.lang.StackOverflowError
at com.getcare.remote.Structure.<init>(Structure.java:8)
at com.getcare.crud.remote.StudentStructure.<init>(StudentStructure.java:15)
at com.getcare.crud.remote.StudentContactInfoStructure.<init>(StudentContactInfoStructure.java:21)
at com.getcare.crud.remote.StudentStructure.<init>(StudentStructure.java:21)
at com.getcare.crud.remote.StudentContactInfoStructure.<init>(StudentContactInfoStructure.java:21)
at com.getcare.crud.remote.StudentStructure.<init>(StudentStructure.java:21)
What's the possible error?
Upvotes: 0
Views: 697
Reputation: 699
It is hard to pin point with out the code. But from the stacktrace you added my guess is you are trying to initialize StudentStructure
inside StudentContactInfoStructure
's constructor and initializing StudentContactInfoStructure
inside StudentStructure
's constructor. Hence it is going into infinite loop of the calls and throwing stackoverflow error
Upvotes: 1
Reputation: 280030
From your stack trace, it seems that each StudentStructure
has a field and initializes a StudentContactInfoStructure
which has a field and initializes a StudentStructure
. This causes infinite recursion.
Upvotes: 1