-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Resource bundle not accessible in dev mode #8103
Comments
Hi, Just for our information, is this something that was working in a previous version of Quarkus? |
It would be nice if you provided a reproducer for this, because I was not able to reproduce the problem in a test project. |
The reproducer is here https://github.com/AmsterdamFilho/quarkus-poc But actually, the problem only happens when the instruction ResouceBundle.getBundle("i18n/i18n") is on a library, which unfortunately is my case. |
To use the reproducer, just execute the project in dev mode and open swagger-ui. The only endpoint will throw the MissingResource exception. If you package the application, though, it will not. |
I had many issues similar to this one before version 1.3.0, when things would work after package, but not in dev mode. They were all solved by the new ClassLoader. |
I would try with |
It worked. Should the ticket be closed? |
I think it should. In general, all resources should be loaded like @gsmet mentions, since it's the only guaranteed way to have it work in dev mode. |
Describe the bug
When executing quarkus in dev mode, if a resource bundle is added to the resources folder, e.g., to src/main/resources/i18n/i18n.properties, calling the method ResourceBundle.getBundle("i18n/i18n") will throw MissingResouce exception. This is happening on quarkus 1.3.0.
Expected behavior
ResourceBundle successfully loads the bundle.
Actual behavior
ResourceBundle throws MissingResource exception.
To Reproduce
Steps to reproduce the behavior:
The text was updated successfully, but these errors were encountered: