quarkus: SmallRyeOpenApiProcessor#build threw an exception: java.lang.StackOverflowError

Describe the bug

At build step OpenApiDocument generation fails with stackoveflowerror.

 Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:2.10.0.Final:build (default) on project alert-manager-ng: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed du
e to errors
[ERROR]         [error]: Build step io.quarkus.smallrye.openapi.deployment.SmallRyeOpenApiProcessor#build threw an exception: java.lang.StackOverflowError
[ERROR]         at io.smallrye.openapi.api.util.FilterUtil$$Lambda$705/0x00000001007aec40.<init>(Unknown Source)
[ERROR]         at io.smallrye.openapi.api.util.FilterUtil$$Lambda$705/0x00000001007aec40.get$Lambda(Unknown Source)
[ERROR]         at io.smallrye.openapi.api.util.FilterUtil.filterSchema(FilterUtil.java:371)
[ERROR]         at io.smallrye.openapi.api.util.FilterUtil.filter(FilterUtil.java:139)
[ERROR]         at io.smallrye.openapi.api.util.FilterUtil.filterSchema(FilterUtil.java:373)
[ERROR]         at io.smallrye.openapi.api.util.FilterUtil.filter(FilterUtil.java:139)
[ERROR]         at io.smallrye.openapi.api.util.FilterUtil.filterSchema(FilterUtil.java:373)

Probably, there is incorrect configuration of OpenApi annotations at endpoints. But we do not have any filters there

Expected behavior

Projects is built

Actual behavior

Build is fails with stackoveflowerror

How to Reproduce?

No response

Output of uname -a or ver

Microsoft Windows [Version 10.0.19044.1826]

Output of java -version

openjdk version “11” 2018-09-25 OpenJDK Runtime Environment 18.9 (build 11+28) OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.10.0.Final

Build tool (ie. output of mvnw --version or gradlew --version)

OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0 Apache Maven 3.8.3 (ff8e977a158738155dc465c6a97ffaf31982d739) Maven home: C:\Tools\apache-maven-3.8.3 Java version: 11, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-11 Default locale: en_US, platform encoding: Cp1252 OS name: “windows 10”, version: “10.0”, arch: “amd64”, family: “windows”

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 19 (11 by maintainers)

Most upvoted comments

@timonzi , looks like it’s the same issue. I see now with your example that there are cyclic references in the OpenAPI model. https://github.com/smallrye/smallrye-open-api/pull/1230 should protect against that in the next release, but I can also look at why they the references are being set this way. Thanks for the info

@MikeEdgar @phillip-kruger can one of you take a look at this one?