缺少要求 - Org.apache.shiro - Osgi Karaf

时间:2016-12-12 13:25:39

标签: java osgi apache-karaf osgi-bundle

我的某个功能似乎有问题..但是,我无法弄清楚是什么导致了这个问题。首先,这是我试图安装的功能:

<feature name="wallboard-uccx10">
    <feature>pax-wicket</feature>
    <feature>guava</feature>
    <feature>wallboard-core</feature>
    <feature>commons-net</feature>
    <feature>jackson</feature>
    <bundle>mvn:org.glassfish.hk2/hk2-api/${hk2.version}</bundle>
    <bundle>mvn:org.glassfish.hk2/hk2-utils/${hk2.version}</bundle>
    <bundle>mvn:org.glassfish.hk2/hk2-locator/${hk2.version}</bundle>
    <bundle>mvn:org.javassist/javassist/${javaassist.version}</bundle>
    <bundle>mvn:org.glassfish.hk2/osgi-resource-locator/${osgilocator.version}</bundle>
    <feature>jersey</feature>
    <feature>wallboard-security-uccx10</feature>
    <bundle start-level="85">mvn:dk.netdesign.wallboard/wallboard-uccx-rest-provider/${project.version}</bundle>
</feature>

<feature name="wallboard-security-uccx10">
    <feature>wallboard-security</feature>
    <feature>TDCNetdesign_Finesse_Realm</feature>
    <feature>TDCNetdesign_UCCXAdmin_Realm</feature>  
</feature>

 <feature name="wallboard-security">
    <bundle>mvn:joda-time/joda-time/2.9.6</bundle>
    <bundle>mvn:org.apache.shiro/shiro-core/${shiro.version}</bundle>
    <bundle>mvn:org.apache.shiro/shiro-web/${shiro.version}</bundle>
    <bundle>mvn:dk.netdesign.wallboard/wallboard-shiro/${project.version}</bundle>
</feature>

我有点将问题缩小到以下功能: TDCNetdesign_UCCXAdmin_Realm

导致以下错误:

  

执行commnad时出错:无法解析wallboard-shiro / 2.55-SNAPSHOT:缺少要求[wallboard-shiro / 2.55-SNAPSHOT] osgi.wiring.package;滤波器:=“&LT;&安培; =&1.3.0 GT; =&2.0.0 GT;

所以它想要一个介于1.3.0和2.0.0之间的版本。我提供的是1.3.2应该没问题......

正如你所看到的;安装了shiro(1.3.2),它说的包丢失甚至没有红色或丢失..

http://prntscr.com/digb42

有趣的是,我运行完全相同的命令

feature:install TDCNetdesign_UCCXAdmin_Realm

这次它给了我另一个包..看起来它只是得到第一个包并返回缺少的要求,即使它出现在bundle:list...

在这里你可以看到不同的错误:

http://prntscr.com/digbyu

我错过了一些完全明显的东西吗?

谢谢你的时间!

1 个答案:

答案 0 :(得分:0)

看起来很像,TDCNetdesign_UCCXAdmin_Realm没有引用wallboard-security功能。你应该确保这也是设置的,仅仅创建一个“摘要”功能是不够的:

<feature name="wallboard-security-uccx10">
    <feature>wallboard-security</feature>
    <feature>TDCNetdesign_Finesse_Realm</feature>
    <feature>TDCNetdesign_UCCXAdmin_Realm</feature>  
</feature>

而是确保你有更多类似的东西:

 <feature name="TDCNetdesign_UCCXAdmin_Realm">
     <feature>wallboard-security</feature>
     <bundle>...</bundle>
 </feature>