Skip to content
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

Build failure when using many OpenApi anotations #2561

Closed
brunobat opened this issue May 22, 2019 · 5 comments
Closed

Build failure when using many OpenApi anotations #2561

brunobat opened this issue May 22, 2019 · 5 comments
Labels
kind/bug Something isn't working
Milestone

Comments

@brunobat
Copy link
Contributor

Describe the bug
We have an application with ~10 endpoints, each one have CRUD+List operations and they are extensively documented with:
@Operation
@RequestBody (when it makes sense)
@APIResponse (at least 5 different ones for OK and error conditions)
@Parameter (when it makes sense)

We Also use:
@OpenAPIDefinition and @Schema on 20+ DTOs and their fields.

The build fails with the error bellow. After commenting a few annotations, the build passed again.

Expected behavior
mvn clean install works

Actual behavior
mvn clean install fails with the following error:

Build step io.quarkus.deployment.steps.MainClassBuildStep#build threw an exception: org.objectweb.asm.MethodTooLargeException: Method too large: io/quarkus/deployment/steps/SmallRyeOpenApiProcessor$build16.deploy (Lio/quarkus/runtime/StartupContext;)V

Full stack trace:
stack-trace.txt

To Reproduce
Steps to reproduce the behavior:
See bug description... Basically, add a lot of OpenApi annotations.

Environment (please complete the following information):
brunobat@sagan:/devel/projects/talkdesk/wfm-core$ mvn -version
OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T19:41:47+01:00)
Maven home: /devel/tools/apache-maven-3.6.0
Java version: 11.0.2, vendor: AdoptOpenJDK, runtime: /usr/lib/jvm/jdk-11.0.2+9
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-50-generic", arch: "amd64", family: "unix"

@brunobat brunobat added the kind/bug Something isn't working label May 22, 2019
@machi1990
Copy link
Member

A dup of #2498? #2550 was proposed to fix the issue.

@brunobat could you please try with a clean build of the master to see if it solves the issue?

@brunobat
Copy link
Contributor Author

@machi1990 Do you mean build quarkus master, change my project dependency and see if it fixes the issue?

@machi1990
Copy link
Member

@machi1990 Do you mean build quarkus master, change my project dependency and see if it fixes the issue?

Hey @brunobat Yes, that's what I meant.

Sorry, I could have been more clear in my message.

@brunobat
Copy link
Contributor Author

Thanks @machi1990 . I've tested my code with your master and it works well. You guys rock! looking forward for next release!

@machi1990
Copy link
Member

Thanks @machi1990 . I've tested my code with your master and it works well. You guys rock! looking forward for next release!

Good to hear that it solves your issue. Do not hesitate to flag it as duplicate and to close the issue.

The next release 0.16.0 is planned for the 29/05. Stay tuned :-)

@kenfinnigan kenfinnigan added this to the 0.16.0 milestone May 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants