Jsf 使用Primefaces咆哮时出错,无法转换为自动更新

Jsf 使用Primefaces咆哮时出错,无法转换为自动更新,jsf,primefaces,Jsf,Primefaces,我已经多次使用Primefaces。太棒了。但这次我不知道为什么: 我无法添加咆哮组件,错误是:org.primefaces.component.growl.growl无法转换为org.primefaces.component.api.autoupdateable p:messages也是如此 这可能是由于我的facelet中的一些错误。但我将其与我之前编写的一个成功的facelet进行比较,我无法找出问题所在。facelet的问题是(删除p:咆哮,一切顺利): #{holder.name

我已经多次使用Primefaces。太棒了。但这次我不知道为什么:

我无法添加咆哮组件,错误是:org.primefaces.component.growl.growl无法转换为org.primefaces.component.api.autoupdateable

p:messages也是如此

这可能是由于我的facelet中的一些错误。但我将其与我之前编写的一个成功的facelet进行比较,我无法找出问题所在。facelet的问题是(删除p:咆哮,一切顺利):


#{holder.name}
类型
名称
领域
价值
所有属性
更新

这表明您在webapp的运行时类路径中同时拥有PrimeFaces2.x和3.x库。PrimeFaces 3.0中引入了
autoupdateable
,而
Growl
在2.x中已经存在,但直到PrimeFaces 3.0才实现
autoupdateable


清理您的类路径,并清除有问题的旧PrimeFaces 2.x库。

我尝试了PrimeFaces 3,短暂切换到2,然后再次返回到3。仅仅删除PrimeFaces2库是不够的,我需要删除项目目录。但这是可行的。谢谢
<body>

    <ui:composition template="./../../WEB-INF/master.xhtml">

        <ui:define name="top">
            <h:outputText value="#{bundle.ListAccountHolderTitle}"></h:outputText>
        </ui:define>

        <ui:define name="content">
            <h:form>
                <p:growl id="growl"/>
                <p:dataTable value="#{accountHolderBean.items}" var="holder">
                    <p:column headerText="Type">#{holder.name}</p:column>
                </p:dataTable>
                <h:panelGrid columns="2">
                    Type
                    <h:inputText id="type1" required="true" value="#{accountHolderBean.selected.type}"/>
                    Name
                    <h:inputText id="name1" value="#{accountHolderBean.selected.name}"/>
                    Field
                    <h:inputText id="field1" accesskey="f" value="#{accountHolderBean.field}"/>
                    Value
                    <h:inputText id="val" accesskey="v" value="#{accountHolderBean.val}"/>
                    All attributes
                    <h:outputText id="attrs" value="#{accountHolderBean.allAttributes}"/>
                </h:panelGrid>
                <p:commandLink update="attrs" actionListener="#{accountHolderBean.update}">Update</p:commandLink>
            </h:form>
        </ui:define>

    </ui:composition>

</body>
org.primefaces.component.growl.Growl cannot be cast to org.primefaces.component.api.AutoUpdatable