开发者

Problem while upgrading to JSF 2.0

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.


The exception is basically telling that you have a <resource-bundle> with the <base-name> label definied in your old faces-config.xml, but yet the concrete files like label.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.0 faces-config.xml declaration starts as follows:

<?xml version="1.0" encoding="UTF-8"?>
<faces-config
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
    version="2.0">

    <!-- Config here -->

</faces-config>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜