我按照以下页面上的说明将primefaces jar库转换为OSGi插件,并将其添加为我的OSGi包中的必需插件之一。 http://www.vogella.com/tutorials/EclipseJarToPlugin/article.html#jar-files-without-osgi-meta-data
然而,当我部署我的OSGi包时,我得到了missing requirement
,我想这是因为我从未将新的插件部署到glassfish。我该如何部署?
这是我得到的堆栈跟踪,以防错误是由于其他原因造成的:
[#|2016-09-12T11:14:04.150+0200|SEVERE|glassfish3.1.2|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=85;_ThreadName=Thread-2;|Exception while loading the app : org.osgi.framework.BundleException: Unresolved constraint in bundle test.osgi.primefaces [293]: Unable to resolve 293.0: missing requirement [293.0] osgi.wiring.bundle; (&(osgi.wiring.bundle=org.primefaces.osgi)(bundle-version>=1.0.0))
org.osgi.framework.BundleException: Unresolved constraint in bundle test.osgi.primefaces [293]: Unable to resolve 293.0: missing requirement [293.0] osgi.wiring.bundle; (&(osgi.wiring.bundle=org.primefaces.osgi)(bundle-version>=1.0.0))
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3826)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:944)
at org.glassfish.extras.osgicontainer.OSGiDeployedBundle.startBundle(OSGiDeployed
答案 0 :(得分:0)
错误表明您的测试包需要带有符号名称org.primefaces.osgi的包。所以你还需要部署这个包。