Re: K406 breaks custom distribution on ARM

2016-09-14 Thread Jean-Baptiste Onofré
Hmmm, ok, thanks. I don't remember we upgraded Jansi for 4.0.6. I gonna check and eventually downgrade. I will let you know. Regards JB On 09/15/2016 07:46 AM, Markus Rathgeb wrote: Hi JB, as written above K405 works fine. K406 doesn't work. Best regards, Markus -- Jean-Baptiste Onofré

Re: K406 breaks custom distribution on ARM

2016-09-14 Thread Markus Rathgeb
Hi JB, as written above K405 works fine. K406 doesn't work. Best regards, Markus

Re: K406 breaks custom distribution on ARM

2016-09-14 Thread Jean-Baptiste Onofré
Hi Markus, It seems that the "new" libjansi (using the shell) is no more ARM compliant. What's the last version of Karaf you used on ARM ? Regards JB On 09/14/2016 09:27 PM, Markus Rathgeb wrote: Hello, I tested also the official Karaf 4.0.6 distribution (the archive

Re: Features Core bundle stuck in "Resolved" state

2016-09-14 Thread David Jencks
Guillaume’s feature example doesn’t look to me like it requires the pax-jdbc-config bundle as a dependency or prerequisite or content (not sure of the correct karaf terminology). However, as long as the pax bundle is installed, it will in fact make that feature provide the datasource(s). This

Re: Features Core bundle stuck in "Resolved" state

2016-09-14 Thread oski_bear
OK but in this case it's actually pax-jdbc-config that is providing/registering the service and the feature that I am defining that requires the service. Are you proposing that I workaround this problem by having the feature that requires the service also declare that it provides it as a

Re: DS and immediate and configurationPolicy == REQUIRE

2016-09-14 Thread Benson Margulies
On Wed, Sep 14, 2016 at 5:21 PM, David Jencks wrote: > Well there’s also references…. but if all the required references (using > possible target filter properties from the configuration) are satisfied then > it should start up when the configuration event arrives. At

Re: DS and immediate and configurationPolicy == REQUIRE

2016-09-14 Thread David Jencks
Well there’s also references…. but if all the required references (using possible target filter properties from the configuration) are satisfied then it should start up when the configuration event arrives. At least it will create the manager and look around for the references. Note that the

RE: Configuration Admin

2016-09-14 Thread Leschke, Scott
Like I said, fileinstall itself isn’t really my concern but I think I have my answer. Somehow I missed that listConfigurations took a filter, which is what I want I believe. I think I just kind of focused in on getConfiguration and zoned that out. Thanks for pointing that out. Just as a

Re: Configuration Admin

2016-09-14 Thread David Jencks
Then someone should fix the metatype….. david jencks > On Sep 14, 2016, at 12:39 PM, Guillaume Nodet wrote: > > Actually and fwiw, FileInstall registers a ManagedServiceFactory, not a > ManagedService. > See >

Re: Configuration Admin

2016-09-14 Thread Guillaume Nodet
Actually and fwiw, FileInstall registers a ManagedServiceFactory, not a ManagedService. See https://github.com/apache/felix/blob/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/FileInstall.java#L342 2016-09-14 21:15 GMT+02:00 David Jencks : > > >

Re: Invalid Bundle Context errors with 4.0.6, unpredictably

2016-09-14 Thread Guillaume Nodet
Such an error is caused by the bundle being stopped / refreshed / updated, so the reason should appear in the log. 2016-09-14 21:10 GMT+02:00 Benson Margulies : > I don't know of any reason for a refresh. The structure is always that > I have a Karaf assembly; the test

Re: K406 breaks custom distribution on ARM

2016-09-14 Thread Markus Rathgeb
Hello, I tested also the official Karaf 4.0.6 distribution (the archive "apache-karaf-4.0.6.tar.gz" from your homepage). The problem exists there, too. Is ARM not supported anymore or is this a bug? === 2016-09-14 19:25:16,104 | ERROR | pool-7-thread-1 | BootFeaturesInstaller| 8 -

K406 breaks custom distribution on ARM

2016-09-14 Thread Markus Rathgeb
Hello, I created a custom Karaf distribution using Karaf 4.0.5 since the release of this version. The custom distribution is created on a x86_64 linux machine. It run it on x86 and arm linux machines for a while. Recently I switched to Karaf 4.0.6 and I realized no problem. But today I tried to

Re: Configuration Admin

2016-09-14 Thread David Jencks
> On Sep 14, 2016, at 11:49 AM, Leschke, Scott wrote: > > Like I said, fileinstall was just used as an example. I’m not really > interested in fileinstall although as far as I understand, if there are > mulitiple org.apache.felix.fileinstall_*.cfg files, say >

Re: Invalid Bundle Context errors with 4.0.6, unpredictably

2016-09-14 Thread Benson Margulies
I don't know of any reason for a refresh. The structure is always that I have a Karaf assembly; the test launches it and then tests web services that it publishes. No test involves any updating or deploying features or bundles. On Wed, Sep 14, 2016 at 2:59 PM, Guillaume Nodet

Re: Question regarding .cfg files and configuration records

2016-09-14 Thread Guillaume Nodet
I would consider that a file install bug ... Given file install store the file name in the config, it should be able to see if it has been deleted when restarting. 2016-09-14 16:51 GMT+02:00 Leschke, Scott : > I’ve noticed that if a .cfg file is deleted while Karaf is

Re: Invalid Bundle Context errors with 4.0.6, unpredictably

2016-09-14 Thread Guillaume Nodet
If your test deploys certain bundles such as eventadmin, it can cause pax-logging-api to be refreshed, which in turn cause almost all bundles to be refreshed, which can cause such problems. If that's the case, you should consider deploying eventamin at the startup stage somehow to avoid the

Re: Invalid Bundle Context errors with 4.0.6, unpredictably

2016-09-14 Thread Jean-Baptiste Onofré
Hi Benson Don't you have any refresh in test ? Most the time invalid bundle context is caused by a refresh. So the "initial" bundle context is no more valid. Regards JB On Sep 14, 2016, 20:54, at 20:54, Benson Margulies wrote: >Folks, > >One of my pax-exam tests

Invalid Bundle Context errors with 4.0.6, unpredictably

2016-09-14 Thread Benson Margulies
Folks, One of my pax-exam tests _sometimes_ fails with the backtrace below; to be more precise, it hangs after showing this backtrace on the console. It seems as if this only happens when all of my ITs run; if I tell failsafe to just run one, it seems never to happen. Any ideas? TIA

RE: Configuration Admin

2016-09-14 Thread Leschke, Scott
Like I said, fileinstall was just used as an example. I’m not really interested in fileinstall although as far as I understand, if there are mulitiple org.apache.felix.fileinstall_*.cfg files, say org.apache.felix.fileinstall_1.cfg and org.apache.felix.fileinstall_2.cfg there will be one

Re: Configuration Admin

2016-09-14 Thread David Jencks
I doubt I understand your question as written, as fileinstall has a pid rather than a factory pid you can only have one configuration for it. Assuming you actually want to configure multiple configurations for a given factory pid, - I’d advise you to write a management agent that uses the

Configuration Admin

2016-09-14 Thread Leschke, Scott
Not specifically a Karaf question but I'll start here. If I would like to be able to modify the component instance configurations (created from a factory) programmatically, but from the CA api, it's unclear to me how I associate a configuration record to its corresponding instance? As an

Re: Looking for help using service reference with "#" in OSGi

2016-09-14 Thread Jens Reimann
Thanks for that explanation. Unfortunately the reason why I wanted to use that is that I have multiple services with the name interface registered and wanted to use the reference as a filter for choosing the right one. So the best thing would be if I could specify a filter expression instead.

Re: Looking for help using service reference with "#" in OSGi

2016-09-14 Thread John Poth
Hi Jens, The '#' symbol in Camel denotes a reference [1] which Camel will then try to lookup in it's registries [2]. In an OSGI environment, Camel will lookup the reference in the OsgiServiceRegistry [3] which thanks to [4] will try to look up the OSGI service by class name AND service PID :).

Question regarding .cfg files and configuration records

2016-09-14 Thread Leschke, Scott
I've noticed that if a .cfg file is deleted while Karaf is running, the associated configuration record is deleted from Configuration Admin as well. OTOH, if the file is deleted while Karaf is NOT running, the associated configuration record is retained. I would have expected that records for

Re: Running Karaf assembly from Maven

2016-09-14 Thread Jens Reimann
Maybe have a look at the source code of that plugin [1], I am not 100% sure .. but to me it looks like the maven plugin actually runs the karaf instance inside the same JVM instance. [1]

Re: Running Karaf assembly from Maven

2016-09-14 Thread David Daniel
Ok thank you. I thought the native container didn't and only the forked container did but I do run the forked container. On Wed, Sep 14, 2016 at 9:09 AM, Achim Nierbeck wrote: > Pax-Exam does actually fork a process unless you do some extra > configuration, which will

Re: Running Karaf assembly from Maven

2016-09-14 Thread Achim Nierbeck
Pax-Exam does actually fork a process unless you do some extra configuration, which will prevent executing multiple tests in one go. regards, Achim 2016-09-14 15:07 GMT+02:00 David Daniel : > Pax exam has a container that works with maven and bndtools is working on

Re: Running Karaf assembly from Maven

2016-09-14 Thread David Daniel
Pax exam has a container that works with maven and bndtools is working on a maven one this release. I don't think karaf is forcing a process fork On Sep 14, 2016 9:00 AM, "Benson Margulies" wrote: > Jens, Karaf is going to fork a new java process. So launching maven with >

Re: Running Karaf assembly from Maven

2016-09-14 Thread Achim Nierbeck
exactly, at this point you're just debugging the maven process ... not the karaf one :) regards, Achim 2016-09-14 15:00 GMT+02:00 Benson Margulies : > Jens, Karaf is going to fork a new java process. So launching maven with > debugging won't give you debugging inside of

Re: Running Karaf assembly from Maven

2016-09-14 Thread Benson Margulies
Jens, Karaf is going to fork a new java process. So launching maven with debugging won't give you debugging inside of Karaf. On Wed, Sep 14, 2016 at 8:42 AM, Jens Reimann wrote: > Well that defies the purpose of starting maven in debug mode in the first > place. > > With

Re: Running Karaf assembly from Maven

2016-09-14 Thread Jens Reimann
Well that defies the purpose of starting maven in debug mode in the first place. With Eclipse you can start Maven directly in the debugger, so that the Maven task you are running is getting debugged. The Karaf plugin seems to run the OSGi container directly in the Maven plugin, so it can be

Re: Running Karaf assembly from Maven

2016-09-14 Thread Benson Margulies
Run the exec-maven-plugin to run the 'karaf debug' command if you can't configure eclipse to just run a shell command. On Wed, Sep 14, 2016 at 8:16 AM, Jens Reimann wrote: > Sure, that could be workaround. If there would be a way to run karaf from > maven, then such a

Re: Running Karaf assembly from Maven

2016-09-14 Thread Jens Reimann
Sure, that could be workaround. If there would be a way to run karaf from maven, then such a workaround would not be possible and full IDE integration would be available. Which brings me back to my original question if such a thing is possible. And if, then how? On Wed, Sep 14, 2016 at 2:00 PM,

Re: Running Karaf assembly from Maven

2016-09-14 Thread Achim Nierbeck
call karaf debug and attach eclipse to the opened port is an alternative 2016-09-14 13:57 GMT+02:00 Jens Reimann : > Yes, that is then not executed by the Eclipse maven runner .. just a shell > script. So debugging will not be set up. > > On Wed, Sep 14, 2016 at 1:44 PM,

Re: Running Karaf assembly from Maven

2016-09-14 Thread Jens Reimann
Yes, that is then not executed by the Eclipse maven runner .. just a shell script. So debugging will not be set up. On Wed, Sep 14, 2016 at 1:44 PM, Benson Margulies wrote: > Some problem with typing: > > target/assembly/bin/karaf > > ? > > > > On Wed, Sep 14, 2016 at 6:48

Re: Running Karaf assembly from Maven

2016-09-14 Thread Benson Margulies
Some problem with typing: target/assembly/bin/karaf ? On Wed, Sep 14, 2016 at 6:48 AM, Benson Margulies wrote: > Is your goal to start one up and then run tests against it? If so, I have > some other suggestions. > > On Wed, Sep 14, 2016 at 5:17 AM, Jens Reimann

Re: Running Karaf assembly from Maven

2016-09-14 Thread Jens Reimann
Well but I don't want to run unit tests! I do want to run the final Karaf distribution. Including the ability to start and stop bundles using the console. As far as I understood Pax exam is for unit testing. With no manual interaction. On Wed, Sep 14, 2016 at 1:05 PM, David Daniel

Re: Running Karaf assembly from Maven

2016-09-14 Thread David Daniel
Pax exam will run karaf and be setup to include your custom features. It is how I do integration testing On Sep 14, 2016 5:18 AM, "Jens Reimann" wrote: > Hi, > > There seems to be a goal for maven "karaf:run" which can run a single > bundle. But is there some way to run a

Re: Running Karaf assembly from Maven

2016-09-14 Thread Jean-Baptiste Onofré
Pax exam is better for this. All depends of the use case. On Sep 14, 2016, 12:49, at 12:49, Benson Margulies wrote: >Is your goal to start one up and then run tests against it? If so, I >have >some other suggestions. > >On Wed, Sep 14, 2016 at 5:17 AM, Jens Reimann

Re: Running Karaf assembly from Maven

2016-09-14 Thread Jens Reimann
My goal is to run it out of Eclipse, assembling a distribution and test-running it. AFAIR Eclipse can run a Maven target with debugging set up, it should be possible to test-run the final Karaf distribution with debugging support. On Wed, Sep 14, 2016 at 12:48 PM, Benson Margulies

Re: Running Karaf assembly from Maven

2016-09-14 Thread Benson Margulies
Is your goal to start one up and then run tests against it? If so, I have some other suggestions. On Wed, Sep 14, 2016 at 5:17 AM, Jens Reimann wrote: > Hi, > > There seems to be a goal for maven "karaf:run" which can run a single > bundle. But is there some way to run a

Re: Running Karaf assembly from Maven

2016-09-14 Thread Jean-Baptiste Onofré
Hi Jens Run can run a complete karaf distribution (I blogged about it, let me find it out). Regards JB On Sep 14, 2016, 11:18, at 11:18, Jens Reimann wrote: >Hi, > >There seems to be a goal for maven "karaf:run" which can run a single >bundle. But is there some way to

Running Karaf assembly from Maven

2016-09-14 Thread Jens Reimann
Hi, There seems to be a goal for maven "karaf:run" which can run a single bundle. But is there some way to run a karaf assembly, directly from maven. Thanks for your help Jens -- Jens Reimann Senior Software Engineer / EMEA ENG Middleware Werner-von-Siemens-Ring 14 85630 Grasbrunn Germany

Re: Features Core bundle stuck in "Resolved" state

2016-09-14 Thread Guillaume Nodet
The Karaf features service is somewhat similar to the subsystem service. So yes, the Import-Service is used by the features service to resolve the bundles that need to be installed. Removing the Import-Service header is one way to solve the problem. Another one would be to include the