将Primefaces jar部署为OSGi包 - 找不到javax.faces类

时间:2016-09-11 18:46:49

标签: java jsf primefaces glassfish osgi

我试图将primefaces jar部署为OSGi包,以便我可以在我的OSGi WAB中使用它。

然而,似乎在primefaces jar中的类不能识别glassfish附带的任何javax.faces类。

请注意,当我部署WAB(没有primefaces组件)时,javax.faces中的类加载得很好。

有什么建议吗?

关于primefaces jar的MANIFEST.MF如下:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: osgi.primefaces
Bundle-SymbolicName: osgi.primefaces
Bundle-Version: 5.3
Bundle-Vendor: Primefaces
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ClassPath: .
Export-Package: org.primefaces.application,
 org.primefaces.application.exceptionhandler,
 org.primefaces.application.resource,
 org.primefaces.application.resource.barcode,
 org.primefaces.behavior.ajax,
 org.primefaces.behavior.base,
 org.primefaces.behavior.confirm,
 org.primefaces.behavior.printer,
 org.primefaces.behavior.validate,
 org.primefaces.cache,
 org.primefaces.component.accordionpanel,
 org.primefaces.component.ajaxexceptionhandler,
 org.primefaces.component.ajaxstatus,
 org.primefaces.component.api,
 org.primefaces.component.autocomplete,
 org.primefaces.component.barcode,
 org.primefaces.component.blockui,
 org.primefaces.component.breadcrumb,
 org.primefaces.component.button,
 org.primefaces.component.cache,
 org.primefaces.component.calendar,
 org.primefaces.component.calendar.converter,
 org.primefaces.component.captcha,
 org.primefaces.component.carousel,
 org.primefaces.component.celleditor,
 org.primefaces.component.chart,
 org.primefaces.component.chart.renderer,
 org.primefaces.component.checkbox,
 org.primefaces.component.clock,
 org.primefaces.component.collector,
 org.primefaces.component.colorpicker,
 org.primefaces.component.column,
 org.primefaces.component.column.renderer,
 org.primefaces.component.columngroup,
 org.primefaces.component.columns,
 org.primefaces.component.columntoggler,
 org.primefaces.component.commandbutton,
 org.primefaces.component.commandlink,
 org.primefaces.component.confirmdialog,
 org.primefaces.component.contentflow,
 org.primefaces.component.contextmenu,
 org.primefaces.component.dashboard,
 org.primefaces.component.datagrid,
 org.primefaces.component.datalist,
 org.primefaces.component.datascroller,
 org.primefaces.component.datatable,
 org.primefaces.component.datatable.feature,
 org.primefaces.component.defaultcommand,
 org.primefaces.component.diagram,
 org.primefaces.component.dialog,
 org.primefaces.component.dnd,
 org.primefaces.component.dock,
 org.primefaces.component.editor,
 org.primefaces.component.effect,
 org.primefaces.component.export,
 org.primefaces.component.feedreader,
 org.primefaces.component.fieldset,
 org.primefaces.component.filedownload,
 org.primefaces.component.fileupload,
 org.primefaces.component.focus,
 org.primefaces.component.fragment,
 org.primefaces.component.galleria,
 org.primefaces.component.gmap,
 org.primefaces.component.graphicimage,
 org.primefaces.component.growl,
 org.primefaces.component.hotkey,
 org.primefaces.component.idlemonitor,
 org.primefaces.component.imagecompare,
 org.primefaces.component.imagecropper,
 org.primefaces.component.imageswitch,
 org.primefaces.component.inplace,
 org.primefaces.component.inputmask,
 org.primefaces.component.inputswitch,
 org.primefaces.component.inputtext,
 org.primefaces.component.inputtextarea,
 org.primefaces.component.keyboard,
 org.primefaces.component.layout,
 org.primefaces.component.lightbox,
 org.primefaces.component.link,
 org.primefaces.component.log,
 org.primefaces.component.media,
 org.primefaces.component.media.player,
 org.primefaces.component.megamenu,
 org.primefaces.component.menu,
 org.primefaces.component.menubar,
 org.primefaces.component.menubutton,
 org.primefaces.component.menuitem,
 org.primefaces.component.message,
 org.primefaces.component.messages,
 org.primefaces.component.mindmap,
 org.primefaces.component.multiselectlistbox,
 org.primefaces.component.notificationbar,
 org.primefaces.component.orderlist,
 org.primefaces.component.outputlabel,
 org.primefaces.component.outputpanel,
 org.primefaces.component.overlaypanel,
 org.primefaces.component.paginator,
 org.primefaces.component.panel,
 org.primefaces.component.panelgrid,
 org.primefaces.component.panelmenu,
 org.primefaces.component.password,
 org.primefaces.component.photocam,
 org.primefaces.component.picklist,
 org.primefaces.component.poll,
 org.primefaces.component.progressbar,
 org.primefaces.component.radiobutton,
 org.primefaces.component.rating,
 org.primefaces.component.remotecommand,
 org.primefaces.component.resetinput,
 org.primefaces.component.resizable,
 org.primefaces.component.resources,
 org.primefaces.component.ribbon,
 org.primefaces.component.ring,
 org.primefaces.component.row,
 org.primefaces.component.row.renderer,
 org.primefaces.component.roweditor,
 org.primefaces.component.rowexpansion,
 org.primefaces.component.rowtoggler,
 org.primefaces.component.schedule,
 org.primefaces.component.scrollpanel,
 org.primefaces.component.selectbooleanbutton,
 org.primefaces.component.selectbooleancheckbox,
 org.primefaces.component.selectcheckboxmenu,
 org.primefaces.component.selectmanybutton,
 org.primefaces.component.selectmanycheckbox,
 org.primefaces.component.selectmanymenu,
 org.primefaces.component.selectonebutton,
 org.primefaces.component.selectonelistbox,
 org.primefaces.component.selectonemenu,
 org.primefaces.component.selectoneradio,
 org.primefaces.component.separator,
 org.primefaces.component.signature,
 org.primefaces.component.slidemenu,
 org.primefaces.component.slider,
 org.primefaces.component.socket,
 org.primefaces.component.spacer,
 org.primefaces.component.spinner,
 org.primefaces.component.splitbutton,
 org.primefaces.component.spotlight,
 org.primefaces.component.stack,
 org.primefaces.component.steps,
 org.primefaces.component.sticky,
 org.primefaces.component.submenu,
 org.primefaces.component.subtable,
 org.primefaces.component.summaryrow,
 org.primefaces.component.tabmenu,
 org.primefaces.component.tabview,
 org.primefaces.component.tagcloud,
 org.primefaces.component.terminal,
 org.primefaces.component.themeswitcher,
 org.primefaces.component.tieredmenu,
 org.primefaces.component.toolbar,
 org.primefaces.component.tooltip,
 org.primefaces.component.tree,
 org.primefaces.component.treetable,
 org.primefaces.component.watermark,
 org.primefaces.component.wizard,
 org.primefaces.config,
 org.primefaces.context,
 org.primefaces.convert,
 org.primefaces.el,
 org.primefaces.event,
 org.primefaces.event.data,
 org.primefaces.event.diagram,
 org.primefaces.event.map,
 org.primefaces.event.system,
 org.primefaces.expression,
 org.primefaces.expression.impl,
 org.primefaces.expression.impl.base,
 org.primefaces.facelets,
 org.primefaces.json,
 org.primefaces.metadata,
 org.primefaces.metadata.transformer,
 org.primefaces.metadata.transformer.impl,
 org.primefaces.mobile.application,
 org.primefaces.mobile.component.content,
 org.primefaces.mobile.component.field,
 org.primefaces.mobile.component.footer,
 org.primefaces.mobile.component.header,
 org.primefaces.mobile.component.inputslider,
 org.primefaces.mobile.component.page,
 org.primefaces.mobile.component.rangeslider,
 org.primefaces.mobile.component.uiswitch,
 org.primefaces.mobile.event,
 org.primefaces.mobile.event.system,
 org.primefaces.mobile.renderkit,
 org.primefaces.mobile.renderkit.paginator,
 org.primefaces.mobile.util,
 org.primefaces.model,
 org.primefaces.model.chart,
 org.primefaces.model.diagram,
 org.primefaces.model.diagram.connector,
 org.primefaces.model.diagram.endpoint,
 org.primefaces.model.diagram.overlay,
 org.primefaces.model.filter,
 org.primefaces.model.map,
 org.primefaces.model.menu,
 org.primefaces.model.mindmap,
 org.primefaces.model.tagcloud,
 org.primefaces.push,
 org.primefaces.push.annotation,
 org.primefaces.push.impl,
 org.primefaces.push.inject,
 org.primefaces.renderkit,
 org.primefaces.util,
 org.primefaces.validate,
 org.primefaces.validate.bean,
 org.primefaces.visit,
 org.primefaces.webapp,
 org.primefaces.webapp.filter
Import-Package: org.osgi.framework;version="1.3.0"

1 个答案:

答案 0 :(得分:1)

您需要导入 - 打包各种javax.faces包。如果您的软件包需要使用它们,则必须导入除java。*软件包之外的所有软件包。