-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StackOverflowError when one service implements another service #52
Comments
On another machine i confirmed that on Adopt JDK 11 code throws same overflow exception. |
Hello, I'm getting the same stackoverflow error when adding the additional router to the service loader as my service also implements another service. Lagom: 1.6.5 Any advice on this? |
Hello, I have the same problem. The cause seems to be that the line |
@GMShuhr nice catch. I didn't think this could be a cause for this.
But still same overflow exception exists (like i thought so). When i removed dependency to PetsService in VetsServiceImpl lagom server started normally. When testing i found something which maybe can be helpfull. When i declared service outside of scope i found one thing: service variable needs to have type declared. When this is not done like here:
lagom throws this exception:
Especially i think word recursive in this meaning has a great value. If something loops with this recursion it could cause overflow exception. Maybe im wrong, i don't know lagom that much in service implementation. |
This occurs in Scala
Lagom: 1.6.5
Java: Adopt JDK 11
SBT: 1.5.2
Hello,
i tried to use this library with my lagom project and i found that after starting software throws StackOverflowError.
After i saw this i wanted to check if this is because of my code or something else so i forked example repository.
I changed scala project to be similar what i use in my project.
First i changed api and impl to pets-api and pets-impl. Next i changed sbt to 1.5.2. I did changes in build.sbt ( in is replaced by / )
Next i created (copy+paste of pets api/impl) vets-api and vets-impl (i removed all endpoints but: find).
I copied all annotations and changed some descriptions (like description pets->vets), and removed servers entries(because i don't use one ).
Next i added that vets-impl depends on pets-api
and in lagom loader i created PetsService implementation.
Then i added petsService to vets-impl in constructor
After this changes, when i do runAll vets-impl throws StackOverflowError.
My fork is here
The text was updated successfully, but these errors were encountered: