OSGI捆绑包异常,Maven依赖问题 [英] OSGI bundle exception, maven dependency issue

查看:146
本文介绍了OSGI捆绑包异常,Maven依赖问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对OSGI,Felix和Maven之类的东西还很陌生,就是从它开始的. 我正在通过jenkins部署Java构建,并且遇到以下依赖项问题.

I'm pretty new to the OSGI, Felix and Maven stuffs, just started with it. I'm deploying the java build through jenkins and I get the below dependency issue.

下面是包含依赖项的pom文件内容,我不确定它是否正确,但仍然对此有所抱怨.

Below is the pom file contents which includes the dependency, I'm not sure whether it is correct, but it still complains about it.

它正在寻找"javax.jws",并且版本在2.0到3.0之间.

It is looking for "javax.jws" and the version is between 2.0 and 3.0

javax.jws;version>="2.0.0",!javax.jws;version>="3.0.0"

下面是pom的内容.

                            <Import-Package>!sun.misc,!org.apache.avalon.framework.logger,
    !org.ietf.jgss,!org.apache.log,!org.apache.log.format,!org.apache.log.output.io,!com.werken.xpath,!org.apache.tools.ant,!org.apache.tools.ant.taskdefs,
    !org.jdom,!org.jdom.input,!org.jdom.output,com.mblox.ngp.sal*;
    version="${sal-utils-version}",org.apache.commons.logging;version="1.1",
    javax.jws;version>="2.0.0",!javax.jws;version>="3.0.0",
    com.sun.xml.ws.api.message,*
</Import-Package>

以下是我得到的例外情况:

Below is the exception that I get:

[#|2013-01-29 11:07:44,109|ERROR|NGP-SAL-SALBootstrap-SAL-0|com.mblox.ngp.sal.platform.impl.Sal|172.18.36.38|slodev-rhatf4.mblox.com|sal-1|Unresolved constraint in bundle sap-ws-netcom [24]: Un
able to resolve 24.0: missing requirement [24.0] package; (&(package=javax.jws)(version>=2.0.0)(version>=2.0.0)(!(version>=3.0.0))) - [24.0] package; (&(package=javax.jws)(version>=2.0.0)(versi
on>=2.0.0)(!(version>=3.0.0)))|#]
org.osgi.framework.BundleException: Unresolved constraint in bundle sap-ws-netcom [24]: Unable to resolve 24.0: missing requirement [24.0] package; (&(package=javax.jws)(version>=2.0.0)(version
>=2.0.0)(!(version>=3.0.0))) - [24.0] package; (&(package=javax.jws)(version>=2.0.0)(version>=2.0.0)(!(version>=3.0.0)))
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3421)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1754)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:892)
        at com.mblox.ngp.sal.platform.impl.Sal.installBundle(Sal.java:608)
        at com.mblox.ngp.sal.platform.impl.Sal.getBundle(Sal.java:481)
        at com.mblox.ngp.sal.platform.impl.Sal.installSap(Sal.java:630)
        at com.mblox.ngp.sal.platform.impl.Sal.initSapBundles(Sal.java:545)
        at com.mblox.ngp.sal.platform.impl.Sal.start(Sal.java:290)
        at com.mblox.ngp.sal.platform.impl.SALBootstrap.call(SALBootstrap.java:64)
        at com.mblox.ngp.sal.platform.impl.SALBootstrap.call(SALBootstrap.java:24)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:722)

解决此问题的任何建议或指示.

Any suggestions or pointers to solve this issue.

推荐答案

是否有任何捆绑包导出javax.jws包?如果没有,您可以将此Maven依赖项添加到您的构建中,并确保将其部署到Felix:

Is there any bundle which exports the javax.jws package? If not, you can add this Maven dependency to your build and also make sure it is deployed to Felix:

<dependency>
    <groupId>org.apache.geronimo.specs</groupId>
    <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
    <version>1.1.2</version>
</dependency>

这篇关于OSGI捆绑包异常,Maven依赖问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆