警告:此页面调用XML前缀为http://richfaces.org/rich,前缀为rich,但该命名空间不存在taglibrary

时间:2013-02-07 10:55:03

标签: jsf richfaces

我的Facelet中有以下代码:

<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:form>
        <h:panelGrid columns="1">
            <rich:paint2D id="painter" width="300" height="120"
                data="#{paintData}" format="png" paint="#{paintBean.paint}" >
            </rich:paint2D>
            <h:panelGroup> 
                <h:outputText value="Change text color " />
                <rich:colorPicker colorMode="hex" value="#{paintData.color}">
                    <a4j:support event="onchange" reRender="painter"/>
                </rich:colorPicker>
            </h:panelGroup>
        </h:panelGrid>
    </h:form>
</html>

我的/lib文件夹中有以下罐子:

  1. RichFaces的-API-3.3.3.Final.jar
  2. RichFaces的-UI-3.3.3.Final.jar
  3. RichFaces的-IMPL-3.3.3.Final.jar
  4. 在UI中,我收到以下消息:

      

    警告:此页面调用以前缀rich声明的XML名称空间http://richfaces.org/rich,但该名称空间不存在taglibrary。

    在控制台中我遇到以下异常:

    SEVERE: Error configuring application listener of class com.sun.faces.config.ConfigureListener
    java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener
    

    这是如何引起的?如何解决?

1 个答案:

答案 0 :(得分:2)

java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener

运行时类路径中缺少JSF实现本身。您似乎已明确配置了

<listener>
    <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
在未安装Mojarra的情况下,在web.xml

下载并安装Mojarra。旧版本由jsf-api.jarjsf-impl.jar文件组成,并且单个javax.faces.jar文件中存在较新版本(自2.0.9 / 2.1.6起)。请注意,RichFaces 3.x实现默认情况下不兼容JSF 2.x。您需要具有JSF 2.x兼容版本richfaces-impl-jsf2-3.3.3.Final.jar。另请参阅JBoss Wiki on the subject

相关问题