升级到 JSF 2.0 时出现问题
我正在尝试将我的应用程序从 JSF 1.1 升级到 JSF 2.0。我刚刚替换了最新的 JSR 文件并得到了以下异常。可能是配置上有些问题。
严重:发送上下文异常 初始化事件到侦听器实例 班级的 com.sun.faces.config.ConfigureListener java.util.MissingResourceException: 找不到基本名称标签的捆绑包, 区域设置 en_US
发表您的答案。
I am trying to upgrade my application from JSF 1.1 to JSF 2.0. I just replaced the latest JSR files and got the following exception. May be some problem in the configuration.
SEVERE: Exception sending context
initialized event to listener instance
of class
com.sun.faces.config.ConfigureListener
java.util.MissingResourceException:
Can't find bundle for base name label,
locale en_US
Post your answers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
例外情况基本上表明您有一个
,其label
在旧的 < code>faces-config.xml,但是类路径根目录中缺少诸如label.properties
、label_en.properties
等具体文件。我不确定这与从 JSF 1.1 升级到 JSF 2.0 有什么关系。也许您删除了太多内容,或者
faces-config
仍然被声明为 JSF 1.1(JSF 2.0 的行为未指定,而且我也无法根据自己的经验来判断什么< /em> 就会发生,我只玩过 JSF 1.2 --> JSF 2.0)。正确的 JSF 2.0faces-config.xml
声明如下所示:The exception is basically telling that you have a
<resource-bundle>
with the<base-name>
label
definied in your oldfaces-config.xml
, but yet the concrete files likelabel.properties
,label_en.properties
, etc are missing in the root of the classpath.I'm not sure how this is related to upgrade from JSF 1.1 to JSF 2.0. Maybe you removed too much or the
faces-config
is still declared as JSF 1.1 (for which the behaviour of JSF 2.0 is unspecified and for which I also can't tell from own experience what would then happen, I've only played around JSF 1.2 --> JSF 2.0). A proper JSF 2.0faces-config.xml
declaration starts as follows: