使用约束违规。无法解析捆绑包修订版com.springsource.org.apache.axis

时间:2016-03-16 22:13:43

标签: spring osgi

尝试运行OSGI捆绑包时出现以下错误。任何线索都会非常感激。

ERROR: Bundle com.springsource.org.apache.axis [15] Error starting mvn:
org.apache.axis/com.springsource.org.apache.axis/1.4.0 (
org.osgi.framework.BundleException: Uses constraint violation. Unable to resolve 
bundle revision com.springsource.org.apache.axis [15.0] because it is exposed to 
package 'javax.activation' from bundle revisions com.springsource.javax.activation 
[14.0] and org.apache.felix.framework [0] via two dependency chains.

第1链:

com.springsource.org.apache.axis [15.0] import: (&(osgi.wiring.package=
 javax.activation)(version>=1.1.0)(!(version>=2.0.0))) | export: 
 osgi.wiring.package=javax.activation com.springsource.javax.activation [14.0]

链2:

 com.springsource.org.apache.axis [15.0] import: (&(osgi.wiring.package=
 javax.xml.soap)(version>=0.0.0)) | export: osgi.wiring.package=javax.xml.soap; 
 uses:=javax.activation export: osgi.wiring.package=javax.activation 
 org.apache.felix.framework [0]) 
 org.osgi.framework.BundleException: Uses constraint violation. 
 Unable to resolve bundle revision 
 com.springsource.org.apache.axis [15.0] because it is exposed to package 
 'javax.activation' from bundle revisions com.springsource.javax.activation [14.0] 
  and org.apache.felix.framework [0] via two dependency chains.

第1链:

com.springsource.org.apache.axis [15.0] import: (&(osgi.wiring.package=javax.activation)(version>=1.1.0)(!(version>=2.0.0))) | export: osgi.wiring.package=javax.activation com.springsource.javax.activation [14.0]

链2:

com.springsource.org.apache.axis [15.0] import: (&(osgi.wiring.package=javax.xml.soap)(version>=0.0.0)) | export: osgi.wiring.package=javax.xml.soap; uses:=javax.activation export: osgi.wiring.package=javax.activation org.apache.felix.framework [0] at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3980) at org.apache.felix.framework.Felix.startBundle(Felix.java:2037) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1291) at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304) at java.lang.Thread.run(Thread.java:745)

1 个答案:

答案 0 :(得分:0)

从捆绑包列表中删除 com.springsource.javax.activation 捆绑包。 如果由于特殊版本而需要这个特殊的javax.activation包,则需要确保您自己的Imports对于该版本是正确的。 现在您正在使用 com.springsource。* 捆绑包,这些捆绑包很漂亮" OLD"并且不再维护我建议切换到:
A)官方罐子(如javax.activation),其中最新版本已经是OSGi准备好的捆绑包 B)使用ServiceMix包裹的捆绑包,Apache ServiceMix团队提供了许多OSGi就绪捆绑包,这些捆绑包不能从发起者那里获得。