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

Dialect is set as null in AbstractField.cast #16658

Open
psamim opened this issue May 7, 2024 · 1 comment
Open

Dialect is set as null in AbstractField.cast #16658

psamim opened this issue May 7, 2024 · 1 comment

Comments

@psamim
Copy link

psamim commented May 7, 2024

Expected behavior

Dialect to be passed and used when using cast.

Actual behavior

Dialect is set as null in AbstractField.cast (link to code). Then sometimes it causes the wrong dialect to be used leading to error "Type class java.lang.Long is not supported in dialect null".

Steps to reproduce the problem

N/A

jOOQ Version

3.9.18

Database product and version

Postgresql 15.2

Java Version

17

JDBC / R2DBC driver name and version (include name if unofficial driver)

org.postgresql:postgresql:42.7.3

@lukaseder
Copy link
Member

Thanks for your report.

Can you provide a minimal reproducer? We offer a template for reproducers here, though a simpler reproducer may suffice: https://github.com/jOOQ/jOOQ-mcve

The error message hints at a race condition, where jOOQ internals aren't initialised yet when you call the cast() method. This doesn't have anything to do with the dialect being null there, IMO.

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

No branches or pull requests

2 participants