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

java.lang.UnsupportedOperationException: ResourceBundle.Control not supported in named modules #1128

Open
afloarea opened this issue May 31, 2024 · 0 comments

Comments

@afloarea
Copy link

Hello,

Thank you for maintaining this project. I apologize if this has already been raised. I did not find an issue related to this.

Basically I am trying to use the Java ResourceBundle i18n helper, following the instructions in the documentation and I noticed that an exception is raised when using this helper.

java.base/java.util.ResourceBundle.checkNamedModule(ResourceBundle.java:1545)
java.base/java.util.ResourceBundle.getBundle(ResourceBundle.java:1506)
[email protected]/com.github.jknack.handlebars.helper.DefI18nSource.<init>(I18nHelper.java:378)
[email protected]/com.github.jknack.handlebars.helper.I18nHelper$1.apply(I18nHelper.java:146)
[email protected]/com.github.jknack.handlebars.helper.I18nHelper$1.apply(I18nHelper.java:91)
[email protected]/com.github.jknack.handlebars.internal.Variable.value(Variable.java:153)
[email protected]/com.github.jknack.handlebars.internal.Variable.merge(Variable.java:122)
[email protected]/com.github.jknack.handlebars.internal.BaseTemplate.apply(BaseTemplate.java:98)
[email protected]/com.github.jknack.handlebars.internal.TemplateList.merge(TemplateList.java:81)
[email protected]/com.github.jknack.handlebars.internal.BaseTemplate.apply(BaseTemplate.java:98)
[email protected]/com.github.jknack.handlebars.internal.BaseTemplate.apply(BaseTemplate.java:87)
[email protected]/com.github.jknack.handlebars.Options.apply(Options.java:511)
[email protected]/com.github.jknack.handlebars.Options.apply(Options.java:491)
[email protected]/com.github.jknack.handlebars.helper.BlockHelper.apply(BlockHelper.java:69)
[email protected]/com.github.jknack.handlebars.internal.Block.merge(Block.java:199)
[email protected]/com.github.jknack.handlebars.internal.BaseTemplate.apply(BaseTemplate.java:98)
[email protected]/com.github.jknack.handlebars.internal.TemplateList.merge(TemplateList.java:81)
[email protected]/com.github.jknack.handlebars.internal.BaseTemplate.apply(BaseTemplate.java:98)
[email protected]/com.github.jknack.handlebars.internal.ForwardingTemplate.apply(ForwardingTemplate.java:72)
[email protected]/com.github.jknack.handlebars.internal.Partial.merge(Partial.java:211)
[email protected]/com.github.jknack.handlebars.internal.BaseTemplate.apply(BaseTemplate.java:98)
[email protected]/com.github.jknack.handlebars.internal.TemplateList.merge(TemplateList.java:81)
[email protected]/com.github.jknack.handlebars.internal.BaseTemplate.apply(BaseTemplate.java:98)
[email protected]/com.github.jknack.handlebars.internal.BaseTemplate.apply(BaseTemplate.java:87)
[email protected]/com.github.jknack.handlebars.internal.ForwardingTemplate.apply(ForwardingTemplate.java:86)

This only happens if there is a module-info file in the application and it requires the handlebars module. (I tested with 4.3.0 and 4.4.0)

JDK 21

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

No branches or pull requests

1 participant