由于缺少依赖项,无法加载Bean类:LazyDataModel

时间:2017-07-25 17:02:26

标签: jsf primefaces jboss

我使用primefaces框架来实现一个懒惰的数据表。 我导入了包:

import org.primefaces.model.LazyDataModel;

在我的EventViewer ManagedBean类中。 我将primefaces-6.1.jar放在WEB-INF / lib文件夹中。

在JBoss AS上部署项目后,在加载页面时,我得到以下异常:

        2017-07-25 18:12:13,817 ERROR [javax.enterprise.resource.webcontainer.jsf.managedbean] JSF will be unable to create managed bean eventViewer when it is requested.  The following problems where found:
         - Bean or property class com.imnet.oam.fe.event.EventViewer for managed bean eventViewer cannot be loaded due to a missing dependency: org/primefaces/model/LazyDataModel.
    2017-07-25 18:12:13,817 ERROR [javax.enterprise.resource.webcontainer.jsf.application] Error Rendering View[/event.xhtml]
    com.sun.faces.mgbean.ManagedBeanCreationException: Unable to create managed bean eventViewer.  The following problems were found:
         - Bean or property class com.imnet.oam.fe.event.EventViewer for managed bean eventViewer cannot be loaded due to a missing dependency: org/primefaces/model/LazyDataModel.
        at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:265)
        at com.sun.faces.el.ManagedBeanELResolver.resolveBean(ManagedBeanELResolver.java:244)
        at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:116)
        at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
        at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
        at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
        at org.jboss.el.parser.AstValue.getValue(AstValue.java:63)
        at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
        at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
        at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
        at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182)
        at javax.faces.component.UIData.getValue(UIData.java:732)
        at org.primefaces.component.api.UIData.getDataModel(UIData.java:764)
        at org.primefaces.component.datatable.DataTable.loadLazyData(DataTable.java:1097) 
        [...]

这是主要错误:

 - Bean or property class com.imnet.oam.fe.event.EventViewer for managed bean eventViewer cannot be loaded due to a missing dependency: org/primefaces/model/LazyDataModel.

我该如何解决?

0 个答案:

没有答案