Re: Bundles needed to use DS/SCR

2016-08-10 Thread Benson Margulies
I see a much dumber mistake here. Sorry for the noise. The test is not pushing the config to the right PID at all. On Wed, Aug 10, 2016 at 11:43 AM, Benson Margulies wrote: > On Wed, Aug 10, 2016 at 11:35 AM, David Jencks > wrote: >> As

Re: Bundles needed to use DS/SCR

2016-08-10 Thread David Jencks
As discussed on another thread today, this one-arg getConfiguration call nails the configuration to the bundle doing the calling, which usually isn’t what you want since it usually isn’t the bundle with the component you’re trying to configure. Use the 2-arg getConfiguration method passing

Re: Bundles needed to use DS/SCR

2016-08-10 Thread Benson Margulies
Configuration-wise, I have the following code. Logging-wise, I have pax-exam installing logging, but I will recheck that. org.osgi.service.cm.Configuration workerConf = configurationAdmin.getConfiguration("com.basistech.ws.worker"); Dictionary props = new Hashtable<>(); Path

Re: Bundles needed to use DS/SCR

2016-08-10 Thread Benson Margulies
On Wed, Aug 10, 2016 at 11:35 AM, David Jencks wrote: > As discussed on another thread today, this one-arg getConfiguration call > nails the configuration to the bundle doing the calling, which usually isn’t > what you want since it usually isn’t the bundle with

Re: Cannot use configuration pid ... for bundle XX because it belongs to bundle YY

2016-08-10 Thread Carsten Ziegeler
> Carsten, are you sure about null and not the literal string "?" Hi, both work - if you have a configuration admin supporting multi locations (the "?"). But as that is in there for some time, you probably have it. null works in any case and does not change the location at all - that's why I

Re: Cannot use configuration pid ... for bundle XX because it belongs to bundle YY

2016-08-10 Thread Carsten Ziegeler
> Did not find any annotation in those components, they actually get configured > using the ConfigurationAdmin. > > Error: > pid=com.kuka.authorizationService.component for bundle 7 because it belongs > to bundle 77> > > OSGI-LIB\*.xml: > http://www.osgi.org/xmlns/scr/v1.1.0; >

Re: Cannot use configuration pid ... for bundle XX because it belongs to bundle YY

2016-08-10 Thread David Jencks
null works, ds < 2.0.4 will (except for unusual situations not likely here) set the bundle location to the using bundle, ds >-2.0.4 will leave it null. This will “claim” the configuration for the using bundle. ? works with a R5+ config admin and multiple bundles can use the configuration.

Re: Bundles needed to use DS/SCR

2016-08-10 Thread Benson Margulies
I have some more information. While I still don't know where my log message are going, I turned on the gogo remote shell. According to scr:info, my component is alive. However, I can't obtain a service reference to the service it exports with a plain old ServiceTracker or call to my bundle

Re: Bundles needed to use DS/SCR

2016-08-10 Thread Carsten Ziegeler
Just guessing but you have: > Configuration Policy: require Do you have a configuration for this component in config admin? Carsten -- Carsten Ziegeler Adobe Research Switzerland cziege...@apache.org - To unsubscribe,

Re: Cannot use configuration pid ... for bundle XX because it belongs to bundle YY

2016-08-10 Thread Raymond Auge
Carsten, are you sure about null and not the literal string "?" - Ray On Wed, Aug 10, 2016 at 9:57 AM, Carsten Ziegeler wrote: > > Did not find any annotation in those components, they actually get > configured using the ConfigurationAdmin. > > > > Error: > > >

Bundles needed to use DS/SCR

2016-08-10 Thread Benson Margulies
For unit testing purposes, I'm setting up a minimal container that has DS/SCR . I included: org.apache.felix org.apache.felix.scr 2.0.6 I set the framework ds.loglevel property to debug, and I see no sign of life. I'm using standard OSGi DS annotations. Can anyone tell me what I'm missing?

RE: Cannot use configuration pid ... for bundle XX because it belongs to bundle YY

2016-08-10 Thread Remo Liechti
Did not find any annotation in those components, they actually get configured using the ConfigurationAdmin. Error: OSGI-LIB\*.xml: http://www.osgi.org/xmlns/scr/v1.1.0; activate="activate" configuration-policy="require" deactivate="deactivate" immediate="true"

Re: Bundles needed to use DS/SCR

2016-08-10 Thread David Jencks
> Configuration Policy: require > (No Component Configurations) You need a configuration or change the configuration policy. Is your minimal container so minimal that it doesn’t include a log service or something to collect messages from it? david jencks > On Aug 10, 2016, at 8:14 AM, Benson

Cannot use configuration pid ... for bundle XX because it belongs to bundle YY

2016-08-10 Thread Remo Liechti
Hi guys During starting of bundles I get the following message: What does this actually mean? I have not found good information with uncle sams google. What I do, is the following: - Wrap an osgi application into a j2ee web application (war file) - Using Felix on Weblogic:

Re: Bundles needed to use DS/SCR

2016-08-10 Thread Benson Margulies
For one of my tests, pax-exam-cm looks great. Do I include felix config admin with it or not? For another, I need each test method to have different configuration, so I'd have to make multiple test classes, no? - To unsubscribe,

Re: Registering a ConfigurationListener

2016-08-10 Thread Benson Margulies
On Wed, Aug 10, 2016 at 5:44 PM, David Jencks wrote: > I can’t think of any circumstances where you’d want to register with the > system bundle, normally you’d register with the bundle interested in the > configuration. It won’t make any difference unless you

Re: Cannot use configuration pid ... for bundle XX because it belongs to bundle YY

2016-08-10 Thread Benson Margulies
In my experience, it means that you have annotated two different classes with @Component and specified the same configurationPid. You can't do that; if you need to share a configuration between DS components, you have to inject the ConfigurationAdmin service instead of using the @Component

Re: Bundles needed to use DS/SCR

2016-08-10 Thread Oliver Lietz
On Wednesday 10 August 2016 11:29:00 Benson Margulies wrote: > Configuration-wise, I have the following code. Logging-wise, I have > pax-exam installing logging, but I will recheck that. > > > org.osgi.service.cm.Configuration workerConf = >