Skip to content

Misleading failure analysis when jOOQ's DSLContext is unavailable due to R2DBC taking precedence over JDBC #28378

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

Closed
wilkinsona opened this issue Oct 19, 2021 · 0 comments
Labels
type: bug A general bug
Milestone

Comments

@wilkinsona
Copy link
Member

We'll improve this in 2.6 by requiring both the R2DBC SPI and a ConnectionProvider on the classpath before R2DBC is auto-configured. This will prevent jOOQ 3.15's dependency on the R2DBC SPI from inadvertently disabling JDBC auto-configuration and, therefore, our auto-configuration of jOOQ. In the meantime, it would be good if we could improve the current diagnostics which are a bit misleading.

Typically, the failure will look like this:

***************************
APPLICATION FAILED TO START
***************************

Description:

Parameter 0 of method runner in com.example.demo.Application required a bean of type 'org.jooq.DSLContext' that could not be found.


Action:

Consider defining a bean of type 'org.jooq.DSLContext' in your configuration.

In most cases, defining a DSLContext bean won't be the simplest solution. Instead, it would be better to detect that R2dbcAutoConfiguration is active, explain that our jOOQ auto-configuration only supports JDBC and suggest excluding R2dbcAutoConfiguration for those trying to use jOOQ and JDBC or configuring jOOQ manually for those trying to use jOOQ and R2DBC.

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

No branches or pull requests

1 participant