activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rsteppac2 <r...@steppacher.name>
Subject Karaf feature - resolving bundle fails due to multiple Joda-Time versions
Date Wed, 27 May 2015 12:25:29 GMT
Hello all,

My Karaf (v. 3.0.3) feature has a dependency on Joda-Time 2.x. It deployed
just fine until I added feature dependencies to the activemq-broker (5.11.1)
and activemq-camel features delivered with Karaf. My bundle in my feature
now fails resolution because two paths to the package "org.joda.time" are
found. One is the version 2.7 I am depending on, the other is version 1.6
which is a dependency of the ActiveMQ features:

Chain 1:
  ch.vivates.ams.pep [152.9]
    import:
(&(osgi.wiring.package=org.joda.time)(version>=2.7.0)(!(version>=3.0.0)))
     |
    export: osgi.wiring.package=org.joda.time
  joda-time [64.0]

Chain 2:
  ch.vivates.ams.pep [152.9]
    import: (osgi.wiring.package=org.apache.activemq)
     |
    export: osgi.wiring.package=org.apache.activemq;
uses:=com.thoughtworks.xstream
  org.apache.activemq.activemq-osgi [108.0]
    import:
(&(osgi.wiring.package=com.thoughtworks.xstream)(version>=1.4.0)(!(version>=2.0.0)))
     |
    export: osgi.wiring.package=com.thoughtworks.xstream;
uses:=org.joda.time
  org.apache.servicemix.bundles.xstream [118.0]
    import:
(&(osgi.wiring.package=org.joda.time)(version>=1.6.0)(!(version>=3.0.0)))
     |
    export: osgi.wiring.package=org.joda.time
  joda-time [117.0]

I have found ways to get the bundle to resolve and start. E.g. by explicitly 
starting the Joda 2.7 bundle before installing my feature. However, this
does not work if Karaf is restarted. Upon restart, the resolution of my
bundle always fails with the above error.

This  issue <https://issues.apache.org/jira/browse/CAMEL-7267>   describes
the same problem for the Camel Salesforce component. Apparently this was
fixed by  widening the version range
<https://fisheye6.atlassian.com/browse/camel-git/components/camel-salesforce/camel-salesforce-component/pom.xml?r1=908d7531d681d82805fa7fa54d51866451c80525&r2=738b6097fbe4db00f31dbe3ca18c15cb5a34adb0>
 
of the import to [1.6,3). The ActiveMQ bundle applies the same version range
but I still have the problem.

My feature file looks like this:

<feature name="pep" version="3.0.0-SNAPSHOT" description="Policy Enforcement
Point (PEP)">
    <details>Reverse proxy acting as a policy enforcement point (PEP),
authorizing access to individual resources</details>
    <feature>http</feature>
    <feature>http-whiteboard</feature>
    <feature version="5.11.1">activemq-broker-noweb</feature>
    <feature version="2.14.1">camel-core</feature>
    <feature version="2.14.1">camel-blueprint</feature>
    <feature version="2.14.1">camel-netty4-http</feature>
    <feature version="2.14.1">camel-http4</feature>
    <feature version="2.14.1">camel-jms</feature>
    <feature version="5.11.1">activemq-camel</feature>
    <bundle
dependency="true">mvn:ch.vivates.ams/base/3.0.0-SNAPSHOT</bundle>
    <bundle>mvn:ch.vivates.ams/pep/3.0.0-SNAPSHOT</bundle>
    <bundle>mvn:joda-time/joda-time/2.7</bundle>
   
<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.opensaml/2.6.1_3</bundle>
    <bundle>mvn:commons-lang/commons-lang/2.6</bundle>
    <bundle>wrap:mvn:org.owasp.esapi/esapi/2.0.1</bundle>
    <bundle>mvn:org.apache.santuario/xmlsec/1.5.6</bundle>
    <bundle>mvn:org.bouncycastle/bcprov-jdk15/1.46</bundle>
   
<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient/3.1_7</bundle>
   
<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-collections/3.2.1_3</bundle>
   
<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.not-yet-commons-ssl/0.3.11_1</bundle>
    <bundle>mvn:org.codehaus.woodstox/woodstox-core-asl/4.4.1</bundle>
    <bundle>mvn:org.codehaus.woodstox/stax2-api/3.1.4</bundle>
   
<bundle>mvn:org.herasaf.xacml.core/herasaf-xacml-core/1.0.0.RELEASE</bundle>
    <bundle>mvn:net.sf.ehcache/ehcache/2.9.0</bundle>
    <bundle>mvn:commons-codec/commons-codec/1.9</bundle>
    <bundle>mvn:commons-io/commons-io/2.4</bundle>
</feature>

Could someone please advise? 

TIA
Ralf



--
View this message in context: http://activemq.2283324.n4.nabble.com/Karaf-feature-resolving-bundle-fails-due-to-multiple-Joda-Time-versions-tp4696941.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message