-
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
Reactive DB connection causes problems #10982
Comments
@phillip-kruger could you have a look at that one? I'm not totally sure we can make it work tbh but a closer look from you could help. Thanks! |
Hi @gsmet - I am happy to look at this. I am on PTO at the moment, but might get a gap to look at this. |
So essentially you have a custom
? If so, I think this is one for @radcortez :) |
yes it is. Especially until i add quarkus.datasource.reactive=true
%dev.quarkus.datasource.reactive.url=vertx-reactive:mysql://0.0.0.0:6603/database-name
%prod.quarkus.datasource.reactive.url=vertx-reactive:mysql://${DATABASE_HOST}:${DATABASE_PORT}/database-name to my application.properties |
Does the problem still occur if you don't use |
i don't think, that it's a problem, because it also doesn't work in %dev and i use hard-coded values for my %dev |
I just want to cover all possible bases |
@MadinaS Was this working on any previous Quarkus version? If so, which one? |
i just started with reactive DB connections, so i didn't use it before Quarkus 1.6.0 |
UPDATE.
|
Ok, let me have a look. |
Hi @MadinaS, Unfortunately, I was not able to move that much with your reproducer. There are a few things that are missing:
Are you able to fix the above issues? Thank you! |
sorry, just weird commit Oo have already fixed |
Ok, let me check |
Hi @MadinaS I had a look and everything since to work fine. After a few changes to your code, I was able to retrieve the expansion variable from the database using the Config. Are you sure that you have |
yes, i'm sure, that i have this mp.jwt.verify.publickey.location=${share.path}/resources/publicKey.pem not working now, i commented that line and added it that to DB like full path: #in DB:
mp.jwt.verify.publickey.location = /kniffelSharedVolume/resources/publicKey.pem my app (with reactive DB inside) have no problem, if some property will be saved in DB... but only if it will be saved complete and not partial... |
@radcortez ach, i know.... i can also start app without errors... first, wen i use my login and |
I've pushed a PR to your repro project: You notice that I've implemented a test that retrieves that configuration. Assuming that you have a MySQL DB running on the |
sorry, i didn't answered several days. Soo i used u TestClass and It also works perfectly for me. However, when I start my application and try to login, it no longer works. Moment, I am preparing an example with my login class. |
i added another Tests for my REST point... tetst work fine, but i still have Error, wenn i try to login in my app
|
Hi @MadinaS Can you do a lookup on the |
i have tested it and my GH-app gives me correct value (dev and test)... but my work Projekt can't now respond to any REST requests, because of this jwt property error.... but I can not find any differences between my work-project and GH -project .. no idea, what can it be ... |
@radcortez |
Hum, maybe there is an issue with SmallRye JWT. Let me give it a try. |
Hum, seems to be fine as well. So, things do work on the GH project, but not in your real project? |
Exact... I think, I need to look deeper in my project, which dependencies i have with SmallRye or why it can‘t be used with reactive DB.. but I will have next week time for this. I will write here later, will also try to copy more important classes from my project to GH, maybe than u can see more and why it don’t work together...anyway, thank u for u time and help! :) |
Ok, I'm sorry I couldn't help you further. Please, let me know when you have more information and I'll be happy to continue. |
new week - new challenges! =) can u try send a request to a StatisticSocket? I think, it's not a problem of reactive DB connection, but of connection to WebSocket... it's not important (in my GH app) which ¸ |
@radcortez i think,
throw an error. |
Hi @MadinaS, I've added a PR to your repro project: This injects both the SmallRye JWT There must be some sort of condition in your real project that may be preventing the expansion of the variable. We need to find a way to reproduce this same behaviour in your demo project. Are you able to do it? Thanks! |
Hi @radcortez i added u to my private repository. In this repository, tests not working, but i can't find difference between real-project (private repo) and example-project (first repo) and understand why it don't see my |
Ok, let me try it. |
Hi guys! First, I want tell you all, thank you for such a great job, what do you do with Quarkus!
Describe the bug
I have 2 connections to the same DB in my applications.properties file. It's looks like this:
in same file i have some property for my public key:
mp.jwt.verify.publickey.location=${share.path}/resources/publicKey.pem
${share.path}
- i get from my DB, with my custom DatabaseSource.Expected behavior
it's work fine, till i add reactive DB connection to my application.properties
Actual behavior
if i add reactive DB connection, then I get an error message, that variable
${share.path}
is no longer recognized from Quarkus. It's like Quarkus don't know anymore, wich connection it should to use to get${share.path}
properties from DB.To Reproduce
here is some simple reproducer with code from my project.
It will be nice to know, why is this so :)
The text was updated successfully, but these errors were encountered: