question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve support for jOOQ 3.15 by making R2dbcAutoConfiguration back off in the absence of a connection provider

See original GitHub issue

Starting with jOOQ 3.15 (hopefully due by the end of Q2 2021), jOOQ will support R2DBC: https://github.com/jOOQ/jOOQ/issues/11700. For this, there is an io.r2dbc:r2dbc-spi dependency from org.jooq:jooq in all distributions. Just like with JDBC, the R2DBC drivers, connection pools, etc. will be provided and configured by users.

This now means that R2dbcAutoConfiguration will be activated and lead to false positive exceptions in 95% of all cases, because most people will still want to use the DataSourceAutoConfiguration.

A special case is when someone already excludes the DataSourceAutoConfiguration because they want to configure their own DataSource, or use DriverManager:

@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })

In that case, they will have to also exclude R2dbcAutoConfiguration when they upgrade to jOOQ 3.15.0:

@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class, R2dbcAutoConfiguration.class })

Not being a Spring Boot guru myself, I still wonder how we can prepare jOOQ + Spring Boot optimally to prevent any frustration from users when things break after the jOOQ 3.15 upgrade, keeping in mind:

  • Most people probably use jOOQ with a DataSourceAutoConfiguration and don’t care about R2DBC
  • Some people will want to use jOOQ with R2DBC exclusively, and not use a JDBC DataSource
  • Some people will want to use jOOQ with both JDBC and R2DBC
  • Some people opt out of both of these auto configurations

Ideas?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:10
  • Comments:29 (26 by maintainers)

github_iconTop GitHub Comments

3reactions
lukasedercommented, Nov 22, 2021

For the record, I can confirm this issue disappears after upgrading to Spring Boot 2.6, great job everyone 💪

2reactions
wilkinsonacommented, Oct 19, 2021

I’ve opened https://github.com/spring-projects/spring-boot/issues/28378 to see if we can improve the error message when there’s no DSLContext bean. This’ll still apply even with the changes proposed in this issue, it’ll just be less likely to occur.

Read more comments on GitHub >

github_iconTop Results From Across the Web

spring - How to fix "Consider defining a bean of type 'org.jooq ...
In my Vaadin and Spring Boot application, I have updated from jOOQ 3.14.12 to 3.15.0. After ...
Read more >
The jOOQ Release Note History
With jOOQ 3.15, this support has now been removed, and Java 8 is the new baseline for commercial editions, Java 11 for the...
Read more >
The jOOQ Release Note History
This is a 3.15 patch release with minor improvements and bug fixes ... RETURNING emulations shouldn't acquire multiple connections from ConnectionProvider ...
Read more >
Reactive SQL with jOOQ 3.15 and R2DBC
One of the biggest new features of the recently released jOOQ 3.15 is its new support for reactive querying via R2DBC.
Read more >
RELEASENOTES.txt - jOOQ
(dot) in MS Access identifiers #13525 - Improve Documentation for DSLContext. ... With jOOQ 3.15, this support has now been removed, and Java...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found