Вопрос

I'm trying to build an osgi bundle for Adobe CQ using rome to generate RSS/Atom feed. The bundle is being built with "maven-bundle-plugin (felix). I can build the bundle with out any error. But while deployin the same in to CQ, using the felix console I'm getting an error, please find the trace below.

com.acme.wcm.cq.acme-corporate-services [310]: Unable to resolve 310.0: missing requirement [310.0] osgi.wiring.package; (osgi.wiring.package=oracle.xml.parser)) org.osgi.framework.BundleException: Unresolved constraint in bundle com.acme.wcm.cq.acme-corporate-services [310]: Unable to resolve 310.0: missing requirement [310.0] osgi.wiring.package; (osgi.wiring.package=oracle.xml.parser)
    at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3962)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:2025)
    at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:955)
    at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:942)
    at org.apache.felix.webconsole.internal.core.InstallHelper.doRun(InstallHelper.java:67)
    at org.apache.felix.webconsole.internal.core.BaseUpdateInstallHelper.doRun(BaseUpdateInstallHelper.java:89)
    at org.apache.felix.webconsole.internal.core.BaseUpdateInstallHelper.run(BaseUpdateInstallHelper.java:121)
    at java.lang.Thread.run(Unknown Source)

While trying to resolve the issue, we found that in rome's pom, there is a reference to oracle.* in the import package section.

<Import-Package> oracle.*;resolution:=optional,org.jaxen*;resolution:=optional,org.jdom.*;resolution:=optional,*</Import-Package>

So, in our bundle if we add an instruction for avoiding the oracle dependency in the bundle's pom like

<Import-Package>!oracle.*</Import-Package> 

it is blocking all the other required imports. In this case do we need to specify all the required imports in "Import-Package" section? Please give us some pointers to solve this issue.

Thanks and regards, San

Это было полезно?

Решение

You need to add * to instruct OSGi to import all other dependencies:

<Import-Package>!oracle.*,*</Import-Package>
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top