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

rest-openapi code generation does not work with Gradle #7078

Open
jamesnetherton opened this issue Mar 3, 2025 · 0 comments
Open

rest-openapi code generation does not work with Gradle #7078

jamesnetherton opened this issue Mar 3, 2025 · 0 comments
Labels

Comments

@jamesnetherton
Copy link
Contributor

Bug description

There is a class loading issue. Seems resolving stuff via the Java ServiceLoader has some problems:

Caused by: java.util.ServiceConfigurationError: io.swagger.codegen.v3.CodegenConfig: Provider io.swagger.codegen.v3.generators.html.StaticHtmlCodegen could not be instantiated
        at io.swagger.codegen.v3.CodegenConfigLoader.forName(CodegenConfigLoader.java:19)
        at io.swagger.codegen.v3.config.CodegenConfigurator.loadCodegenConfig(CodegenConfigurator.java:673)
        at io.swagger.codegen.v3.config.CodegenConfigurator.toClientOptInput(CodegenConfigurator.java:518)
        at org.apache.camel.quarkus.component.rest.openapi.deployment.CamelQuarkusSwaggerCodegenProvider.trigger(CamelQuarkusSwaggerCodegenProvider.java:145)
        at io.quarkus.deployment.CodeGenerator.lambda$trigger$4(CodeGenerator.java:206)
        at io.quarkus.deployment.CodeGenerator.callWithClassloader(CodeGenerator.java:181)
        at io.quarkus.deployment.CodeGenerator.trigger(CodeGenerator.java:203)
        at io.quarkus.deployment.CodeGenerator.initAndRun(CodeGenerator.java:80)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        ... 23 more
Caused by: java.lang.NoClassDefFoundError: org/commonmark/parser/Parser
        at io.swagger.codegen.v3.utils.Markdown.<init>(Markdown.java:15)
        at io.swagger.codegen.v3.generators.html.StaticHtmlCodegen.<init>(StaticHtmlCodegen.java:160)
        at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
        ... 32 more
Caused by: java.lang.ClassNotFoundException: org.commonmark.parser.Parser
        at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:569)
        at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:517)
        ... 35 more
@jamesnetherton jamesnetherton added the bug Something isn't working label Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant