【问题标题】:Missing requirement - Org.apache.shiro - Osgi Karaf缺少要求 - Org.apache.shiro - Osgi Karaf
【发布时间】:2016-12-12 13:25:39
【问题描述】:

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

<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

它会导致以下错误:

执行命令时出错:无法解析 wallboard-shiro/2.55-SNAPSHOT:缺少要求 [wallboard-shiro/2.55-SNAPSHOT] osgi.wiring.package;过滤器:="=2.0.0>

所以它想要一个介于 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

我在这里遗漏了一些完全明显的东西吗?

感谢您的宝贵时间!

【问题讨论】:

  • 在您的 POM 中,您的版本占位符 ${shiro.version} ,${project.version} 的值是多少?
  • shiro 版本是 1.3.2 :)

标签: java osgi apache-karaf osgi-bundle


【解决方案1】:

看起来很像,您的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>

【讨论】:

    猜你喜欢
    • 2014-05-05
    • 2016-02-18
    • 1970-01-01
    • 2015-08-09
    • 2019-05-29
    • 2016-01-13
    • 1970-01-01
    • 2012-01-11
    • 1970-01-01
    相关资源
    最近更新 更多