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

Quarkus Example of Reactive Panache with reactive postgres client not working with gradle #21200

Closed
TheoCadoret opened this issue Nov 4, 2021 · 4 comments
Labels

Comments

@TheoCadoret
Copy link

TheoCadoret commented Nov 4, 2021

Describe the bug

When I run the example in https://quarkus.io/guides/getting-started-reactive but with gradle instead of maven, I get the error :

java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors [error]: Build step io.quarkus.agroal.deployment.AgroalProcessor#build threw an exception: io.quarkus.runtime.configuration.ConfigurationException: Unable to find a JDBC driver corresponding to the database kind 'postgresql' for the default datasource. Either provide a suitable JDBC driver extension, define the driver manually, or disable the JDBC datasource by adding 'quarkus.datasource.jdbc=false' to your configuration if you don't need it. at io.quarkus.agroal.deployment.AgroalProcessor.resolveDriver(AgroalProcessor.java:331) at io.quarkus.agroal.deployment.AgroalProcessor.getAggregatedConfigBuildItems(AgroalProcessor.java:277) at io.quarkus.agroal.deployment.AgroalProcessor.build(AgroalProcessor.java:82) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:820) at io.quarkus.builder.BuildContext.run(BuildContext.java:277) at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18) at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478) at java.base/java.lang.Thread.run(Thread.java:829) at org.jboss.threads.JBossThread.run(JBossThread.java:501)

Expected behavior

Well, I think it should work

Actual behavior

No response

How to Reproduce?

Proceed with the tutorial at https://quarkus.io/guides/getting-started-reactive but use gradle instead.

Then run gradle build -x test (otherwise it fails for something else not relevant here) and you should see it.

Output of uname -a or ver

Linux theo-GF63-Thin-10SCSR 5.11.0-37-generic #41~20.04.2-Ubuntu SMP Fri Sep 24 09:06:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "11.0.11" 2021-04-20 LTS OpenJDK Runtime Environment Zulu11.48+21-CA (build 11.0.11+9-LTS) OpenJDK 64-Bit Server VM Zulu11.48+21-CA (build 11.0.11+9-LTS, mixed mode)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

quarkusPlatformVersion=2.4.0.Final

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

------------------------------------------------------------ Gradle 7.2 ------------------------------------------------------------ Build time: 2021-08-17 09:59:03 UTC Revision: a773786b58bb28710e3dc96c4d1a7063628952ad Kotlin: 1.5.21 Groovy: 3.0.8 Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020 JVM: 11.0.12 (Eclipse Foundation 11.0.12+7) OS: Linux 5.11.0-37-generic amd64

Additional information

Actually, within my project where it first failed, I was using a simple async pg client to run my queries. Simply adding the reactive panache extension without using it was enough to make the stacktrace appear.
No response

@TheoCadoret TheoCadoret added the kind/bug Something isn't working label Nov 4, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Nov 4, 2021

/cc @FroMage, @evanchooly, @glefloch, @loicmathieu, @quarkusio/devtools

@glefloch
Copy link
Member

glefloch commented Nov 4, 2021

Thanks for reporting this @TheoCadoret.
#21019 takes care it and should available in 2.5.0.
as a workaround, you can add the following exclude:

configurations.all {
  exclude(group = "io.quarkus", module = "quarkus-agroal-deployment")
}

@TheoCadoret
Copy link
Author

Wow that was quick !
The workaround seems to be working, thank you very much for your helpful response !

@glefloch
Copy link
Member

glefloch commented Nov 4, 2021

Your welcome. I’m closing the issue. Feel free to reopen it if you get the problem back

@glefloch glefloch closed this as completed Nov 4, 2021
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

2 participants