-
Notifications
You must be signed in to change notification settings - Fork 167
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
I18NProvider failed to load resource bundle when called from non-UI thread #18977
Comments
caalador
added a commit
that referenced
this issue
Apr 9, 2024
Fixes getting translation bundle when executing from thread. Fixes #18977
caalador
added a commit
to vaadin/quarkus
that referenced
this issue
Apr 11, 2024
Use a classLoader that is compatible with quarkus for default i18N translation. part of vaadin/flow#18977
caalador
added a commit
to vaadin/quarkus
that referenced
this issue
Apr 11, 2024
Use a classLoader that is compatible with quarkus for default i18N translation. part of vaadin/flow#18977
caalador
added a commit
to vaadin/quarkus
that referenced
this issue
Apr 11, 2024
Use a classLoader that is compatible with quarkus for default i18N translation. part of vaadin/flow#18977
mcollovati
pushed a commit
that referenced
this issue
Apr 11, 2024
Fixes getting translation bundle when executing from thread. Fixes #18977
caalador
added a commit
that referenced
this issue
Apr 11, 2024
Fixes getting translation bundle when executing from thread. Fixes #18977
mcollovati
pushed a commit
that referenced
this issue
Apr 11, 2024
caalador
added a commit
to vaadin/quarkus
that referenced
this issue
Apr 11, 2024
Use a classLoader that is compatible with quarkus for default i18N translation. part of vaadin/flow#18977
caalador
added a commit
to vaadin/quarkus
that referenced
this issue
Apr 11, 2024
Use a classLoader that is compatible with quarkus for default i18N translation. part of vaadin/flow#18977
caalador
added a commit
to vaadin/quarkus
that referenced
this issue
Apr 11, 2024
Use a classLoader that is compatible with quarkus for default i18N translation. part of vaadin/flow#18977
caalador
added a commit
to vaadin/quarkus
that referenced
this issue
Apr 11, 2024
Use a classLoader that is compatible with quarkus for default i18N translation. part of vaadin/flow#18977
caalador
added a commit
to vaadin/quarkus
that referenced
this issue
Apr 11, 2024
Use a classLoader that is compatible with quarkus for default i18N translation. part of vaadin/flow#18977
This ticket/PR has been released with Vaadin 24.3.10. |
mcollovati
pushed a commit
to vaadin/quarkus
that referenced
this issue
Sep 3, 2024
Use a classLoader that is compatible with quarkus for default i18N translation. part of vaadin/flow#18977
mshabarov
pushed a commit
to vaadin/quarkus
that referenced
this issue
Sep 3, 2024
* fix: use quarkus compatible classloader Use a classLoader that is compatible with quarkus for default i18N translation. part of vaadin/flow#18977 * fix theme pom --------- Co-authored-by: Mikael Grankvist <mgrankvi@vaadin.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description of the bug
When running application in production mode (fat spring boot jar build by spring gradle plugin)
I18NProvider
unable to load resource bundle and gracefully failed with the following warning:All translations resources are included in the jar as expected. Moreover part of the components on a static part of the page are translated OK. It seems to be happened only during async call, when updating component (for example, Grid) from non-UI thread within
ui.access()
block. After all data is loaded and async call is finished, switching locale on grid from the UI thread applies translations without a problem.Note, that it occurs only if running in production mode. Running it in IDE (Eclipse) using development mode is OK.
Workaround
It appears that
DefaultI18NProvider
trying to load resource bundle usingjava.util.ResourceBundle.getBundle(String, Locale, ClassLoader)
:Using custom
I18NProvider
that loads resource bundle viajava.util.ResourceBundle.getBundle(String, Locale)
do the trickExpected behavior
DefaultI18NProvider
should not fail trying to load resource bundle when called from non-UI threadMinimal reproducible example
i18nbug.zip
i18nbug.zip
i18nbug
directorygradlew vaadinclear
gradlew vaadinbuildfrontend
gradlew assemble
java -jar lib/build/libs/i18nbug.jar
http://localhost:8080
First two spans will be displayed having translated values
Span1
andSpan2
. At the same time an async task will be executed emulating some long task (1000 ms) and after finish it will try to update value of second span withSpan3
value fromui.access()
block but will failVersions
The text was updated successfully, but these errors were encountered: