MissingResourceException; ResourceBundle w/o path in form editor
Answered
There are some old (created in older IDEA) and new (2017.3) forms in our project that reference strings in Bundle.properties . For older forms I can see a bundle being referenced with a path to the actual file:
resource-bundle="actual/path/to/Bundle"
while for newer forms only file name is saved:
resource-bundle="Bundle"
Both work as expected when the app is built or run from IDE, but when it is built with Ant the new one results in resource file not being found.
According to getBundle specification, baseName must be a qualified class name, so neither of the two variants appear to be correct. Is that an IDE bug or am I doing something wrong?
Please sign in to leave a comment.
Hi, could you please clarify the problem, and provide steps to reproduce? Were thous forms generated by IDEA?
Yes, those are 100% IDEA forms, and I didn't have this problem in earlier versions of it; but I have updated at some point and now any new string references I add won't work outside of IDE.
There aren't any steps really, I am just editing component properties, same way I always did.
Something definitely has changed in how form editor handles resource bundles; notice Bundle file name without a path. That's how it actually saved in the .form file and how it is passed to getBundle() at runtime, no surprise it doesn't find my resources. But in IDE it works so this might still be a mistake on my part, like if I have something misconfigured in the project for example?
Reported at https://youtrack.jetbrains.com/issue/IDEA-189115.