Re: Help needed with Karaf 4 Integration test writing

2018-03-03 Thread Serge Huber
Hi JB,

I tried editing the generated file manually but for some strange reason it
doesn't seem to install my features, maybe I did a stupid mistake ? I did
all of this in the generated target/exam/*/ folder.

Here's the features.cfg contents:

#Modified by paxexam
#Sun Mar 04 07:50:26 CET 2018
featuresBootAsynchronous=false
featuresBoot=(instance,package,log,ssh,aries-blueprint,framework,system,eventadmin,feature,shell,management,service,jaas,shell-compat,deployer,diagnostic,wrap,bundle,config,kar,war,cxf,cellar),unomi-kar,unomi-router-karaf-feature,exam
featuresRepositories=mvn\:org.apache.karaf.features/framework/4.1.5/xml/features,
mvn\:org.apache.karaf.features/spring/4.1.5/xml/features,
mvn\:org.apache.karaf.features/standard/4.1.5/xml/features,
mvn\:org.apache.karaf.features/enterprise/4.1.5/xml/features,mvn\:org.ops4j.pax.web/pax-web-features/3.1.0/xml/features,mvn\:org.apache.cxf.karaf/apache-cxf/3.1.10/xml/features,mvn\:org.apache.karaf.cellar/apache-karaf-cellar/4.1.0/xml/features,mvn\:org.apache.unomi/unomi-kar/1.3.0-incubating-unomi_5_karaf4_1-SNAPSHOT/xml/features,mvn\:org.apache.unomi/unomi-router-karaf-feature/1.3.0-incubating-unomi_5_karaf4_1-SNAPSHOT/xml/features,mvn\:org.ops4j.pax.exam/pax-exam-features/4.11.0/xml

Here's the karaf.log:

Mar 04, 2018 8:28:05 AM org.apache.karaf.main.lock.SimpleFileLock lock

INFO: Trying to lock
/Users/loom/java/technologies/apache-git/incubator-unomi-karaf4/itests/target/exam/7874d4a8-c3b0-4850-b6d5-302cfe79/lock

Mar 04, 2018 8:28:05 AM org.apache.karaf.main.lock.SimpleFileLock lock

INFO: Lock acquired

Mar 04, 2018 8:28:05 AM org.apache.karaf.main.Main$KarafLockCallback
lockAquired

INFO: Lock acquired. Setting startlevel to 100

2018-03-04T08:28:08,059 | INFO  | pool-1-thread-2  | FeaturesServiceImpl
  | 10 - org.apache.karaf.features.core - 4.1.5 | Adding features:
instance/[4.1.5,4.1.5], package/[4.1.5,4.1.5], log/[4.1.5,4.1.5],
ssh/[4.1.5,4.1.5], aries-blueprint/[4.1.5,4.1.5], framework/[4.1.5,4.1.5],
system/[4.1.5,4.1.5], eventadmin/[4.1.5,4.1.5], feature/[4.1.5,4.1.5],
shell/[4.1.5,4.1.5], management/[4.1.5,4.1.5], service/[4.1.5,4.1.5],
jaas/[4.1.5,4.1.5], shell-compat/[4.1.5,4.1.5], deployer/[4.1.5,4.1.5],
diagnostic/[4.1.5,4.1.5], wrap/[0,0.0.0], bundle/[4.1.5,4.1.5],
config/[4.1.5,4.1.5], kar/[4.1.5,4.1.5], war/[4.1.5,4.1.5],
cxf/[3.1.10,3.1.10], cellar/[4.1.0,4.1.0]


Even if it did work, this file is generated by Pax Exam so it's not clear
to me the changes I need to make to the integration tests to set this up ?


Sorry about all the questions, but I'm really struggling with this.


Regards,

  Serge...


Serge Huber
CTO & Co-Founder
T +41 22 361 3424
9 route des Jeunes | 1227 Acacias | Switzerland
jahia.com 
SKYPE | LINKEDIN  | TWITTER
 | VCARD



> JOIN OUR COMMUNITY  to evaluate, get trained and
to discover why Jahia is a leading User Experience Platform (UXP) for
Digital Transformation.

On Sun, Mar 4, 2018 at 8:17 AM, Jean-Baptiste Onofré 
wrote:

> As said, the featuresBoot doesn't seem good to me as wrap can be not yet
> installed (async) before your feature is installed.
>
> It should be:
>
> featuresBoot=(instance, package, log, ssh, aries-blueprint, framework,
> system,
>  eventadmin, feature, shell, management, service, jaas, shell-compat,
> deployer,
>  diagnostic, wrap, bundle, config,
>  kar,shell,war,cxf,cellar),unomi-kar,unomi-router-karaf-feature,exam
>
> Regards
> JB
>
> On 03/04/2018 08:02 AM, Serge Huber wrote:
> > Thanks Oliver & JB for your quick answers.
> >
> > I've checked the generated org.apache.karaf.features.cfg file and it has
> some
> > strange contents:
> >
> > *#Modified by paxexam*
> >
> > *#Fri Mar 02 16:59:52 CET 2018*
> >
> > *featuresBootAsynchronous=false*
> >
> > *featuresBoot=instance, package, log, ssh, aries-blueprint, framework,
> system,
> > eventadmin, feature, shell, management, service, jaas, shell-compat,
> deployer,
> > diagnostic, wrap, bundle, config,
> > kar,shell,wrap,war,cxf,cellar,unomi-kar,unomi-router-karaf-feature,exam*
> >
> > *featuresRepositories=mvn\:org.apache.karaf.features/
> framework/4.1.5/xml/features,
> > mvn\:org.apache.karaf.features/spring/4.1.5/xml/features,
> > mvn\:org.apache.karaf.features/standard/4.1.5/xml/features,
> > mvn\:org.apache.karaf.features/enterprise/4.1.5/xml/
> features,mvn\:org.ops4j.pax.web/pax-web-features/3.1.0/
> xml/features,mvn\:org.apache.karaf.features/standard/4.1.5/
> xml/features,mvn\:org.ops4j.pax.web/pax-web-features/3.1.
> 0/xml/features,mvn\:org.apache.cxf.karaf/apache-cxf/3.
> 1.10/xml/features,mvn\:org.apache.karaf.cellar/apache-
> karaf-cellar/4.1.0/xml/features,mvn\:org.apache.unomi/unomi-kar/1.3.0-
> incubating-unomi_5_karaf4_1-SNAPSHOT/xml/features,mvn\:
> org.apache.unomi/unomi-router-karaf-feature/1.3.0-
> incubating-unomi_5_karaf4_1-SNAPSHOT/xml/feature

Re: Help needed with Karaf 4 Integration test writing

2018-03-03 Thread Jean-Baptiste Onofré
As said, the featuresBoot doesn't seem good to me as wrap can be not yet
installed (async) before your feature is installed.

It should be:

featuresBoot=(instance, package, log, ssh, aries-blueprint, framework, system,
 eventadmin, feature, shell, management, service, jaas, shell-compat, deployer,
 diagnostic, wrap, bundle, config,
 kar,shell,war,cxf,cellar),unomi-kar,unomi-router-karaf-feature,exam

Regards
JB

On 03/04/2018 08:02 AM, Serge Huber wrote:
> Thanks Oliver & JB for your quick answers. 
> 
> I've checked the generated org.apache.karaf.features.cfg file and it has some
> strange contents:
> 
> *#Modified by paxexam*
> 
> *#Fri Mar 02 16:59:52 CET 2018*
> 
> *featuresBootAsynchronous=false*
> 
> *featuresBoot=instance, package, log, ssh, aries-blueprint, framework, system,
> eventadmin, feature, shell, management, service, jaas, shell-compat, deployer,
> diagnostic, wrap, bundle, config,
> kar,shell,wrap,war,cxf,cellar,unomi-kar,unomi-router-karaf-feature,exam*
> 
> *featuresRepositories=mvn\:org.apache.karaf.features/framework/4.1.5/xml/features,
> mvn\:org.apache.karaf.features/spring/4.1.5/xml/features,
> mvn\:org.apache.karaf.features/standard/4.1.5/xml/features,
> mvn\:org.apache.karaf.features/enterprise/4.1.5/xml/features,mvn\:org.ops4j.pax.web/pax-web-features/3.1.0/xml/features,mvn\:org.apache.karaf.features/standard/4.1.5/xml/features,mvn\:org.ops4j.pax.web/pax-web-features/3.1.0/xml/features,mvn\:org.apache.cxf.karaf/apache-cxf/3.1.10/xml/features,mvn\:org.apache.karaf.cellar/apache-karaf-cellar/4.1.0/xml/features,mvn\:org.apache.unomi/unomi-kar/1.3.0-incubating-unomi_5_karaf4_1-SNAPSHOT/xml/features,mvn\:org.apache.unomi/unomi-router-karaf-feature/1.3.0-incubating-unomi_5_karaf4_1-SNAPSHOT/xml/features,mvn\:org.ops4j.pax.exam/pax-exam-features/4.11.0/xml*
> 
> 
> I seems the wrap feature is listed twice, not sure if that is a problem. 
> 
> I installed the unomi-kar and unomi-router-karaf-feature as boot features
> because this is what is done in the Karaf package, but I don't have a problem
> changing this for the integration tests. I'm just not sure how this can be
> achieved ? Do you have an example or some documentation ? I checked the Karaf
> documentation but I couldn't find anything related to injection or 
> executeCommand.
> 
> Regards,
>   Serge... 
> 
> 
>   Serge Huber
>   CTO & Co-Founder
> 
> 
>   T +41 22 361 3424
>   9 route des Jeunes | 1227 Acacias | Switzerland
>   jahia.com 
>   SKYPE | LINKEDIN  | TWITTER
>    | VCARD
>   
>     
> 
>   > JOIN OUR COMMUNITY  to evaluate, get trained and 
> to discover why Jahia is
>   a leading User Experience Platform (UXP) for Digital Transformation.
> 
> 
> On Sun, Mar 4, 2018 at 5:51 AM, Jean-Baptiste Onofré  > wrote:
> 
> Hi Serge,
> 
> I think that the problem is that wrap should be a bootFeature in early 
> stage
> compared to the Unomi router.
> 
> Can you check (in the @Config) the org.apache.karaf.feature.cfg (if wrap 
> is at
> first stage) ?
> 
> More over, I would install unomi feature using executeCommand or feature 
> service
> (with @Inject) to be sure to be "in" Karaf.
> 
> Regards
> JB
> 
> On 03/03/2018 04:31 PM, Serge Huber wrote:
> > Hello,
> >
> > I'm struggling getting Apache Unomi tests to work since I migrated from 
> Karaf 3
> > to Karaf 4. 
> >
> > Here is the error I am getting in the logs:
> >
> > *2018-03-02T17:01:54,018 | ERROR | pool-1-thread-2  |
> BootFeaturesInstaller     
> >       | 10 - org.apache.karaf.features.core - 4.1.5 | Error installing 
> boot
> > features*
> >
> > *org.apache.karaf.features.internal.util.MultiException: Error:*
> >
> > *        Error downloading
> >
> 
> wrap:file:/Users/loom/.m2/repository/org/apache/kafka/kafka-clients/0.10.1.0/kafka-clients-0.10.1.0.jar
> 
> >  >*
> >
> > *        Error downloading
> >
> 
> wrap:file:/Users/loom/.m2/repository/org/apache/kafka/kafka-clients/0.10.1.0/kafka-clients-0.10.1.0.jar
> 
> >  >*
> >
> > *        at
> >
> 
> org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.(MavenDownloadManager.java:84)
> > ~[?:?]*
> >
> > *        at
> >
> 
> org.apache.karaf.features.internal.download.impl.MavenDownloadManager.createDownloader(MavenDownloadManager.java:72)
> > ~[?:?]*
> >
> > *        at
> >
> 
> org.apache.karaf.features.internal.region.Subsystem.downloadB

Re: Unable to install some features as bootFeature in Karaf4

2018-03-03 Thread Jean-Baptiste Onofré
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é
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: Unable to install some features as bootFeature in Karaf4

2018-03-03 Thread sathish_alwar
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: Help needed with Karaf 4 Integration test writing

2018-03-03 Thread Serge Huber
Thanks Oliver & JB for your quick answers.

I've checked the generated org.apache.karaf.features.cfg file and it has
some strange contents:

*#Modified by paxexam*

*#Fri Mar 02 16:59:52 CET 2018*

*featuresBootAsynchronous=false*

*featuresBoot=instance, package, log, ssh, aries-blueprint, framework,
system, eventadmin, feature, shell, management, service, jaas,
shell-compat, deployer, diagnostic, wrap, bundle, config,
kar,shell,wrap,war,cxf,cellar,unomi-kar,unomi-router-karaf-feature,exam*

*featuresRepositories=mvn\:org.apache.karaf.features/framework/4.1.5/xml/features,
mvn\:org.apache.karaf.features/spring/4.1.5/xml/features,
mvn\:org.apache.karaf.features/standard/4.1.5/xml/features,
mvn\:org.apache.karaf.features/enterprise/4.1.5/xml/features,mvn\:org.ops4j.pax.web/pax-web-features/3.1.0/xml/features,mvn\:org.apache.karaf.features/standard/4.1.5/xml/features,mvn\:org.ops4j.pax.web/pax-web-features/3.1.0/xml/features,mvn\:org.apache.cxf.karaf/apache-cxf/3.1.10/xml/features,mvn\:org.apache.karaf.cellar/apache-karaf-cellar/4.1.0/xml/features,mvn\:org.apache.unomi/unomi-kar/1.3.0-incubating-unomi_5_karaf4_1-SNAPSHOT/xml/features,mvn\:org.apache.unomi/unomi-router-karaf-feature/1.3.0-incubating-unomi_5_karaf4_1-SNAPSHOT/xml/features,mvn\:org.ops4j.pax.exam/pax-exam-features/4.11.0/xml*

I seems the wrap feature is listed twice, not sure if that is a problem.

I installed the unomi-kar and unomi-router-karaf-feature as boot features
because this is what is done in the Karaf package, but I don't have a
problem changing this for the integration tests. I'm just not sure how this
can be achieved ? Do you have an example or some documentation ? I checked
the Karaf documentation but I couldn't find anything related to injection
or executeCommand.

Regards,
  Serge...

Serge Huber
CTO & Co-Founder
T +41 22 361 3424
9 route des Jeunes | 1227 Acacias | Switzerland
jahia.com 
SKYPE | LINKEDIN  | TWITTER
 | VCARD



> JOIN OUR COMMUNITY  to evaluate, get trained and
to discover why Jahia is a leading User Experience Platform (UXP) for
Digital Transformation.

On Sun, Mar 4, 2018 at 5:51 AM, Jean-Baptiste Onofré 
wrote:

> Hi Serge,
>
> I think that the problem is that wrap should be a bootFeature in early
> stage
> compared to the Unomi router.
>
> Can you check (in the @Config) the org.apache.karaf.feature.cfg (if wrap
> is at
> first stage) ?
>
> More over, I would install unomi feature using executeCommand or feature
> service
> (with @Inject) to be sure to be "in" Karaf.
>
> Regards
> JB
>
> On 03/03/2018 04:31 PM, Serge Huber wrote:
> > Hello,
> >
> > I'm struggling getting Apache Unomi tests to work since I migrated from
> Karaf 3
> > to Karaf 4.
> >
> > Here is the error I am getting in the logs:
> >
> > *2018-03-02T17:01:54,018 | ERROR | pool-1-thread-2  |
> BootFeaturesInstaller
> >   | 10 - org.apache.karaf.features.core - 4.1.5 | Error installing
> boot
> > features*
> >
> > *org.apache.karaf.features.internal.util.MultiException: Error:*
> >
> > *Error downloading
> > wrap:file:/Users/loom/.m2/repository/org/apache/kafka/kafka-clients/
> 0.10.1.0/kafka-clients-0.10.1.0.jar
> > *
> >
> > *Error downloading
> > wrap:file:/Users/loom/.m2/repository/org/apache/kafka/kafka-clients/
> 0.10.1.0/kafka-clients-0.10.1.0.jar
> > *
> >
> > *at
> > org.apache.karaf.features.internal.download.impl.MavenDownloadManager$
> MavenDownloader.(MavenDownloadManager.java:84)
> > ~[?:?]*
> >
> > *at
> > org.apache.karaf.features.internal.download.impl.MavenDownloadManager.
> createDownloader(MavenDownloadManager.java:72)
> > ~[?:?]*
> >
> > *at
> > org.apache.karaf.features.internal.region.Subsystem.
> downloadBundles(Subsystem.java:375)
> > ~[?:?]*
> >
> > *at
> > org.apache.karaf.features.internal.region.Subsystem.
> downloadBundles(Subsystem.java:372)
> > ~[?:?]*
> >
> > *at
> > org.apache.karaf.features.internal.region.SubsystemResolver.resolve(
> SubsystemResolver.java:187)
> > ~[?:?]*
> >
> > *at
> > org.apache.karaf.features.internal.service.Deployer.
> deploy(Deployer.java:291)
> > ~[?:?]*
> >
> > *at
> > org.apache.karaf.features.internal.service.FeaturesServiceImpl.
> doProvision(FeaturesServiceImpl.java:1248)
> > ~[?:?]*
> >
> > *at
> > org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$
> doProvisionInThread$1(FeaturesServiceImpl.java:1147)
> > ~[?:?]*
> >
> > *at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> [?:?]*
> >
> > *at
> > java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1142)
> > [?:?]*
> >
> > *at
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:617)
> > [?:?]*
>

Re: Unable to install some features as bootFeature in Karaf4

2018-03-03 Thread Jean-Baptiste Onofré
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é
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: Help needed with Karaf 4 Integration test writing

2018-03-03 Thread Jean-Baptiste Onofré
Hi Serge,

I think that the problem is that wrap should be a bootFeature in early stage
compared to the Unomi router.

Can you check (in the @Config) the org.apache.karaf.feature.cfg (if wrap is at
first stage) ?

More over, I would install unomi feature using executeCommand or feature service
(with @Inject) to be sure to be "in" Karaf.

Regards
JB

On 03/03/2018 04:31 PM, Serge Huber wrote:
> Hello,
> 
> I'm struggling getting Apache Unomi tests to work since I migrated from Karaf 
> 3
> to Karaf 4. 
> 
> Here is the error I am getting in the logs:
> 
> *2018-03-02T17:01:54,018 | ERROR | pool-1-thread-2  | BootFeaturesInstaller   
>   
>       | 10 - org.apache.karaf.features.core - 4.1.5 | Error installing boot
> features*
> 
> *org.apache.karaf.features.internal.util.MultiException: Error:*
> 
> *        Error downloading
> wrap:file:/Users/loom/.m2/repository/org/apache/kafka/kafka-clients/0.10.1.0/kafka-clients-0.10.1.0.jar
> *
> 
> *        Error downloading
> wrap:file:/Users/loom/.m2/repository/org/apache/kafka/kafka-clients/0.10.1.0/kafka-clients-0.10.1.0.jar
> *
> 
> *        at
> org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.(MavenDownloadManager.java:84)
> ~[?:?]*
> 
> *        at
> org.apache.karaf.features.internal.download.impl.MavenDownloadManager.createDownloader(MavenDownloadManager.java:72)
> ~[?:?]*
> 
> *        at
> org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:375)
> ~[?:?]*
> 
> *        at
> org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:372)
> ~[?:?]*
> 
> *        at
> org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:187)
> ~[?:?]*
> 
> *        at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:291)
> ~[?:?]*
> 
> *        at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1248)
> ~[?:?]*
> 
> *        at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$1(FeaturesServiceImpl.java:1147)
> ~[?:?]*
> 
> *        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]*
> 
> *        at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> [?:?]*
> 
> *        at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> [?:?]*
> 
> *        at java.lang.Thread.run(Thread.java:745) [?:?]*
> 
> *        Suppressed: java.io.IOException: Error downloading
> wrap:file:/Users/loom/.m2/repository/org/apache/kafka/kafka-clients/0.10.1.0/kafka-clients-0.10.1.0.jar
> *
> 
> *                at
> org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:77)
> [10:org.apache.karaf.features.core:4.1.5]*
> 
> *                at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]*
> 
> *                at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
> [?:?]*
> 
> *                at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
> [?:?]*
> 
> *                at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
> [?:?]*
> 
> *                at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> [?:?]*
> 
> *                at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> [?:?]*
> 
> *                at java.lang.Thread.run(Thread.java:745) [?:?]*
> 
> *        Caused by: java.io.IOException: Could not download
> [wrap:file:/Users/loom/.m2/repository/org/apache/kafka/kafka-clients/0.10.1.0/kafka-clients-0.10.1.0.jar
> ]*
> 
> *                at
> org.apache.karaf.features.internal.download.impl.SimpleDownloadTask.download(SimpleDownloadTask.java:90)
> ~[?:?]*
> 
> *                at
> org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:60)
> ~[?:?]*
> 
> *                ... 7 more*
> 
> *        Caused by: java.net.MalformedURLException: Unknown protocol: wrap*
> 
> *                at java.net.URL.(URL.java:627) ~[?:?]*
> 
> *                at java.net.URL.(URL.java:490) ~[?:?]*
> 
> *                at java.net.URL.(URL.java:439) ~[?:?]*
> 
> *                at
> org.apache.karaf.features.internal.download.impl.SimpleDownloadTask.download(SimpleDownloadTask.java:62)
> ~[?:?]*
> 
> *                at
> org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:60)
> ~[?:?]*
> 
> *                ... 7 more*
> 
> *        Caused by: java.lang.IllegalStateEx

Re: Unable to install some features as bootFeature in Karaf4

2018-03-03 Thread Francois Papon
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



Unable to install some features as bootFeature in Karaf4

2018-03-03 Thread sathish_alwar
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: Help needed with Karaf 4 Integration test writing

2018-03-03 Thread Oliver Lietz
On Saturday 03 March 2018 16:31:53 Serge Huber wrote:
> Hello,

Hi Serge,

> I'm struggling getting Apache Unomi tests to work since I migrated from
> Karaf 3 to Karaf 4.
> 
> Here is the error I am getting in the logs:
> 
> *2018-03-02T17:01:54,018 | ERROR | pool-1-thread-2  |
> BootFeaturesInstaller| 10 - org.apache.karaf.features.core -
> 4.1.5 | Error installing boot features*
> 
> *org.apache.karaf.features.internal.util.MultiException: Error:*
> 
> *Error downloading
> wrap:file:/Users/loom/.m2/repository/org/apache/kafka/kafka-clients/0.10.1.0
> /kafka-clients-0.10.1.0.jar *
> 
> *Error downloading
> wrap:file:/Users/loom/.m2/repository/org/apache/kafka/kafka-clients/0.10.1.0
> /kafka-clients-0.10.1.0.jar *
> 
> *at
> org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenD
> ownloader.(MavenDownloadManager.java:84) ~[?:?]*
> 
> *at
> org.apache.karaf.features.internal.download.impl.MavenDownloadManager.create
> Downloader(MavenDownloadManager.java:72) ~[?:?]*
> 
> *at
> org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsyste
> m.java:375) ~[?:?]*
> 
> *at
> org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsyste
> m.java:372) ~[?:?]*
> 
> *at
> org.apache.karaf.features.internal.region.SubsystemResolver.resolve(Subsyste
> mResolver.java:187) ~[?:?]*
> 
> *at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:291
> ) ~[?:?]*
> 
> *at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(F
> eaturesServiceImpl.java:1248) ~[?:?]*
> 
> *at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProv
> isionInThread$1(FeaturesServiceImpl.java:1147) ~[?:?]*
> 
> *at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]*
> 
> *at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11
> 42) [?:?]*
> 
> *at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6
> 17) [?:?]*
> 
> *at java.lang.Thread.run(Thread.java:745) [?:?]*
> 
> *Suppressed: java.io.IOException: Error downloading
> wrap:file:/Users/loom/.m2/repository/org/apache/kafka/kafka-clients/0.10.1.0
> /kafka-clients-0.10.1.0.jar *
> 
> *at
> org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTa
> sk.run(AbstractRetryableDownloadTask.java:77)
> [10:org.apache.karaf.features.core:4.1.5]*
> 
> *at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> [?:?]*
> 
> *at
> java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]*
> 
> *at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$
> 201(ScheduledThreadPoolExecutor.java:180) [?:?]*
> 
> *at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Sch
> eduledThreadPoolExecutor.java:293) [?:?]*
> 
> *at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11
> 42) [?:?]*
> 
> *at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6
> 17) [?:?]*
> 
> *at java.lang.Thread.run(Thread.java:745) [?:?]*
> 
> *Caused by: java.io.IOException: Could not download
> [wrap:file:/Users/loom/.m2/repository/org/apache/kafka/kafka-clients/0.10.1.
> 0/kafka-clients-0.10.1.0.jar ]*
> 
> *at
> org.apache.karaf.features.internal.download.impl.SimpleDownloadTask.download
> (SimpleDownloadTask.java:90) ~[?:?]*
> 
> *at
> org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTa
> sk.run(AbstractRetryableDownloadTask.java:60) ~[?:?]*
> 
> *... 7 more*
> 
> *Caused by: java.net.MalformedURLException: Unknown protocol: wrap*
> 
> *at java.net.URL.(URL.java:627) ~[?:?]*
> 
> *at java.net.URL.(URL.java:490) ~[?:?]*
> 
> *at java.net.URL.(URL.java:439) ~[?:?]*
> 
> *at
> org.apache.karaf.features.internal.download.impl.SimpleDownloadTask.download
> (SimpleDownloadTask.java:62) ~[?:?]*
> 
> *at
> org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTa
> sk.run(AbstractRetryableDownloadTask.java:60) ~[?:?]*
> 
> *... 7 more*
> 
> *Caused by: java.lang.IllegalStateException: Unknown protocol: wrap*
> 
> *at
> org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHandler
> sStreamHandlerProxy.java:373) ~[?:?]*
> 
> *at java.net.URL.(URL.java:622) ~[?:?]*
> 
> *at java.net.URL.(URL.java:490) ~[?:?]*
> 
> *

Help needed with Karaf 4 Integration test writing

2018-03-03 Thread Serge Huber
Hello,

I'm struggling getting Apache Unomi tests to work since I migrated from
Karaf 3 to Karaf 4.

Here is the error I am getting in the logs:

*2018-03-02T17:01:54,018 | ERROR | pool-1-thread-2  |
BootFeaturesInstaller| 10 - org.apache.karaf.features.core -
4.1.5 | Error installing boot features*

*org.apache.karaf.features.internal.util.MultiException: Error:*

*Error downloading
wrap:file:/Users/loom/.m2/repository/org/apache/kafka/kafka-clients/0.10.1.0/kafka-clients-0.10.1.0.jar
*

*Error downloading
wrap:file:/Users/loom/.m2/repository/org/apache/kafka/kafka-clients/0.10.1.0/kafka-clients-0.10.1.0.jar
*

*at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.(MavenDownloadManager.java:84)
~[?:?]*

*at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager.createDownloader(MavenDownloadManager.java:72)
~[?:?]*

*at
org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:375)
~[?:?]*

*at
org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:372)
~[?:?]*

*at
org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:187)
~[?:?]*

*at
org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:291)
~[?:?]*

*at
org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1248)
~[?:?]*

*at
org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$1(FeaturesServiceImpl.java:1147)
~[?:?]*

*at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]*

*at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[?:?]*

*at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[?:?]*

*at java.lang.Thread.run(Thread.java:745) [?:?]*

*Suppressed: java.io.IOException: Error downloading
wrap:file:/Users/loom/.m2/repository/org/apache/kafka/kafka-clients/0.10.1.0/kafka-clients-0.10.1.0.jar
*

*at
org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:77)
[10:org.apache.karaf.features.core:4.1.5]*

*at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[?:?]*

*at
java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]*

*at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
[?:?]*

*at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
[?:?]*

*at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[?:?]*

*at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[?:?]*

*at java.lang.Thread.run(Thread.java:745) [?:?]*

*Caused by: java.io.IOException: Could not download
[wrap:file:/Users/loom/.m2/repository/org/apache/kafka/kafka-clients/0.10.1.0/kafka-clients-0.10.1.0.jar
]*

*at
org.apache.karaf.features.internal.download.impl.SimpleDownloadTask.download(SimpleDownloadTask.java:90)
~[?:?]*

*at
org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:60)
~[?:?]*

*... 7 more*

*Caused by: java.net.MalformedURLException: Unknown protocol: wrap*

*at java.net.URL.(URL.java:627) ~[?:?]*

*at java.net.URL.(URL.java:490) ~[?:?]*

*at java.net.URL.(URL.java:439) ~[?:?]*

*at
org.apache.karaf.features.internal.download.impl.SimpleDownloadTask.download(SimpleDownloadTask.java:62)
~[?:?]*

*at
org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:60)
~[?:?]*

*... 7 more*

*Caused by: java.lang.IllegalStateException: Unknown protocol: wrap*

*at
org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHandlersStreamHandlerProxy.java:373)
~[?:?]*

*at java.net.URL.(URL.java:622) ~[?:?]*

*at java.net.URL.(URL.java:490) ~[?:?]*

*at java.net.URL.(URL.java:439) ~[?:?]*

*at
org.apache.karaf.features.internal.download.impl.SimpleDownloadTask.download(SimpleDownloadTask.java:62)
~[?:?]*

*at
org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:60)
~[?:?]*

*... 7 more*

Here is