You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by sathish_alwar <sa...@gmail.com> on 2018/03/04 01:43:47 UTC

Unable to install some features as bootFeature in Karaf4

Hi,

We have custom Karaf-4 package  (Opendaylight version). We have a main
feature (say A) which includes other sub features (B, C). We are able to
install feature A manually by logging into the Karaf console
(feature:install A), however when we add the same feature as boot feature we
are getting below exception. Please let us know 

1) Difference between bootFeature and manual installation of feature. 
2) Significance of prerequisite option in feature.xml


We have following configuration in org.apache.karaf.features.cfg
featuresBoot=wrap,(jaas),standard,sdnfw-try

also tried
#featuresBoot=(wrap),instance,package,log,ssh,aries-blueprint,framework,system,feature,
\
#       shell,
management,service,jaas,shell-compat,deployer,diagnostic,bundle, \
#       config, kar, sdnfw-try

org.osgi.service.resolver.ResolutionException: Unable to resolve root:
missing requirement [root] osgi.identity; osgi.identity=sdnfw-security;
type=karaf.feature; version=0;
filter:="(&(osgi.identity=sdnfw-security)(type=karaf.feature)(version>=0.0.0))"
[caused by: Unable to resolve sdnfw-security/5.1.0.SNAPSHOT: missing
requirement [sdnfw-security/5.1.0.SNAPSHOT] osgi.identity;
osgi.identity=sdnfw.odl-utils; type=osgi.bundle;
version="[5.1.0.SNAPSHOT,5.1.0.SNAPSHOT]"; resolution:=mandatory [caused by:
Unable to resolve sdnfw.odl-utils/5.1.0.SNAPSHOT: missing requirement
[sdnfw.odl-utils/5.1.0.SNAPSHOT] osgi.wiring.package;
filter:="(&(osgi.wiring.package=*org.apache.karaf.shell.commands*)(version>=4.0.0)(!(version>=5.0.0)))"]]


Thanks




--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Re: Unable to install some features as bootFeature in Karaf4

Posted by Francois Papon <fr...@openobject.fr>.
Hi,

Could you try like this ?

featuresBoot=(wrap,jaas,standard),sdnfw-try

Francois

Le 04/03/2018 à 05:43, sathish_alwar a écrit :
> Hi,
>
> We have custom Karaf-4 package  (Opendaylight version). We have a main
> feature (say A) which includes other sub features (B, C). We are able to
> install feature A manually by logging into the Karaf console
> (feature:install A), however when we add the same feature as boot feature we
> are getting below exception. Please let us know 
>
> 1) Difference between bootFeature and manual installation of feature. 
> 2) Significance of prerequisite option in feature.xml
>
>
> We have following configuration in org.apache.karaf.features.cfg
> featuresBoot=wrap,(jaas),standard,sdnfw-try
>
> also tried
> #featuresBoot=(wrap),instance,package,log,ssh,aries-blueprint,framework,system,feature,
> \
> #       shell,
> management,service,jaas,shell-compat,deployer,diagnostic,bundle, \
> #       config, kar, sdnfw-try
>
> org.osgi.service.resolver.ResolutionException: Unable to resolve root:
> missing requirement [root] osgi.identity; osgi.identity=sdnfw-security;
> type=karaf.feature; version=0;
> filter:="(&(osgi.identity=sdnfw-security)(type=karaf.feature)(version>=0.0.0))"
> [caused by: Unable to resolve sdnfw-security/5.1.0.SNAPSHOT: missing
> requirement [sdnfw-security/5.1.0.SNAPSHOT] osgi.identity;
> osgi.identity=sdnfw.odl-utils; type=osgi.bundle;
> version="[5.1.0.SNAPSHOT,5.1.0.SNAPSHOT]"; resolution:=mandatory [caused by:
> Unable to resolve sdnfw.odl-utils/5.1.0.SNAPSHOT: missing requirement
> [sdnfw.odl-utils/5.1.0.SNAPSHOT] osgi.wiring.package;
> filter:="(&(osgi.wiring.package=*org.apache.karaf.shell.commands*)(version>=4.0.0)(!(version>=5.0.0)))"]]
>
>
> Thanks
>
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: Unable to install some features as bootFeature in Karaf4

Posted by sathish_alwar <sa...@gmail.com>.
Hi,

Could you please comment on this issue.

Thanks



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Re: Unable to install some features as bootFeature in Karaf4

Posted by sathish_alwar <sa...@gmail.com>.
Hi JB,

Thanks for your prompt responses. Yes we are using 4.0.10.

We are facing *this "recursion issue" only while installing as boot feature.
*

We are able to install the same feature manually (karaf console command)
after removing it as boot feature. This is FYKI.

Thanks



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Re: Unable to install some features as bootFeature in Karaf4

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
That's a different one. What Karaf version are you using ? 4.0.10 ?

Regards
JB

On 03/04/2018 08:09 AM, sathish_alwar wrote:
> Hi,
> 
> Thanks for the response. We have about 200 bundles grouped in several
> features. We have wrapper feature that encompass all sub features. 
> 
> I modified as suggested. Now i am getting following exception
> 
> 
> org.osgi.framework.BundleException: Unable to acquire the state change lock
> for the module: osgi.identity;
> osgi.identity="org.apache.karaf.features.core"; type="osgi.bundle";
> version:Version="4.0.10" [id=6] STOPPED [STARTED]
>         at
> org.eclipse.osgi.container.Module.lockStateChange(Module.java:329)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
>         at
> org.eclipse.osgi.container.Module.stop(Module.java:480)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
>         at
> org.eclipse.osgi.internal.framework.EquinoxBundle.stop(EquinoxBundle.java:419)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
>         at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.stopBundle(FeaturesServiceImpl.java:1305)[6:org.apache.karaf.features.core:4.0.10]
>         at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:818)[6:org.apache.karaf.features.core:4.0.10]
> 
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Unable to install some features as bootFeature in Karaf4

Posted by sathish_alwar <sa...@gmail.com>.
Hi,

Thanks for the response. We have about 200 bundles grouped in several
features. We have wrapper feature that encompass all sub features. 

I modified as suggested. Now i am getting following exception


org.osgi.framework.BundleException: Unable to acquire the state change lock
for the module: osgi.identity;
osgi.identity="org.apache.karaf.features.core"; type="osgi.bundle";
version:Version="4.0.10" [id=6] STOPPED [STARTED]
        at
org.eclipse.osgi.container.Module.lockStateChange(Module.java:329)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at
org.eclipse.osgi.container.Module.stop(Module.java:480)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at
org.eclipse.osgi.internal.framework.EquinoxBundle.stop(EquinoxBundle.java:419)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at
org.apache.karaf.features.internal.service.FeaturesServiceImpl.stopBundle(FeaturesServiceImpl.java:1305)[6:org.apache.karaf.features.core:4.0.10]
        at
org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:818)[6:org.apache.karaf.features.core:4.0.10]




--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Re: Unable to install some features as bootFeature in Karaf4

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

it's probably a race condition where your feature install at the same time or
before the shell feature.

I would try to define multiple stage, especially the shell feature in first
stage and your feature in second one:

(wrap, instance, package, log, ssh, aries-blueprint, framework, system, feature,
shell, management, service, jaas, shell-compat, deployer, diagnostic, bundle,
config, kar), sdnfw-try

Regards
JB

On 03/04/2018 02:43 AM, sathish_alwar wrote:
> Hi,
> 
> We have custom Karaf-4 package  (Opendaylight version). We have a main
> feature (say A) which includes other sub features (B, C). We are able to
> install feature A manually by logging into the Karaf console
> (feature:install A), however when we add the same feature as boot feature we
> are getting below exception. Please let us know 
> 
> 1) Difference between bootFeature and manual installation of feature. 
> 2) Significance of prerequisite option in feature.xml
> 
> 
> We have following configuration in org.apache.karaf.features.cfg
> featuresBoot=wrap,(jaas),standard,sdnfw-try
> 
> also tried
> #featuresBoot=(wrap),instance,package,log,ssh,aries-blueprint,framework,system,feature,
> \
> #       shell,
> management,service,jaas,shell-compat,deployer,diagnostic,bundle, \
> #       config, kar, sdnfw-try
> 
> org.osgi.service.resolver.ResolutionException: Unable to resolve root:
> missing requirement [root] osgi.identity; osgi.identity=sdnfw-security;
> type=karaf.feature; version=0;
> filter:="(&(osgi.identity=sdnfw-security)(type=karaf.feature)(version>=0.0.0))"
> [caused by: Unable to resolve sdnfw-security/5.1.0.SNAPSHOT: missing
> requirement [sdnfw-security/5.1.0.SNAPSHOT] osgi.identity;
> osgi.identity=sdnfw.odl-utils; type=osgi.bundle;
> version="[5.1.0.SNAPSHOT,5.1.0.SNAPSHOT]"; resolution:=mandatory [caused by:
> Unable to resolve sdnfw.odl-utils/5.1.0.SNAPSHOT: missing requirement
> [sdnfw.odl-utils/5.1.0.SNAPSHOT] osgi.wiring.package;
> filter:="(&(osgi.wiring.package=*org.apache.karaf.shell.commands*)(version>=4.0.0)(!(version>=5.0.0)))"]]
> 
> 
> Thanks
> 
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com