-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Connecting to PostgreSQL DB is failing with native-image #30701
Comments
My bet is that the default value needs to be escaped. What happens if you replace:
with
? |
@gastaldi we tried that option, but still doesn't work, same error appears |
Can you remove the |
Also if you could provide a sample reproducer project that would help a lot. I couldn't reproduce the issue following the steps above |
@gastaldi yes of course, here is a sample project: |
@gastaldi You were right, after removing jdbc-db2 and jdbc-h2 dependencies, we are getting following build issue, which is also present on the sample project:
|
dbkind needs to be |
Correct, now it works, thanks! Maybe the answer is to use different profiles for that, but it could be limiting in some cases. |
This improves the error message when the DB Kind is not found. ``` Unable to find a JDBC driver corresponding to the database kind 'postgres' for the default datasource (available: 'postgresql'). Check if it's a typo, otherwise 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. ``` Based on feedback from quarkusio#30701 (comment)
There is a discussion about this in: https://quarkusio.zulipchat.com/#narrow/stream/187030-users/topic/Support.20multiple.20RDBMS.20with.20the.20same.20build.20.2F.20image.3F |
@gastaldi is there still something that needs to be done here or can we close the issue? |
@geoand nope, let's close it |
👍🏼 |
Describe the bug
When app deployed into k8s cluster, the application is not able to connect to PostgreSQL DB due to error Driver does not support the provided URL: jdbc:postgresql://config-db-postgresql-db:5432/my_database
Expected behavior
Driver should support correct jdbc URLs
Actual behavior
Driver will return error:
The same app when running locally in dev mode can connect to postgresql database without issues.
How to Reproduce?
Steps to reproduce:
create a web app with jdbc connection
build application as native binary
deploy into container engine
try to configure jdbc connection to database system like postgresql
Output of java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.15.3.FINAL
Build tool (ie. output of mvnw --version or gradlew --version)
No response
Additional information
Dependencies:
Our configuration in YAML:
Environment variables in the container:
The text was updated successfully, but these errors were encountered: