javax.faces.FacesException:表达式错误:命名对象:org.omnifaces.component.validator.ValidateMultiple not found

时间:2016-05-30 15:21:20

标签: jsf omnifaces seam3

我们目前正在将 GlassFish 3.2.1.x 网络应用程序移植到 JBoss EAP 6.4.6 ,但我们得到一个相当奇怪的例外,其页面是包含(缩写):

<h:panelGroup id="absence-panel"
              layout="block"
              styleClass="bx-accordion-correction">

    <h:panelGroup layout="block"
                  styleClass="left-button-panel">
        <p:commandButton id="add-absence-btn"
                         icon="ui-icon ui-icon-document"
                         value="#{msg['common.action.add.label']}"
                         actionListener="#{employeeAbsenceManager.add}"
                         immediate="true"
                         process="@this"
                         update="absence-panel
                                 :content-form:employee-navigation
                                 :content-form:msgs
                                 :content-form:growl"
                         oncomplete="scrollContentToSubPanel(this);"
                         disabled="#{employeeManager.readOnly or employeeAbsenceManager.mode eq 'ADD' or employeeAbsenceManager.mode eq 'EDIT'}"
                         styleClass="bx-first-button">
            <p:resetInput target=":content-form:accor-panel:absence-subpanel" />
        </p:commandButton>
    </h:panelGroup>

    <p:blockUI block="absence-dir-list"
               blocked="#{employeeAbsenceManager.mode eq 'ADD' or employeeAbsenceManager.mode eq 'EDIT'}" />

    <p:dataTable id="absence-dir-list"
                 value="#{employeeAbsenceManager.dataModel}"
                 var="abs"
                 selection="#{employeeAbsenceManager.selectedEntity}"
                 selectionMode="single"
                 resizableColumns="true"
                 rowKey="#{abs.timestampId}"
                 rowStyleClass="#{abs eq employeeAbsenceManager.selectedEntity ? 'ui-state-highlight' : null}"
                 paginator="true"
                 paginatorPosition="bottom"
                 rows="10"
                 rowsPerPageTemplate="10,20"
                 paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                 emptyMessage="#{employeeAbsenceManager.activeOnly ? msg['entity.absence.list.emptyMessageActive'] : msg['entity.absence.list.emptyMessage']}"
                 styleClass="bx-datatable-header-hidden mt-10px datatable-content-scrolling max-width-1300">
        ...
    </p:dataTable>

    <ui:include src="absenceSubPanel.xhtml" />

    <h:panelGroup id="absences-validator">
        <o:validateMultiple components="absence-type absence-begin-date #{employeeAbsenceManager.uniqueConstraintWithRemarks ? 'absence-remarks' : ''}"
                            validator="#{employeeAbsenceManager.validateUniqueAbsences}"
                            message="#{employeeAbsenceManager.uniqueConstraintWithRemarks ?
                                       msg['entity.absence.notUniqueMessageWithRemarks'] :
                                       msg['entity.absence.notUniqueMessageWithoutRemarks']}" />
    </h:panelGroup>
</h:panelGroup>

<ui:include src="absenceSubPanel.xhtml" />包含<o:validateMultiple>的组件。这是缺席的子小组(例如假期,疾病,员工的一些教育措施)。

备注是有条件的,具体取决于某些客户设置是否有缺席强制性备注。

我们得到以下例外:

16:07:15,727 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/cmc-jboss].[Faces Servlet]] (http-/127.0.0.1:8443-6) JBWEB000236: Servlet.service() for servlet Faces Servlet threw exception: javax.enterprise.event.ObserverException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.7.0_72]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.7.0_72]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.7.0_72]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526) [rt.jar:1.7.0_72]
    at java.lang.Class.newInstance(Class.java:379) [rt.jar:1.7.0_72]
    at org.jboss.weld.util.reflection.SecureReflections$16.work(SecureReflections.java:344) [weld-core-1.1.31.Final-redhat-1.jar:1.1.31.Final-redhat-1]
    at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52) [weld-core-1.1.31.Final-redhat-1.jar:1.1.31.Final-redhat-1]
    at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInstantiation(SecureReflectionAccess.java:173) [weld-core-1.1.31.Final-redhat-1.jar:1.1.31.Final-redhat-1]
    at org.jboss.weld.util.reflection.SecureReflections.newInstance(SecureReflections.java:341) [weld-core-1.1.31.Final-redhat-1.jar:1.1.31.Final-redhat-1]
    at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:33) [weld-core-1.1.31.Final-redhat-1.jar:1.1.31.Final-redhat-1]
    at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:73) [weld-core-1.1.31.Final-redhat-1.jar:1.1.31.Final-redhat-1]
    at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:171) [weld-core-1.1.31.Final-redhat-1.jar:1.1.31.Final-redhat-1]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_72]
Caused by: javax.servlet.ServletException: Expression Error: Named Object: org.omnifaces.component.validator.ValidateMultiple not found.
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:606) [jsf-api-2.1.6.jar:2.1.6-SNAPSHOT]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1]
    at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79) [primefaces-3.5.jar:3.5.28]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1]
    at org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65) [solder-impl-3.2.0-20130114.052037-75.jar:3.2.0-SNAPSHOT]
    ... 31 more
Caused by: javax.faces.FacesException: Expression Error: Named Object: org.omnifaces.component.validator.ValidateMultiple not found.
    at com.sun.faces.application.ApplicationImpl.createComponentApplyAnnotations(ApplicationImpl.java:1910) [jsf-impl-2.1.6.jar:2.1.6-SNAPSHOT]
    at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:1164) [jsf-impl-2.1.6.jar:2.1.6-SNAPSHOT]
    at org.jboss.as.weld.webtier.jsf.ForwardingApplication.createComponent(ForwardingApplication.java:110) [jboss-as-weld-7.5.6.Final-redhat-2.jar:7.5.6.Final-redhat-2]
    at javax.faces.application.ApplicationWrapper.createComponent(ApplicationWrapper.java:594) [jsf-api-2.1.6.jar:2.1.6-SNAPSHOT]
    at javax.faces.application.ApplicationWrapper.createComponent(ApplicationWrapper.java:594) [jsf-api-2.1.6.jar:2.1.6-SNAPSHOT]
    at org.jboss.seam.faces.environment.SeamApplicationWrapper$Proxy$_$$_WeldClientProxy.createComponent(SeamApplicationWrapper$Proxy$_$$_WeldClientProxy.java) [seam-faces-3.2.0-20130126.053739-28.jar:3.2.0-SNAPSHOT]
    at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.createComponent(ComponentTagHandlerDelegateImpl.java:510) [jsf-impl-2.1.6.jar:2.1.6-SNAPSHOT]
    at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:157) [jsf-impl-2.1.6.jar:2.1.6-SNAPSHOT]
    at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120) [jsf-api-2.1.6.jar:2.1.6-SNAPSHOT]
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98) [jsf-api-2.1.6.jar:2.1.6-SNAPSHOT]
    at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137) [jsf-api-2.1.6.jar:2.1.6-SNAPSHOT]
    at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184) [jsf-impl-2.1.6.jar:2.1.6-SNAPSHOT]

OmniFaces版本是1.7。我们还使用PrimeFaces 3.5.28(3.5树中的最后一个)和Seam Faces 3.2.0。

任何可能导致此问题以及如何解决问题的想法?

由于

1 个答案:

答案 0 :(得分:1)

我们刚刚能够通过将以下内容放入faces-config.xml文件来摆脱异常:

<component>
    <component-type>org.omnifaces.component.validator.ValidateMultiple</component-type>
    <component-class>org.omnifaces.component.validator.ValidateMultiple</component-class>
</component>

对于为什么这是补救措施,是否有任何解释/假设?