-
Notifications
You must be signed in to change notification settings - Fork 176
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
Worker Thread ClassLoader cannot load property files on Java 21 #20944
Comments
We ended up using this work-around in the worker thread, to still be able to build UI asynchronously:
|
I cannot reproduce using the provided code with Vaadin 24.4.22,Spring Boot: 3.3.8 and Java 21.0.6 (Temurin) and running the application for the production JAR. The translations are correctly loaded and show on the page. Can you provide an example project that reproduces the issue? |
BTW, 24.4 is EOL. I suggest upgrading to the latest supported version. |
Works for me also with Vaadin 24.6.4 and Spring Boot 3.4.1 |
@MichaelPluessErni what JVM implementation/supplier do you use? Could you also elaborate more what is the |
@mcollovati @mshabarov Thank you both for taking a look at this issue. We use Java 21.0.5 Temurin. For I cannot say whether I'll be able to create a full example project to demonstrate the bug. But if I succeed, I'll be sure to post it here. |
Vaadin ships Do you mind to try using Vaadin default implementation for |
The |
Description of the bug
With the upgrade from Java 17 to Java 21 we stumbled upon a bug when retrieving translations in worker threads.
We need this because we call slower services asynchronously and update the UI after receiving the responses.
Specifically, when calling
getTranslation
on the worker thread, the TranslationService is not able to locate/load the property file with the translations, thus returning the key of the property instead of the translated text.Important to note: This does not occur when running the application in DEV mode! It only occurs in Production mode.
We use Vaadin 24.4.22 together with Spring Boot 3.3.8. (Error also occurs with Vaadin 24.6.4)
Expected behavior
It should be possible to call
getTranslation
asynchronously. (like it is possible for Java 17)Minimal reproducible example
Template to reproduce:
Versions
The text was updated successfully, but these errors were encountered: