karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From J. Brébec (JIRA) <j...@apache.org>
Subject [jira] [Commented] (KARAF-4159) FeatureResolver: Wrong dependencies installed
Date Fri, 04 Dec 2015 10:51:10 GMT

    [ https://issues.apache.org/jira/browse/KARAF-4159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15041408#comment-15041408

J. Brébec commented on KARAF-4159:

Yes, you're right for the refresh actions. I still have issues with refresh, but i don't have
for now a simple test-case. What i have found (but still random) :
- When two features install the same package (with two bundles), then every time i install
an unrelated feature, the package are refreshed (and of course all the dependencies). This
is the case when i install ActiveMQ 5.12.1 into Karaf with the transaction-api feature. ActiveMQ
feature has a dependency on aries transaction 1.1.1 which export javax.transaction. With this
low level dependencies refreshed, all the container refresh for every feature installation
- If i install a feature A with an optional import on package P, and then i install feature
B which resolve the package P, then the optional import is refreshed. but then, every time
i install an unrelated feature, this package is refreshed too.

For this issue, i have blacklisted spring 3.1.4 with the "etc/backlisted.properties" ; i have
rewritten the activemq feature to use aries transaction 1.3.0 ;
The last refresh is more problematic because it restart a lot of bundles, and moreover, Karaf4.0.3
ship with pax-web 4.2.3 wich has a blocker issue on stopping/starting bundle (servlet are
not reexported on restart).

thanks !

> FeatureResolver: Wrong dependencies installed
> ---------------------------------------------
>                 Key: KARAF-4159
>                 URL: https://issues.apache.org/jira/browse/KARAF-4159
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-feature
>    Affects Versions: 4.0.3
>         Environment: Reproduced in MacOS (JRE1.8) or Windows 7 (JRE 1.7)
>            Reporter: J. Brébec
>            Assignee: Guillaume Nodet
>            Priority: Critical
> In a fresh Karaf 4.0.3 installation
> 1. install spring/3.2.14.RELEASE_1
> {code}
> feature:install spring/3.2.14.RELEASE_1
> {code}
> 2. test an installation of spring-dm. Randomly, Karaf try to install spring 3.1.4.RELEASE
> {code}
> karaf@root()> feature:install -t -v spring-dm
> Adding features: spring-dm/[1.2.1,1.2.1]
> Changes to perform:
>   Region: root
>     Bundles to install:
>       mvn:org.apache.karaf.bundle/org.apache.karaf.bundle.springstate/4.0.3
>       mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.cglib/3.0_1
>       mvn:org.springframework/spring-aop/3.1.4.RELEASE
>       mvn:org.springframework/spring-asm/3.1.4.RELEASE
>       mvn:org.springframework/spring-beans/3.1.4.RELEASE
>       mvn:org.springframework/spring-context/3.1.4.RELEASE
>       mvn:org.springframework/spring-context-support/3.1.4.RELEASE
>       mvn:org.springframework/spring-core/3.1.4.RELEASE
>       mvn:org.springframework/spring-expression/3.1.4.RELEASE
>       mvn:org.springframework.osgi/spring-osgi-core/1.2.1
>       mvn:org.springframework.osgi/spring-osgi-extender/1.2.1
>       mvn:org.springframework.osgi/spring-osgi-annotation/1.2.1
>       mvn:org.springframework.osgi/spring-osgi-io/1.2.1
>   Bundles to refresh:
>     org.apache.servicemix.bundles.spring-aop/3.2.14.RELEASE_1 (Wired to org.apache.servicemix.bundles.spring-core/3.2.14.RELEASE_1
which is being refreshed)
>     org.apache.servicemix.bundles.spring-beans/3.2.14.RELEASE_1 (Wired to org.apache.servicemix.bundles.spring-core/3.2.14.RELEASE_1
which is being refreshed)
>     org.apache.servicemix.bundles.spring-context/3.2.14.RELEASE_1 (Wired to org.apache.servicemix.bundles.spring-aop/3.2.14.RELEASE_1
which is being refreshed)
>     org.apache.servicemix.bundles.spring-context-support/3.2.14.RELEASE_1 (Wired to org.apache.servicemix.bundles.spring-beans/3.2.14.RELEASE_1
which is being refreshed)
>     org.apache.servicemix.bundles.spring-core/3.2.14.RELEASE_1 (Should be wired to: org.apache.servicemix.bundles.cglib/
(through [org.apache.servicemix.bundles.spring-core/3.2.14.RELEASE_1] osgi.wiring.package;
>     org.apache.servicemix.bundles.spring-expression/3.2.14.RELEASE_1 (Wired to org.apache.servicemix.bundles.spring-core/3.2.14.RELEASE_1
which is being refreshed)
> {code} 
> Note: This can happen too when installing spring and spring-dm in the same command or
in a boot feature (staged or not).
> 3. install any unrelated feature (when spring-dm has installed spring 3.1) : Karaf uninstall
spring 3.1 and refresh the world
> {code}
> karaf@root()> feature:install -t -v scheduler 
> Adding features: scheduler/[4.0.3,4.0.3]
> Changes to perform:
>   Region: root
>     Bundles to uninstall:
>       org.springframework.expression/3.1.4.RELEASE
>       org.springframework.context.support/3.1.4.RELEASE
>       org.springframework.core/3.1.4.RELEASE
>       org.springframework.beans/3.1.4.RELEASE
>       org.springframework.context/3.1.4.RELEASE
>       org.springframework.aop/3.1.4.RELEASE
>       org.springframework.asm/3.1.4.RELEASE
>     Bundles to install:
>       mvn:org.apache.karaf.scheduler/org.apache.karaf.scheduler.core/4.0.3
>   Bundles to refresh:
>     org.springframework.aop/3.1.4.RELEASE (Bundle will be uninstalled)
>     org.springframework.asm/3.1.4.RELEASE (Bundle will be uninstalled)
>     org.springframework.beans/3.1.4.RELEASE (Bundle will be uninstalled)
>     org.springframework.context/3.1.4.RELEASE (Bundle will be uninstalled)
>     org.springframework.context.support/3.1.4.RELEASE (Bundle will be uninstalled)
>     org.springframework.core/3.1.4.RELEASE (Bundle will be uninstalled)
>     org.springframework.expression/3.1.4.RELEASE (Bundle will be uninstalled)
> {code}
> this is critical in my environment : a lot of dependencies don't work with two versions
of spring in the container. moreover, installing any feature after that uninstall/refresh
a lot of bundle (it uninstall unrelated bundle too)

This message was sent by Atlassian JIRA

View raw message