-
Notifications
You must be signed in to change notification settings - Fork 92
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
Wrong support for URI #1425
Comments
Thanks, it seems like a bug and we will have to revisit that method. As a workaround, you can register your own We describe how to do it for the |
@blafond, would you have time to look into this? |
Thank for the link sharing I look that asap. |
Looking at it |
Thanks |
@florent-lb Could you add a little stack trace to this issue containing the path to |
I've written a simple test that calls In all of our current tests that require a connection a In our reactive world the URI's scheme is expected to be |
We've decided some time ago to accept JDBC as configuration even if underneath we are not using JDBC so that people could use the same URL they would use for ORM. Also, I think we expected the Vert.x SQL client to reuse the same syntax (this is not actually the case). In the end we've also made the jdbc part optional considering that jdbc is not actually used (it would be nice in the future to allow the use of the vert.x syntax, but that's for another issue). It think the best approach for this issue is to add a test in JdbcUrlParserTest that uses Then we have to figure out if there's a different way to parse the url string that doesn't exclude values in DefaultSqlClientPoolConfiguration#connectOptions. I think we can get the whole string url using @blafond Does this help? |
I've added a quick test JdbcUrlParserTest and it fails:
This is the url for PostgreSQL: |
I still think this is a good idea. Hibernate users already know this syntax, and it lets them easily copy/paste config between the two things. |
It seems to work fine and I'm not against it. It would be less work for us and It would also be a nice fallback for cases like this. |
One thing that we are doing right now is trying to parse any possible jdbc url, it would probably be easier to identify the dialect first and then parse the url accordingly. |
Relaxed host value character constraints and added test to verify
Relaxed host value character constraints and added test to verify
Relaxed host value character constraints and added test to verify
Relaxed host value character constraints and added test to verify
Relaxed host value character constraints and added test to verify
Relaxed host value character constraints and added test to verify
Relaxed host value character constraints and added test to verify
Relaxed host value character constraints and added test to verify
Hi Hibernate !
I worked with Hibernate Reactive to introduce it in my client's spring boot environment. But the OPS team in my client use an api to generate URL DB. Theses url contains _ (underscore). Using _ will never be a problem with "standard" hibernate, I use these url today without any issue but you choose to use URI instead of URL and URI doesn't support underscore.
The problem is here : DefaultSqlClientPoolConfiguration
Example value (anything with _) : jdbc:postgresql://my_db:5432.com/my_schema
URI doesn't throw any error but the value Host & port stay null and authority is fill instead. but DefaultSqlClientPoolConfiguration (L 111) :
link
String host = scheme.equals("oracle") ? oracleHost(uri) : uri.getHost();
link
int port = scheme.equals("oracle") ? oraclePort(uri) : uri.getPort();
Try to read only getHost() and getPort()
This problem doesn't occurs with URL, but URL doesn't support all scheme like URI.
But URI must support _ (https://www.rfc-editor.org/rfc/rfc3986#section-2.3), I'll try to replace URI with %5F but still broken.
Replace by ipv4 adresse == no problem
Problem follow here in OpenJDK : https://bugs.openjdk.org/browse/JDK-8291591
But today is a regression comparing to Hibernate "standard". And Without dns name I can't go to production with Hibernate Reactive today :'(
For more in formation :
Hibernate version :
org.hibernate.reactive:hibernate-reactive-core:1.1.9.Final
The text was updated successfully, but these errors were encountered: