question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

StackOverflowError in convertOpenAPISchemaToJsonSchema during tests

See original GitHub issue

Hello! I’ve been trying to use this software to run tests on my OpenAPI 3.1 schema. The schema is imported correctly and the mock server is up and working.

image

Once I run tests with the OPEN_API_SCHEMA runner, however, I get an infinite loop and an endlessly refreshing page. The relevant output of the logs is:

microcks    | 03:02:50.986 DEBUG 1 --- [080-exec-8] i.g.microcks.web.ServiceController       : Retrieving service with id 6126fd32bd4831084acb9962
microcks    | 03:02:51.325 DEBUG 1 --- [    task-3] i.g.m.util.openapi.OpenAPITestRunner     : Response status code : 200
microcks    | 03:02:51.325 DEBUG 1 --- [    task-3] i.g.m.util.openapi.OpenAPITestRunner     : Response media-type is application/json;charset=utf-8
microcks    | 03:02:51.327 DEBUG 1 --- [    task-3] i.g.m.util.openapi.OpenAPITestRunner     : Response expected status code : 200
microcks    | 03:02:51.330 DEBUG 1 --- [    task-3] i.g.m.u.o.OpenAPISchemaValidator         : Guessing OpenAPI spec format is JSON
microcks    | 03:02:51.344 ERROR 1 --- [    task-3] i.g.m.service.TestRunnerService          : Throwable while testing operation GET /boards/{slug}
microcks    |
microcks    | java.lang.StackOverflowError: null
microcks    | 	at io.github.microcks.util.openapi.OpenAPISchemaValidator.convertOpenAPISchemaToJsonSchema(OpenAPISchemaValidator.java:208)
microcks    | 	at io.github.microcks.util.openapi.OpenAPISchemaValidator.convertOpenAPISchemaToJsonSchema(OpenAPISchemaValidator.java:208)
microcks    | 	at io.github.microcks.util.openapi.OpenAPISchemaValidator.convertOpenAPISchemaToJsonSchema(OpenAPISchemaValidator.java:208)
microcks    | 	at io.github.microcks.util.openapi.OpenAPISchemaValidator.convertOpenAPISchemaToJsonSchema(OpenAPISchemaValidator.java:208)
microcks    | 	at io.github.microcks.util.openapi.OpenAPISchemaValidator.convertOpenAPISchemaToJsonSchema(OpenAPISchemaValidator.java:208)
microcks    | 	at io.github.microcks.util.openapi.OpenAPISchemaValidator.convertOpenAPISchemaToJsonSchema(OpenAPISchemaValidator.java:208)
[...a lot more of these]
microcks    | 03:02:51.363 DEBUG 1 --- [    task-3] i.g.m.util.test.HttpTestRunner           : Launching test run on https://backend-dot-bobaboard.uc.r.appspot.com/ for 0 request(s)
microcks    | 03:02:51.395 DEBUG 1 --- [    task-3] i.g.m.util.test.HttpTestRunner           : Launching test run on https://backend-dot-bobaboard.uc.r.appspot.com/ for 0 request(s)
microcks    | 03:02:51.399 DEBUG 1 --- [    task-3] i.g.m.util.test.HttpTestRunner           : Launching test run on https://backend-dot-bobaboard.uc.r.appspot.com/ for 0 request(s)
microcks    | 03:02:51.403 DEBUG 1 --- [    task-3] i.g.m.util.test.HttpTestRunner           : Launching test run on https://backend-dot-bobaboard.uc.r.appspot.com/ for 0 request(s)
microcks    | 03:02:51.403 DEBUG 1 --- [    task-3] i.g.m.util.test.HttpTestRunner           : Launching test run on https://backend-dot-bobaboard.uc.r.appspot.com/ for 0 request(s)
microcks    | 03:02:51.403 DEBUG 1 --- [    task-3] i.g.m.util.test.HttpTestRunner           : Launching test run on https://backend-dot-bobaboard.uc.r.appspot.com/ for 0 request(s)
[...a lot more of these]
microcks    | 03:05:03.020 DEBUG 1 --- [080-exec-8] i.g.m.s.UserInfoInContextInterceptor     : Intercepting and pre-handling request to check @EnableUserInfoInContext
microcks    | 03:05:03.021 DEBUG 1 --- [080-exec-8] i.g.microcks.web.ServiceController       : Retrieving service with id 6126fd32bd4831084acb9962
microcks    | 03:05:04.952 DEBUG 1 --- [080-exec-6] i.github.microcks.web.TestController     : Getting TestResult with id 6127045abd4831084acb9967
microcks    | 03:05:04.956 DEBUG 1 --- [80-exec-10] i.github.microcks.web.TestController     : Getting TestResult with id 6127045abd4831084acb9967
microcks    | 03:05:04.988 DEBUG 1 --- [080-exec-1] i.g.m.s.UserInfoInContextInterceptor     : Intercepting and pre-handling request to check @EnableUserInfoInContext
microcks    | 03:05:04.988 DEBUG 1 --- [080-exec-1] i.g.microcks.web.ServiceController       : Retrieving service with id 6126fd32bd4831084acb9962
microcks    | 03:05:06.958 DEBUG 1 --- [080-exec-7] i.github.microcks.web.TestController     : Getting TestResult with id 6127045abd4831084acb9967
microcks    | 03:05:06.958 DEBUG 1 --- [080-exec-4] i.github.microcks.web.TestController     : Getting TestResult with id 6127045abd4831084acb9967
[...an infinite amount of these]

I initially thought this was due to my attempt to test a locally-running server (which has also been an issue, albeit a different one), but I suspect it has more to do with the API schema. I’ve pasted the output of the http://localhost:8080/api/resources/BobaBoard's%20API%20documentation.%20Woho!-0.0.1.json endpoint here: https://pastebin.com/FrpFZ1xX

And here what the eternally-flashing test result page displays: image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
essential-randomnesscommented, Aug 27, 2021

It’s working now! Thank you very much for the quick fix. Excited to play around with the software more 😃

0reactions
lbroudouxcommented, Aug 26, 2021

New latest container image is now available. Could you confirm it fixes the issue? Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.StackOverflowError while JUNIT testing
This is method I want to test, I think I have to create three cases to test this right? public void addTraining(String userId,...
Read more >
How to Fix java.lang.StackOverflowError in Java - Rollbar
The java. lang. StackOverflowError indicates that the application stack is exhausted and is usually caused by deep or infinite recursion.
Read more >
The StackOverflowError in Java - Baeldung
Let's start with the basics. When a method is called, a new stack frame gets created on the call stack. This stack frame...
Read more >
java.lang.StackOverflowError for Test Collection (Parallel)
Hi there hope you are fine today, Some of the tests return a java.lang.StackOverflowError. I have no idea how to solve that,Katalon JVM ......
Read more >
Bug: StackOverflowError in case of complex annotation ...
Running the tests produces the mentioned StackOverflowError. Commenting out the mockk<> removes the error. Steps to Reproduce. Project with ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found