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

Outdated connection URLs in README.adoc #188

Open
lukaseder opened this issue Mar 31, 2021 · 1 comment
Open

Outdated connection URLs in README.adoc #188

lukaseder opened this issue Mar 31, 2021 · 1 comment

Comments

@lukaseder
Copy link
Contributor

Bug Report

Versions

  • Driver: 0.8.4.RELEASE
  • SPI: 0.9.0.M1
  • Database: 1.4.200
  • Java: openjdk version "11.0.9.1" 2020-11-04
  • OS: Microsoft Windows [Version 10.0.19042.867]

Current Behavior

This code:

ConnectionFactories.get("r2dbc:h2:file///absolute/file/name");

Produces this exception

Exception in thread "main" java.lang.IllegalArgumentException: Invalid URL: r2dbc:h2:file///absolute/file/name
	at io.r2dbc.spi.ConnectionUrlParser.validate(ConnectionUrlParser.java:67)
	at io.r2dbc.spi.ConnectionUrlParser.parseQuery(ConnectionUrlParser.java:81)
	at io.r2dbc.spi.ConnectionFactoryOptions.parse(ConnectionFactoryOptions.java:124)
	at io.r2dbc.spi.ConnectionFactories.get(ConnectionFactories.java:130)
	at org.jooq.testscripts.R2DBC.main(R2DBC.java:23)

This is either a regression in the SPI (less likely), or a breaking change (more likely), after which the documentation of r2dbc-h2 should be updated:
https://github.com/r2dbc/r2dbc-h2/blob/main/README.adoc

@lukaseder lukaseder changed the title Outdated connection URLs Outdated connection URLs in README.adoc Mar 31, 2021
@lukaseder
Copy link
Contributor Author

lukaseder commented Mar 31, 2021

Related (let me know if you wish for me to open a new bug for this).

This works with the above version configuration, but I doubt it should work:

ConnectionFactory f = ConnectionFactories.get(
    ConnectionFactoryOptions
        .parse("r2dbc:h2:file://localhost/~/test")
        .mutate()
        .option(ConnectionFactoryOptions.USER, "sa")
        .option(ConnectionFactoryOptions.PASSWORD, "")
        .build()
);

I tried random things until I got some r2dbc connection URL to work with the 0.9.0.M1 SPI and the 0.8.4.RELEASE driver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant