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

[kotlin] [reactive] Unable to find a JDBC driver corresponding to the database kind 'postgresql' for the default datasource #21227

Closed
MartinX3 opened this issue Nov 5, 2021 · 11 comments
Labels
area/kotlin kind/bug Something isn't working
Milestone

Comments

@MartinX3
Copy link

MartinX3 commented Nov 5, 2021

Describe the bug

I use only yaml, kotlin, gradle, hibernate reactive and postgresql.
If I don't use quarkus.datasource.jdbc=false I get errors.

Expected behavior

I can use the application.

Actual behavior

2021-11-05 13:34:51,133 INFO  [org.jbo.threads] (main) JBoss Threads version 3.4.2.Final
2021-11-05 13:34:51,254 INFO  [io.qua.dep.dev.IsolatedDevModeMain] (main) Attempting to start live reload endpoint to recover from previous Quarkus startup failure
2021-11-05 13:34:51,338 ERROR [io.qua.dep.dev.IsolatedDevModeMain] (main) Failed to start quarkus: 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:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:821)
        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:833)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)

        at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:418)
        at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:276)
        at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:67)
        at io.quarkus.deployment.dev.IsolatedDevModeMain.firstStart(IsolatedDevModeMain.java:91)
        at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:444)
        at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:65)
        at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:149)
        at io.quarkus.bootstrap.app.CuratedApplication.runInAugmentClassLoader(CuratedApplication.java:105)
        at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:145)
        at io.quarkus.deployment.dev.DevModeMain.main(DevModeMain.java:63)
Caused by: 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:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:821)
        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:833)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)

        at io.quarkus.builder.Execution.run(Execution.java:116)
        at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:79)
        at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:161)
        at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:416)
        ... 9 more
Caused by: 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:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:821)
        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:833)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)

How to Reproduce?

Reproducer:
quarkus-error-reproducer.tar.gz

Output of uname -a or ver

Linux laptop 5.14.16-zen1-1-zen #1 ZEN SMP PREEMPT Tue, 02 Nov 2021 22:23:00 +0000 x86_64 GNU/Linux

Output of java -version

openjdk version "17" 2021-09-14 OpenJDK Runtime Environment (build 17+35) OpenJDK 64-Bit Server VM (build 17+35, mixed mode)

GraalVM version (if different from Java)

N/A

Quarkus version or git rev

2.4.1

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

------------------------------------------------------------ Gradle 7.2 ------------------------------------------------------------ Build time: 2021-08-18 14:41:40 UTC Revision: Kotlin: 1.5.21 Groovy: 3.0.8 Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020 JVM: 17 (Oracle Corporation 17+35) OS: Linux 5.14.16-zen1-1-zen amd64

Additional information

No response

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

quarkus-bot bot commented Nov 5, 2021

/cc @evanchooly

@geoand
Copy link
Contributor

geoand commented Nov 9, 2021

cc @gsmet

@geoand
Copy link
Contributor

geoand commented Nov 9, 2021

I was able to reproduce this issue with Quarkus 2.4.1.Final.

However, with Quarkus from main (which will be 2.5.0.CR1 in a few days), the problem no longer exists, so let's close this.

P.S. I don't know what fixed the issue, perhaps @gsmet knows.

@geoand geoand closed this as completed Nov 9, 2021
@geoand geoand added this to the 2.5 - main milestone Nov 9, 2021
@MartinX3
Copy link
Author

MartinX3 commented Dec 3, 2021

@geoand I tried 2.5.1 and still get this 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.

@geoand
Copy link
Contributor

geoand commented Dec 3, 2021

Have you updated your reproducer?

@MartinX3
Copy link
Author

MartinX3 commented Dec 3, 2021

@geoand it's caused by implementation("io.quarkus:quarkus-security-jpa")
I reuploaded the reproducer now.

@geoand
Copy link
Contributor

geoand commented Dec 3, 2021

quarkus-security-jpa depends on Hibernate ORM, not Hibernate Reactive and those two don't work together.

@MartinX3
Copy link
Author

MartinX3 commented Dec 3, 2021

ah, is this the correct issue ticket for my case, @geoand or is there a quarkus-security-reactive package?
#19302

@geoand
Copy link
Contributor

geoand commented Dec 3, 2021

Yup, that is correct

@MartinX3
Copy link
Author

MartinX3 commented Dec 3, 2021

Ah, thank you.

@geoand
Copy link
Contributor

geoand commented Dec 3, 2021

🙏🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kotlin kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants