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 fails if quarkus-oidc-client is not in the classpath #824

Open
ricardozanini opened this issue Oct 16, 2024 · 2 comments
Open

Build fails if quarkus-oidc-client is not in the classpath #824

ricardozanini opened this issue Oct 16, 2024 · 2 comments
Assignees
Labels
area:client This item is related to the client extension bug Something isn't working

Comments

@ricardozanini
Copy link
Member

As part of the build generation introduced in #795, the latest release now breaks projects that are not using OIDC:

[ERROR] Failed to execute goal com.redhat.quarkus.platform:quarkus-maven-plugin:3.8.4.redhat-00002:build (default) on project openapi-bug: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR]         [error]: Build step io.quarkiverse.openapi.generator.deployment.GeneratorProcessor#additionalBean threw an exception: java.lang.NoClassDefFoundError: io/quarkus/oidc/client/runtime/AbstractTokensProducer
[ERROR]         at java.base/java.lang.ClassLoader.defineClass1(Native Method)
[ERROR]         at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
[ERROR]         at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:508)
[ERROR]         at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:468)
[ERROR]         at io.quarkiverse.openapi.generator.deployment.GeneratorProcessor.additionalBean(GeneratorProcessor.java:72)
[ERROR]         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR]         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[ERROR]         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR]         at java.base/java.lang.reflect.Method.invoke(Method.java:569)
[ERROR]         at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
[ERROR]         at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
[ERROR]         at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
[ERROR]         at java.base/java.lang.Thread.run(Thread.java:840)
[ERROR]         at org.jboss.threads.JBossThread.run(JBossThread.java:501)
[ERROR] Caused by: java.lang.ClassNotFoundException: io.quarkus.oidc.client.runtime.AbstractTokensProducer
[ERROR]         at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
[ERROR]         at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:225)
[ERROR]         at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:210)
[ERROR]         at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:205)
[ERROR]         at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:518)
[ERROR]         at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:468)
[ERROR]         ... 16 more
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

This openAPI spec doesn't even have security tags, so all the authz classes should be skipped and not generated.

@ricardozanini ricardozanini added bug Something isn't working area:client This item is related to the client extension labels Oct 16, 2024
@ricardozanini
Copy link
Member Author

@rmanibus, since you introduced this feature, do you mind taking a look and fixing it if possible?

@rmanibus
Copy link
Contributor

Sure !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:client This item is related to the client extension bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants