karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <ch...@die-schneider.net>
Subject Re: Problems after removing a feature repository in Karaf 4.0
Date Mon, 12 Dec 2016 14:34:41 GMT
What you do sounds very strange.

Can you explain why you first install the repo and feature and then 
remove the repo?
Why don't you simply leave it there?

If you want to cleanly uninstall a feature and repo use 
feature:uninstall and feature:repo-remove.

Christian

On 12.12.2016 15:16, Frank_S wrote:
> Hi,
>
> we run our application in Karaf. It has a pluggable architecture in the
> sense that extra bundles get installed that perform certain services. The
> services are defined using Blueprint descriptors. For installing the
> bundles, we use the features framework of Karaf. More specifically, we
> generate a feature repository file, add the feature repository, install the
> feature, remove the feature repository, and then delete the generated
> feature repository file.
> This worked well in Karaf 2.4.0, but if we do this in Karaf 4.0, the first
> feature install succeeds, but a subsequent feature install yields the
> following exception :
>
> org.osgi.service.resolver.ResolutionException: Unable to resolve root:
> missing requirement [root] osgi.identity;
> osgi.identity=com.ikanalm.phase.echoparameters; type=karaf.feature;
> version="[1.0.0,1.0.0]";
> filter:="(&(osgi.identity=com.ikanalm.phase.echoparameters)(type=karaf.feature)(version>=1.0.0)(version<=1.0.0))"
> 	at
> org.apache.felix.resolver.ResolutionError.toException(ResolutionError.java:42)[8:org.apache.karaf.features.core:4.0.7]
> 	at
> org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:235)[8:org.apache.karaf.features.core:4.0.7]
> 	at
> org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:158)[8:org.apache.karaf.features.core:4.0.7]
> 	at
> org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:216)[8:org.apache.karaf.features.core:4.0.7]
> 	at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:263)[8:org.apache.karaf.features.core:4.0.7]
> 	at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1176)[8:org.apache.karaf.features.core:4.0.7]
> 	at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:1074)[8:org.apache.karaf.features.core:4.0.7]
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_60]
> 	at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_60]
> 	at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_60]
> 	at java.lang.Thread.run(Thread.java:745)[:1.8.0_60]
>
> The bundle com.ikanalm.phase.echoparameters, version 1.0.0 is the one that
> was installed using the generated feature repository file, which looks like
> this :
> <features xmlns="http://karaf.apache.org/xmlns/features/v1.2.1"
> name="com.ikanalm.phase.echoparameters1.0.0_1481545020697">
> <feature name="com.ikanalm.phase.echoparameters" version="1.0.0">
> <bundle>file://SOMEPATH/com.ikanalm.phase.echoparameters-1.0.0.jar</bundle>
> </feature>
> </features>
>
> The feature doesn't show up when I do "feature:list -i", and the feature
> repository isn't listed when I do "feature:repo-list". The bundle, however,
> is still installed, so our application is able to use it.
>
> Unfortunately, the feature is still listed in the requirements list of the
> “root” instance :
> karaf@root()> requirement-list
> Region | Requirement
> ---------------------------------------------------------------
> root   | feature:com.ikanalm.phase.echoparameters/[1.0.0,1.0.0]
>
> When I do a “requirement-remove” on the feature, the feature is uninstalled,
> and after that I can again install other features without the exception
> popping up, but regrettably, the bundle is also uninstalled, so that doesn't
> really help us.
>
> Is there a way to remove a requirement on an instance without uninstalling
> the feature or the bundle ? Or is the removal of the feature repository a
> bad idea, and are we wrong to use the feature framework merely as a “vessel”
> to get our bundles installed ?
>
> Note again that this worked fine in Karaf 2.4.0.
>
> Thanks,
> Frank 'S Jegers.
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Problems-after-removing-a-feature-repository-in-Karaf-4-0-tp4048979.html
> Sent from the Karaf - User mailing list archive at Nabble.com.


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


Mime
View raw message