You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by David Leangen <ap...@leangen.net> on 2016/05/04 04:58:45 UTC

Bundle startup

Hi!

When I start up Karaf, all my bundles are activated, but a component service is one bundle is not enabled.

The service does not start because it is not provided with a UserAdmin. Judging by the ordering, this is surely true when the system starts.

When I log into the console (after all bundles have activated), I can see that there is indeed a UserAdmin. If I restart my bundle, the UserAdmin dependency is wired and my component gets enabled. If I restart the container after that, there are no problems. This problem only occurs upon initial startup.


I suspect this is a bug with SCR. Likely, after the initial try, it does not try to activate the component again even if it finds a UserAdmin. But before I file a bug, does anybody have any suggestions as to how I can confirm?


Thanks!
=David



Re: Bundle startup

Posted by David Leangen <ap...@leangen.net>.
Salut JB,

Unfortunately, it is not optional, though. :-)

The OAuthUserAdmin simply won’t work without a “normal” UserAdmin present, as it wraps the UA and delegates to it.


Cheers,
=David


> On May 4, 2016, at 3:00 PM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
> 
> UserAdmin reference is optional ?
> 
> Regards
> JB


Re: Bundle startup

Posted by David Leangen <ap...@leangen.net>.
Salut JB,

Unfortunately, it is not optional, though. :-)

The OAuthUserAdmin simply won’t work without a “normal” UserAdmin present, as it wraps the UA and delegates to it.


Cheers,
=David


> On May 4, 2016, at 3:00 PM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
> 
> UserAdmin reference is optional ?
> 
> Regards
> JB


Re: Bundle startup

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
UserAdmin reference is optional ?

Regards
JB

On 05/04/2016 07:52 AM, David Leangen wrote:
> Hi Christian,
>
> Here is an edited excerpt of the generated manifest:
>
> Export-Package:
> 	mypackage.oauth2;version="0.2.0\u201d,
> 	org.osgi.service.useradmin;version="1.1";uses:="org.osgi.framework"
>
> Import-Package:
> 	javax.net,javax.net.ssl,javax.security.auth.x500,
> 	mypackage.oauth2;
> 	version="[0.2,0.3)",org.osgi.framework;version="[1.8,2)\u201d,
> 	org.osgi.service.component;version="[1.3,2)\u201d,
> 	org.osgi.service.useradmin;version="[1.1,1.2)"
>
>
> By the way, adding the exclusionary filter to the UserAdmin reference did not seem to rectify the problem. :-(
>
>
> Cheers,
> =David
>
>
>> On May 4, 2016, at 2:43 PM, Christian Schneider <ch...@die-schneider.net> wrote:
>>
>> Maybe it is also an issue of a duplicate package export. Does your bundle maybe export but not import the UserAdmin package? In this case it would see a different instance of the package and would not be able to see the original UserAdmin.
>>
>> Christian
>>
>

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

Re: Bundle startup

Posted by David Leangen <ap...@leangen.net>.
I wonder if this isn’t the same problem identified back in August / September of last year? The symptoms seem to be very similar...

The last post in the thread was yours:

>  I haven't been able to reproduce the problem from your description and pasted code, and if you attached it I think it got removed by the mailing list.  If you still have any artifacts related to this (maybe attached to the sent message?) could you send them to me off list?


  https://groups.google.com/forum/#!topic/bndtools-users/iClisFYreDI <https://groups.google.com/forum/#!topic/bndtools-users/iClisFYreDI>


I would be happy to grant you access. Please let me know off-list how you would like to set that up. :-)

Cheers,
=David


> On May 5, 2016, at 12:35 PM, David Jencks <da...@gmail.com> wrote:
> 
> I’m mystified at this point, I’ve never seen this problem.  If you want to figure out what is going on I would suggest debugging ListenerInfo.serviceChanged to see if the service event makes it into DS at all and if so why it doesn’t get to the correct dependency manager.  Otherwise I wonder if you can provide some kind of test project I could look at?
> 
> thanks
> david jencks
> 
>> On May 4, 2016, at 7:10 PM, David Leangen <apache@leangen.net <ma...@leangen.net>> wrote:
>> 
>> 
>> Hi,
>> 
>> Thank you.
>> 
>> Here is the output for the UserAdmin:
>> 
>> karaf.log.1:2016-05-04 21:58:50,984 | DEBUG | pool-27-thread-1 | useradmin                        | 87 - org.knopflerfish.bundle.useradmin - 4.1.1 | BundleEvent INSTALLED - org.knopflerfish.bundle.useradmin
>> karaf.log.1:2016-05-04 21:58:51,280 | DEBUG | pool-27-thread-1 | useradmin                        | 87 - org.knopflerfish.bundle.useradmin - 4.1.1 | BundleEvent RESOLVED - org.knopflerfish.bundle.useradmin
>> karaf.log.1:2016-05-04 21:58:51,503 | DEBUG | pool-27-thread-1 | useradmin                        | 87 - org.knopflerfish.bundle.useradmin - 4.1.1 | BundleEvent STARTING - org.knopflerfish.bundle.useradmin
>> karaf.log.1:2016-05-04 21:58:51,543 | DEBUG | pool-27-thread-1 | useradmin                        | 87 - org.knopflerfish.bundle.useradmin - 4.1.1 | ServiceEvent REGISTERED - [org.osgi.service.useradmin.UserAdmin] - org.knopflerfish.bundle.useradmin
>> karaf.log.1:2016-05-04 21:58:51,544 | DEBUG | pool-27-thread-1 | useradmin                        | 87 - org.knopflerfish.bundle.useradmin - 4.1.1 | BundleEvent STARTED - org.knopflerfish.bundle.useradmin
>> 
>> Looks like it gets registered just fine.
>> 
>> The unsatisfied reference happens only when the UserAdmin is registered *after* the OAuthUserAdmin. If the UserAdmin is already registered, the OAuthUserAdmin gets activated just fine, with all its references satisfied.
>> 
>> It was my understanding that the ordering should not have any effect on startup, but here it clearly does. :-(
>> 
>> 
>> karaf@root()> scr:details net.leangen.expedition.integration.oauth2.credentials
>> Component Details
>>   Name                : net.leangen.expedition.integration.oauth2.credentials
>>   State               : ACTIVE
>>   Properties          : 
>>     useradmin.target=(!(method=oauth2.0))
>> References
>>   Reference           : useradmin
>>     State             : satisfied
>>     Multiple          : single
>>     Optional          : mandatory
>>     Policy            : static
>>     Service Reference : Bound Service ID 119
>> 
>> 
>> 
>> Cheers,
>> =David
>> 
>> 
>>> On May 5, 2016, at 1:26 AM, David Jencks <david.a.jencks@gmail.com <ma...@gmail.com>> wrote:
>>> 
>>> David,
>>> 
>>> Your components seem to be acting as I’d expect.  However the log output you show doesn’t show the service event for the plain UserAdmin getting registered, so we can’t tell what happens when it does.  I don’t see any ServiceEvents logged here, but since there are BundleEvents I’d expect that we’d see ServiceEvents too.
>>> 
>>> One of these days I will translate the state constants into words in the logging…. I can’t remember the meanings of the numbers either.
>>> 
>>> david jencks
>>> 
>>>> On May 4, 2016, at 4:57 AM, Morgan Hautman <morgan.hautman@gmail.com <ma...@gmail.com>> wrote:
>>>> 
>>>> Hi David,
>>>> 
>>>> Np. Here are the different states http://felix.apache.org/apidocs/scr/1.2.0/org/apache/felix/scr/Component.html <http://felix.apache.org/apidocs/scr/1.2.0/org/apache/felix/scr/Component.html>
>>>> 
>>>> "The Component is a Component Factory ready to manage Component instances from configuration data received from the Configuration Admin Service (value is 64)."
>>>> 
>>>> Possible investigation method:
>>>> Maybe try to launch Karaf in debug mode doing "bin/karaf debug" and connect through remote debugging with your IDE.
>>>> 
>>>> You will see if the bundle starts or not (using your filter)
>>>> 
>>>> Hope it helps a bit :)
>>>> 
>>>> Regards,
>>>> Morgan
>>>> 
>>>> 2016-05-04 12:07 GMT+02:00 David Leangen <apache@leangen.net <ma...@leangen.net>>:
>>>> 
>>>> Thanks, Morgan, that worked. :-)
>>>> 
>>>> 
>>>> The output is very long, and I’m not sure what to look for, but here it is…
>>>> 
>>>> Perhaps this is the relevant line (though I don’t know what it means…):
>>>> 
>>>> Component can not be activated since it is in state 64
>>>> 
>>>> 
>>>> Cheers,
>>>> =David
>>>> 
>>>> 
>>>> karaf.log.1:2016-05-04 05:53:23,480 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | BundleEvent INSTALLED - net.leangen.expedition.integration.oauth.provider
>>>> karaf.log.1:2016-05-04 05:53:24,027 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | BundleEvent RESOLVED - net.leangen.expedition.integration.oauth.provider
>>>> karaf.log.1:2016-05-04 05:53:24,205 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | BundleEvent STARTING - net.leangen.expedition.integration.oauth.provider
>>>> karaf.log.1:2016-05-04 05:53:24,207 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] active
>>>> karaf.log.1:2016-05-04 05:53:24,207 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] descriptor locations OSGI-INF/net.leangen.expedition.integration.oauth2.credentials.xml,OSGI-INF/ne
>>>> t.leangen.expedition.integration.oauth2.xml,OSGI-INF/net.leangen.expedition.integration.oauth2.useradmin.xml
>>>> karaf.log.1:2016-05-04 05:53:24,221 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] ComponentHolder created for net.leangen.expedition.integration.oauth2.credentials
>>>> karaf.log.1:2016-05-04 05:53:24,224 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] ComponentHolder created for net.leangen.expedition.integration.oauth2
>>>> karaf.log.1:2016-05-04 05:53:24,226 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] ComponentHolder created for net.leangen.expedition.integration.oauth2.useradmin
>>>> karaf.log.1:2016-05-04 05:53:24,226 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] May enable component holder net.leangen.expedition.integration.oauth2.credentials
>>>> karaf.log.1:2016-05-04 05:53:24,226 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] Enabling component holder net.leangen.expedition.integration.oauth2.credentials
>>>> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(-1)] Dependency Manager created useradmininterface=org.osgi.service.useradmin.UserA
>>>> dmin, filter=(!(method=oauth2.0)), policy=static, cardinality=1..1, bind=null, unbind=null, updated=null, field=useradmin, field-option=replace, field-collect
>>>> ion-type=null
>>>> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(-1)] Component net.leangen.expedition.integration.oauth2.credentials created: DS=DS
>>>> 13, implementation=net.leangen.expedition.integration.oauth2.client.ClientCredentialsService, immediate=false, default-enabled=true, factory=null, configurati
>>>> on-policy=optional, activate=activate, deactivate=deactivate, modified=null configuration-pid=[net.leangen.expedition.integration.oauth2.credentials]
>>>> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(-1)] Component net.leangen.expedition.integration.oauth2.credentials Services: scop
>>>> e=singleton, services=[net.leangen.expedition.integration.oauth2.model.ClientCredentials]
>>>> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(-1)] Component net.leangen.expedition.integration.oauth2.credentials Properties: {u
>>>> seradmin.target=(!(method=oauth2.0))}
>>>> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(-1)] Component can not be activated since it is in state 64
>>>> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Updating target filters
>>>> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)]  No existing service listener to unregister for dependency useradmin
>>>> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Setting target property for dependency useradmin to (!(method=oauth2.0))
>>>> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] New service tracker for useradmin, initial active: false, previous references: 
>>>> {}, classFilter: (objectClass=org.osgi.service.useradmin.UserAdmin), eventFilter (!(method=oauth2.0)), initialReferenceFilter (&(objectClass=org.osgi.service.
>>>> useradmin.UserAdmin)(!(method=oauth2.0)))
>>>> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] dm useradmin tracker reset (closed)
>>>> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | classNameFilter: (objectClass=org.osgi.service.useradmin.UserAdmin) event filter: (!(method=oauth2.0))
>>>> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] dm useradmin tracker opened
>>>> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] registering service listener for dependency useradmin
>>>> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Component enabled
>>>> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] ActivateInternal
>>>> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Activating component from state 2
>>>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Dependency not satisfied: useradmin
>>>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Not all dependencies satisfied, cannot activate
>>>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] May enable component holder net.leangen.expedition.integration.oauth2
>>>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] Enabling component holder net.leangen.expedition.integration.oauth2
>>>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)] Dependency Manager created credsinterface=net.leangen.expedition.integration.oauth2.model.
>>>> ClientCredentials, filter=null, policy=static, cardinality=1..1, bind=null, unbind=null, updated=null, field=creds, field-option=replace, field-collection-typ
>>>> e=null
>>>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)] Component net.leangen.expedition.integration.oauth2 created: DS=DS13, implementation=net.l
>>>> eangen.expedition.integration.oauth2.client.OauthService, immediate=false, default-enabled=true, factory=null, configuration-policy=optional, activate=activat
>>>> e, deactivate=deactivate, modified=null configuration-pid=[net.leangen.expedition.integration.oauth2]
>>>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)] Component net.leangen.expedition.integration.oauth2 Services: scope=singleton, services=[n
>>>> et.leangen.expedition.integration.oauth2.model.OAuth2]
>>>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)] Component net.leangen.expedition.integration.oauth2 Properties: {}
>>>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)] Component can not be activated since it is in state 64
>>>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Updating target filters
>>>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] No change in target property for dependency creds: currently registered: false
>>>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)]  No existing service listener to unregister for dependency creds
>>>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Setting target property for dependency creds to null
>>>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] New service tracker for creds, initial active: false, previous references: {}, classFilter:
>>>> (objectClass=net.leangen.expedition.integration.oauth2.model.ClientCredentials), eventFilter null, initialReferenceFilter (objectClass=net.leangen.expedition
>>>> .integration.oauth2.model.ClientCredentials)
>>>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] dm creds tracker reset (closed)
>>>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | classNameFilter: (objectClass=net.leangen.expedition.integration.oauth2.model.ClientCredentials) event filter: null
>>>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] dm creds tracker opened
>>>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] registering service listener for dependency creds
>>>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Component enabled
>>>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] ActivateInternal
>>>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Activating component from state 2
>>>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Dependency not satisfied: creds
>>>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Not all dependencies satisfied, cannot activate
>>>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] May enable component holder net.leangen.expedition.integration.oauth2.useradmin
>>>> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] Enabling component holder net.leangen.expedition.integration.oauth2.useradmin
>>>> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Dependency Manager created delegateinterface=org.osgi.service.useradmin.UserAdmi
>>>> n, filter=(!(method=oauth2.0)), policy=static, cardinality=1..1, bind=null, unbind=null, updated=null, field=delegate, field-option=replace, field-collection-
>>>> type=null
>>>> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Dependency Manager created oauth2interface=net.leangen.expedition.integration.oa
>>>> uth2.model.OAuth2, filter=null, policy=static, cardinality=1..1, bind=null, unbind=null, updated=null, field=oauth2, field-option=replace, field-collection-ty
>>>> pe=null
>>>> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Component net.leangen.expedition.integration.oauth2.useradmin created: DS=DS13, 
>>>> implementation=net.leangen.expedition.integration.oauth2.useradmin.OAuthUserAdminService, immediate=false, default-enabled=true, factory=null, configuration-p
>>>> olicy=optional, activate=activate, deactivate=deactivate, modified=null configuration-pid=[net.leangen.expedition.integration.oauth2.useradmin]
>>>> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Component net.leangen.expedition.integration.oauth2.useradmin Services: scope=si
>>>> ngleton, services=[org.osgi.service.useradmin.UserAdmin, net.leangen.expedition.integration.oauth2.OAuthUserAdmin]
>>>> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Component net.leangen.expedition.integration.oauth2.useradmin Properties: {metho
>>>> d=oauth2.0, delegate.target=(!(method=oauth2.0))}
>>>> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Component can not be activated since it is in state 64
>>>> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Updating target filters
>>>> karaf.log.1:2016-05-04 05:53:24,247 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)]  No existing service listener to unregister for dependency delegate
>>>> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Setting target property for dependency delegate to (!(method=oauth2.0))
>>>> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] New service tracker for delegate, initial active: false, previous references: {},
>>>> classFilter: (objectClass=org.osgi.service.useradmin.UserAdmin), eventFilter (!(method=oauth2.0)), initialReferenceFilter (&(objectClass=org.osgi.service.use
>>>> radmin.UserAdmin)(!(method=oauth2.0)))
>>>> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] dm delegate tracker reset (closed)
>>>> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | classNameFilter: (objectClass=org.osgi.service.useradmin.UserAdmin) event filter: (!(method=oauth2.0))
>>>> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] dm delegate tracker opened
>>>> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] registering service listener for dependency delegate
>>>> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] No change in target property for dependency oauth2: currently registered: false
>>>> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)]  No existing service listener to unregister for dependency oauth2
>>>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Setting target property for dependency oauth2 to null
>>>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] New service tracker for oauth2, initial active: false, previous references: {}, c
>>>> lassFilter: (objectClass=net.leangen.expedition.integration.oauth2.model.OAuth2), eventFilter null, initialReferenceFilter (objectClass=net.leangen.expedition
>>>> .integration.oauth2.model.OAuth2)
>>>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] dm oauth2 tracker reset (closed)
>>>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | classNameFilter: (objectClass=net.leangen.expedition.integration.oauth2.model.OAuth2) event filter: null
>>>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] dm oauth2 tracker opened
>>>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] registering service listener for dependency oauth2
>>>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Component enabled
>>>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] ActivateInternal
>>>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Activating component from state 2
>>>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Dependency not satisfied: delegate
>>>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Dependency not satisfied: oauth2
>>>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Not all dependencies satisfied, cannot activate
>>>> karaf.log.1:2016-05-04 05:53:24,250 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>>> .2.0.201605040539 | BundleEvent STARTED - net.leangen.expedition.integration.oauth.provider
>>>> 
>>> 
>> 
> 


Re: Bundle startup

Posted by David Jencks <da...@gmail.com>.
I’m mystified at this point, I’ve never seen this problem.  If you want to figure out what is going on I would suggest debugging ListenerInfo.serviceChanged to see if the service event makes it into DS at all and if so why it doesn’t get to the correct dependency manager.  Otherwise I wonder if you can provide some kind of test project I could look at?

thanks
david jencks

> On May 4, 2016, at 7:10 PM, David Leangen <ap...@leangen.net> wrote:
> 
> 
> Hi,
> 
> Thank you.
> 
> Here is the output for the UserAdmin:
> 
> karaf.log.1:2016-05-04 21:58:50,984 | DEBUG | pool-27-thread-1 | useradmin                        | 87 - org.knopflerfish.bundle.useradmin - 4.1.1 | BundleEvent INSTALLED - org.knopflerfish.bundle.useradmin
> karaf.log.1:2016-05-04 21:58:51,280 | DEBUG | pool-27-thread-1 | useradmin                        | 87 - org.knopflerfish.bundle.useradmin - 4.1.1 | BundleEvent RESOLVED - org.knopflerfish.bundle.useradmin
> karaf.log.1:2016-05-04 21:58:51,503 | DEBUG | pool-27-thread-1 | useradmin                        | 87 - org.knopflerfish.bundle.useradmin - 4.1.1 | BundleEvent STARTING - org.knopflerfish.bundle.useradmin
> karaf.log.1:2016-05-04 21:58:51,543 | DEBUG | pool-27-thread-1 | useradmin                        | 87 - org.knopflerfish.bundle.useradmin - 4.1.1 | ServiceEvent REGISTERED - [org.osgi.service.useradmin.UserAdmin] - org.knopflerfish.bundle.useradmin
> karaf.log.1:2016-05-04 21:58:51,544 | DEBUG | pool-27-thread-1 | useradmin                        | 87 - org.knopflerfish.bundle.useradmin - 4.1.1 | BundleEvent STARTED - org.knopflerfish.bundle.useradmin
> 
> Looks like it gets registered just fine.
> 
> The unsatisfied reference happens only when the UserAdmin is registered *after* the OAuthUserAdmin. If the UserAdmin is already registered, the OAuthUserAdmin gets activated just fine, with all its references satisfied.
> 
> It was my understanding that the ordering should not have any effect on startup, but here it clearly does. :-(
> 
> 
> karaf@root()> scr:details net.leangen.expedition.integration.oauth2.credentials
> Component Details
>   Name                : net.leangen.expedition.integration.oauth2.credentials
>   State               : ACTIVE
>   Properties          : 
>     useradmin.target=(!(method=oauth2.0))
> References
>   Reference           : useradmin
>     State             : satisfied
>     Multiple          : single
>     Optional          : mandatory
>     Policy            : static
>     Service Reference : Bound Service ID 119
> 
> 
> 
> Cheers,
> =David
> 
> 
>> On May 5, 2016, at 1:26 AM, David Jencks <david.a.jencks@gmail.com <ma...@gmail.com>> wrote:
>> 
>> David,
>> 
>> Your components seem to be acting as I’d expect.  However the log output you show doesn’t show the service event for the plain UserAdmin getting registered, so we can’t tell what happens when it does.  I don’t see any ServiceEvents logged here, but since there are BundleEvents I’d expect that we’d see ServiceEvents too.
>> 
>> One of these days I will translate the state constants into words in the logging…. I can’t remember the meanings of the numbers either.
>> 
>> david jencks
>> 
>>> On May 4, 2016, at 4:57 AM, Morgan Hautman <morgan.hautman@gmail.com <ma...@gmail.com>> wrote:
>>> 
>>> Hi David,
>>> 
>>> Np. Here are the different states http://felix.apache.org/apidocs/scr/1.2.0/org/apache/felix/scr/Component.html <http://felix.apache.org/apidocs/scr/1.2.0/org/apache/felix/scr/Component.html>
>>> 
>>> "The Component is a Component Factory ready to manage Component instances from configuration data received from the Configuration Admin Service (value is 64)."
>>> 
>>> Possible investigation method:
>>> Maybe try to launch Karaf in debug mode doing "bin/karaf debug" and connect through remote debugging with your IDE.
>>> 
>>> You will see if the bundle starts or not (using your filter)
>>> 
>>> Hope it helps a bit :)
>>> 
>>> Regards,
>>> Morgan
>>> 
>>> 2016-05-04 12:07 GMT+02:00 David Leangen <apache@leangen.net <ma...@leangen.net>>:
>>> 
>>> Thanks, Morgan, that worked. :-)
>>> 
>>> 
>>> The output is very long, and I’m not sure what to look for, but here it is…
>>> 
>>> Perhaps this is the relevant line (though I don’t know what it means…):
>>> 
>>> Component can not be activated since it is in state 64
>>> 
>>> 
>>> Cheers,
>>> =David
>>> 
>>> 
>>> karaf.log.1:2016-05-04 05:53:23,480 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | BundleEvent INSTALLED - net.leangen.expedition.integration.oauth.provider
>>> karaf.log.1:2016-05-04 05:53:24,027 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | BundleEvent RESOLVED - net.leangen.expedition.integration.oauth.provider
>>> karaf.log.1:2016-05-04 05:53:24,205 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | BundleEvent STARTING - net.leangen.expedition.integration.oauth.provider
>>> karaf.log.1:2016-05-04 05:53:24,207 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] active
>>> karaf.log.1:2016-05-04 05:53:24,207 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] descriptor locations OSGI-INF/net.leangen.expedition.integration.oauth2.credentials.xml,OSGI-INF/ne
>>> t.leangen.expedition.integration.oauth2.xml,OSGI-INF/net.leangen.expedition.integration.oauth2.useradmin.xml
>>> karaf.log.1:2016-05-04 05:53:24,221 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] ComponentHolder created for net.leangen.expedition.integration.oauth2.credentials
>>> karaf.log.1:2016-05-04 05:53:24,224 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] ComponentHolder created for net.leangen.expedition.integration.oauth2
>>> karaf.log.1:2016-05-04 05:53:24,226 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] ComponentHolder created for net.leangen.expedition.integration.oauth2.useradmin
>>> karaf.log.1:2016-05-04 05:53:24,226 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] May enable component holder net.leangen.expedition.integration.oauth2.credentials
>>> karaf.log.1:2016-05-04 05:53:24,226 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] Enabling component holder net.leangen.expedition.integration.oauth2.credentials
>>> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(-1)] Dependency Manager created useradmininterface=org.osgi.service.useradmin.UserA
>>> dmin, filter=(!(method=oauth2.0)), policy=static, cardinality=1..1, bind=null, unbind=null, updated=null, field=useradmin, field-option=replace, field-collect
>>> ion-type=null
>>> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(-1)] Component net.leangen.expedition.integration.oauth2.credentials created: DS=DS
>>> 13, implementation=net.leangen.expedition.integration.oauth2.client.ClientCredentialsService, immediate=false, default-enabled=true, factory=null, configurati
>>> on-policy=optional, activate=activate, deactivate=deactivate, modified=null configuration-pid=[net.leangen.expedition.integration.oauth2.credentials]
>>> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(-1)] Component net.leangen.expedition.integration.oauth2.credentials Services: scop
>>> e=singleton, services=[net.leangen.expedition.integration.oauth2.model.ClientCredentials]
>>> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(-1)] Component net.leangen.expedition.integration.oauth2.credentials Properties: {u
>>> seradmin.target=(!(method=oauth2.0))}
>>> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(-1)] Component can not be activated since it is in state 64
>>> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Updating target filters
>>> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)]  No existing service listener to unregister for dependency useradmin
>>> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Setting target property for dependency useradmin to (!(method=oauth2.0))
>>> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] New service tracker for useradmin, initial active: false, previous references: 
>>> {}, classFilter: (objectClass=org.osgi.service.useradmin.UserAdmin), eventFilter (!(method=oauth2.0)), initialReferenceFilter (&(objectClass=org.osgi.service.
>>> useradmin.UserAdmin)(!(method=oauth2.0)))
>>> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] dm useradmin tracker reset (closed)
>>> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | classNameFilter: (objectClass=org.osgi.service.useradmin.UserAdmin) event filter: (!(method=oauth2.0))
>>> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] dm useradmin tracker opened
>>> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] registering service listener for dependency useradmin
>>> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Component enabled
>>> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] ActivateInternal
>>> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Activating component from state 2
>>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Dependency not satisfied: useradmin
>>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Not all dependencies satisfied, cannot activate
>>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] May enable component holder net.leangen.expedition.integration.oauth2
>>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] Enabling component holder net.leangen.expedition.integration.oauth2
>>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)] Dependency Manager created credsinterface=net.leangen.expedition.integration.oauth2.model.
>>> ClientCredentials, filter=null, policy=static, cardinality=1..1, bind=null, unbind=null, updated=null, field=creds, field-option=replace, field-collection-typ
>>> e=null
>>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)] Component net.leangen.expedition.integration.oauth2 created: DS=DS13, implementation=net.l
>>> eangen.expedition.integration.oauth2.client.OauthService, immediate=false, default-enabled=true, factory=null, configuration-policy=optional, activate=activat
>>> e, deactivate=deactivate, modified=null configuration-pid=[net.leangen.expedition.integration.oauth2]
>>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)] Component net.leangen.expedition.integration.oauth2 Services: scope=singleton, services=[n
>>> et.leangen.expedition.integration.oauth2.model.OAuth2]
>>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)] Component net.leangen.expedition.integration.oauth2 Properties: {}
>>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)] Component can not be activated since it is in state 64
>>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Updating target filters
>>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] No change in target property for dependency creds: currently registered: false
>>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)]  No existing service listener to unregister for dependency creds
>>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Setting target property for dependency creds to null
>>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] New service tracker for creds, initial active: false, previous references: {}, classFilter:
>>> (objectClass=net.leangen.expedition.integration.oauth2.model.ClientCredentials), eventFilter null, initialReferenceFilter (objectClass=net.leangen.expedition
>>> .integration.oauth2.model.ClientCredentials)
>>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] dm creds tracker reset (closed)
>>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | classNameFilter: (objectClass=net.leangen.expedition.integration.oauth2.model.ClientCredentials) event filter: null
>>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] dm creds tracker opened
>>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] registering service listener for dependency creds
>>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Component enabled
>>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] ActivateInternal
>>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Activating component from state 2
>>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Dependency not satisfied: creds
>>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Not all dependencies satisfied, cannot activate
>>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] May enable component holder net.leangen.expedition.integration.oauth2.useradmin
>>> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] Enabling component holder net.leangen.expedition.integration.oauth2.useradmin
>>> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Dependency Manager created delegateinterface=org.osgi.service.useradmin.UserAdmi
>>> n, filter=(!(method=oauth2.0)), policy=static, cardinality=1..1, bind=null, unbind=null, updated=null, field=delegate, field-option=replace, field-collection-
>>> type=null
>>> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Dependency Manager created oauth2interface=net.leangen.expedition.integration.oa
>>> uth2.model.OAuth2, filter=null, policy=static, cardinality=1..1, bind=null, unbind=null, updated=null, field=oauth2, field-option=replace, field-collection-ty
>>> pe=null
>>> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Component net.leangen.expedition.integration.oauth2.useradmin created: DS=DS13, 
>>> implementation=net.leangen.expedition.integration.oauth2.useradmin.OAuthUserAdminService, immediate=false, default-enabled=true, factory=null, configuration-p
>>> olicy=optional, activate=activate, deactivate=deactivate, modified=null configuration-pid=[net.leangen.expedition.integration.oauth2.useradmin]
>>> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Component net.leangen.expedition.integration.oauth2.useradmin Services: scope=si
>>> ngleton, services=[org.osgi.service.useradmin.UserAdmin, net.leangen.expedition.integration.oauth2.OAuthUserAdmin]
>>> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Component net.leangen.expedition.integration.oauth2.useradmin Properties: {metho
>>> d=oauth2.0, delegate.target=(!(method=oauth2.0))}
>>> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Component can not be activated since it is in state 64
>>> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Updating target filters
>>> karaf.log.1:2016-05-04 05:53:24,247 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)]  No existing service listener to unregister for dependency delegate
>>> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Setting target property for dependency delegate to (!(method=oauth2.0))
>>> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] New service tracker for delegate, initial active: false, previous references: {},
>>> classFilter: (objectClass=org.osgi.service.useradmin.UserAdmin), eventFilter (!(method=oauth2.0)), initialReferenceFilter (&(objectClass=org.osgi.service.use
>>> radmin.UserAdmin)(!(method=oauth2.0)))
>>> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] dm delegate tracker reset (closed)
>>> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | classNameFilter: (objectClass=org.osgi.service.useradmin.UserAdmin) event filter: (!(method=oauth2.0))
>>> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] dm delegate tracker opened
>>> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] registering service listener for dependency delegate
>>> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] No change in target property for dependency oauth2: currently registered: false
>>> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)]  No existing service listener to unregister for dependency oauth2
>>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Setting target property for dependency oauth2 to null
>>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] New service tracker for oauth2, initial active: false, previous references: {}, c
>>> lassFilter: (objectClass=net.leangen.expedition.integration.oauth2.model.OAuth2), eventFilter null, initialReferenceFilter (objectClass=net.leangen.expedition
>>> .integration.oauth2.model.OAuth2)
>>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] dm oauth2 tracker reset (closed)
>>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | classNameFilter: (objectClass=net.leangen.expedition.integration.oauth2.model.OAuth2) event filter: null
>>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] dm oauth2 tracker opened
>>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] registering service listener for dependency oauth2
>>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Component enabled
>>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] ActivateInternal
>>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Activating component from state 2
>>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Dependency not satisfied: delegate
>>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Dependency not satisfied: oauth2
>>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Not all dependencies satisfied, cannot activate
>>> karaf.log.1:2016-05-04 05:53:24,250 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>>> .2.0.201605040539 | BundleEvent STARTED - net.leangen.expedition.integration.oauth.provider
>>> 
>> 
> 


Re: Bundle startup

Posted by David Leangen <ap...@leangen.net>.
Hi,

Thank you.

Here is the output for the UserAdmin:

karaf.log.1:2016-05-04 21:58:50,984 | DEBUG | pool-27-thread-1 | useradmin                        | 87 - org.knopflerfish.bundle.useradmin - 4.1.1 | BundleEvent INSTALLED - org.knopflerfish.bundle.useradmin
karaf.log.1:2016-05-04 21:58:51,280 | DEBUG | pool-27-thread-1 | useradmin                        | 87 - org.knopflerfish.bundle.useradmin - 4.1.1 | BundleEvent RESOLVED - org.knopflerfish.bundle.useradmin
karaf.log.1:2016-05-04 21:58:51,503 | DEBUG | pool-27-thread-1 | useradmin                        | 87 - org.knopflerfish.bundle.useradmin - 4.1.1 | BundleEvent STARTING - org.knopflerfish.bundle.useradmin
karaf.log.1:2016-05-04 21:58:51,543 | DEBUG | pool-27-thread-1 | useradmin                        | 87 - org.knopflerfish.bundle.useradmin - 4.1.1 | ServiceEvent REGISTERED - [org.osgi.service.useradmin.UserAdmin] - org.knopflerfish.bundle.useradmin
karaf.log.1:2016-05-04 21:58:51,544 | DEBUG | pool-27-thread-1 | useradmin                        | 87 - org.knopflerfish.bundle.useradmin - 4.1.1 | BundleEvent STARTED - org.knopflerfish.bundle.useradmin

Looks like it gets registered just fine.

The unsatisfied reference happens only when the UserAdmin is registered *after* the OAuthUserAdmin. If the UserAdmin is already registered, the OAuthUserAdmin gets activated just fine, with all its references satisfied.

It was my understanding that the ordering should not have any effect on startup, but here it clearly does. :-(


karaf@root()> scr:details net.leangen.expedition.integration.oauth2.credentials
Component Details
  Name                : net.leangen.expedition.integration.oauth2.credentials
  State               : ACTIVE
  Properties          : 
    useradmin.target=(!(method=oauth2.0))
References
  Reference           : useradmin
    State             : satisfied
    Multiple          : single
    Optional          : mandatory
    Policy            : static
    Service Reference : Bound Service ID 119



Cheers,
=David


> On May 5, 2016, at 1:26 AM, David Jencks <da...@gmail.com> wrote:
> 
> David,
> 
> Your components seem to be acting as I’d expect.  However the log output you show doesn’t show the service event for the plain UserAdmin getting registered, so we can’t tell what happens when it does.  I don’t see any ServiceEvents logged here, but since there are BundleEvents I’d expect that we’d see ServiceEvents too.
> 
> One of these days I will translate the state constants into words in the logging…. I can’t remember the meanings of the numbers either.
> 
> david jencks
> 
>> On May 4, 2016, at 4:57 AM, Morgan Hautman <mo...@gmail.com> wrote:
>> 
>> Hi David,
>> 
>> Np. Here are the different states http://felix.apache.org/apidocs/scr/1.2.0/org/apache/felix/scr/Component.html
>> 
>> "The Component is a Component Factory ready to manage Component instances from configuration data received from the Configuration Admin Service (value is 64)."
>> 
>> Possible investigation method:
>> Maybe try to launch Karaf in debug mode doing "bin/karaf debug" and connect through remote debugging with your IDE.
>> 
>> You will see if the bundle starts or not (using your filter)
>> 
>> Hope it helps a bit :)
>> 
>> Regards,
>> Morgan
>> 
>> 2016-05-04 12:07 GMT+02:00 David Leangen <ap...@leangen.net>:
>> 
>> Thanks, Morgan, that worked. :-)
>> 
>> 
>> The output is very long, and I’m not sure what to look for, but here it is…
>> 
>> Perhaps this is the relevant line (though I don’t know what it means…):
>> 
>> Component can not be activated since it is in state 64
>> 
>> 
>> Cheers,
>> =David
>> 
>> 
>> karaf.log.1:2016-05-04 05:53:23,480 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | BundleEvent INSTALLED - net.leangen.expedition.integration.oauth.provider
>> karaf.log.1:2016-05-04 05:53:24,027 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | BundleEvent RESOLVED - net.leangen.expedition.integration.oauth.provider
>> karaf.log.1:2016-05-04 05:53:24,205 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | BundleEvent STARTING - net.leangen.expedition.integration.oauth.provider
>> karaf.log.1:2016-05-04 05:53:24,207 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] active
>> karaf.log.1:2016-05-04 05:53:24,207 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] descriptor locations OSGI-INF/net.leangen.expedition.integration.oauth2.credentials.xml,OSGI-INF/ne
>> t.leangen.expedition.integration.oauth2.xml,OSGI-INF/net.leangen.expedition.integration.oauth2.useradmin.xml
>> karaf.log.1:2016-05-04 05:53:24,221 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] ComponentHolder created for net.leangen.expedition.integration.oauth2.credentials
>> karaf.log.1:2016-05-04 05:53:24,224 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] ComponentHolder created for net.leangen.expedition.integration.oauth2
>> karaf.log.1:2016-05-04 05:53:24,226 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] ComponentHolder created for net.leangen.expedition.integration.oauth2.useradmin
>> karaf.log.1:2016-05-04 05:53:24,226 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] May enable component holder net.leangen.expedition.integration.oauth2.credentials
>> karaf.log.1:2016-05-04 05:53:24,226 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] Enabling component holder net.leangen.expedition.integration.oauth2.credentials
>> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(-1)] Dependency Manager created useradmininterface=org.osgi.service.useradmin.UserA
>> dmin, filter=(!(method=oauth2.0)), policy=static, cardinality=1..1, bind=null, unbind=null, updated=null, field=useradmin, field-option=replace, field-collect
>> ion-type=null
>> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(-1)] Component net.leangen.expedition.integration.oauth2.credentials created: DS=DS
>> 13, implementation=net.leangen.expedition.integration.oauth2.client.ClientCredentialsService, immediate=false, default-enabled=true, factory=null, configurati
>> on-policy=optional, activate=activate, deactivate=deactivate, modified=null configuration-pid=[net.leangen.expedition.integration.oauth2.credentials]
>> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(-1)] Component net.leangen.expedition.integration.oauth2.credentials Services: scop
>> e=singleton, services=[net.leangen.expedition.integration.oauth2.model.ClientCredentials]
>> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(-1)] Component net.leangen.expedition.integration.oauth2.credentials Properties: {u
>> seradmin.target=(!(method=oauth2.0))}
>> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(-1)] Component can not be activated since it is in state 64
>> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Updating target filters
>> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)]  No existing service listener to unregister for dependency useradmin
>> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Setting target property for dependency useradmin to (!(method=oauth2.0))
>> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] New service tracker for useradmin, initial active: false, previous references: 
>> {}, classFilter: (objectClass=org.osgi.service.useradmin.UserAdmin), eventFilter (!(method=oauth2.0)), initialReferenceFilter (&(objectClass=org.osgi.service.
>> useradmin.UserAdmin)(!(method=oauth2.0)))
>> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] dm useradmin tracker reset (closed)
>> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | classNameFilter: (objectClass=org.osgi.service.useradmin.UserAdmin) event filter: (!(method=oauth2.0))
>> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] dm useradmin tracker opened
>> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] registering service listener for dependency useradmin
>> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Component enabled
>> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] ActivateInternal
>> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Activating component from state 2
>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Dependency not satisfied: useradmin
>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Not all dependencies satisfied, cannot activate
>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] May enable component holder net.leangen.expedition.integration.oauth2
>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] Enabling component holder net.leangen.expedition.integration.oauth2
>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)] Dependency Manager created credsinterface=net.leangen.expedition.integration.oauth2.model.
>> ClientCredentials, filter=null, policy=static, cardinality=1..1, bind=null, unbind=null, updated=null, field=creds, field-option=replace, field-collection-typ
>> e=null
>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)] Component net.leangen.expedition.integration.oauth2 created: DS=DS13, implementation=net.l
>> eangen.expedition.integration.oauth2.client.OauthService, immediate=false, default-enabled=true, factory=null, configuration-policy=optional, activate=activat
>> e, deactivate=deactivate, modified=null configuration-pid=[net.leangen.expedition.integration.oauth2]
>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)] Component net.leangen.expedition.integration.oauth2 Services: scope=singleton, services=[n
>> et.leangen.expedition.integration.oauth2.model.OAuth2]
>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)] Component net.leangen.expedition.integration.oauth2 Properties: {}
>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)] Component can not be activated since it is in state 64
>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Updating target filters
>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] No change in target property for dependency creds: currently registered: false
>> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)]  No existing service listener to unregister for dependency creds
>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Setting target property for dependency creds to null
>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] New service tracker for creds, initial active: false, previous references: {}, classFilter:
>> (objectClass=net.leangen.expedition.integration.oauth2.model.ClientCredentials), eventFilter null, initialReferenceFilter (objectClass=net.leangen.expedition
>> .integration.oauth2.model.ClientCredentials)
>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] dm creds tracker reset (closed)
>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | classNameFilter: (objectClass=net.leangen.expedition.integration.oauth2.model.ClientCredentials) event filter: null
>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] dm creds tracker opened
>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] registering service listener for dependency creds
>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Component enabled
>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] ActivateInternal
>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Activating component from state 2
>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Dependency not satisfied: creds
>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Not all dependencies satisfied, cannot activate
>> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] May enable component holder net.leangen.expedition.integration.oauth2.useradmin
>> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | BundleComponentActivator : Bundle [68] Enabling component holder net.leangen.expedition.integration.oauth2.useradmin
>> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Dependency Manager created delegateinterface=org.osgi.service.useradmin.UserAdmi
>> n, filter=(!(method=oauth2.0)), policy=static, cardinality=1..1, bind=null, unbind=null, updated=null, field=delegate, field-option=replace, field-collection-
>> type=null
>> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Dependency Manager created oauth2interface=net.leangen.expedition.integration.oa
>> uth2.model.OAuth2, filter=null, policy=static, cardinality=1..1, bind=null, unbind=null, updated=null, field=oauth2, field-option=replace, field-collection-ty
>> pe=null
>> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Component net.leangen.expedition.integration.oauth2.useradmin created: DS=DS13, 
>> implementation=net.leangen.expedition.integration.oauth2.useradmin.OAuthUserAdminService, immediate=false, default-enabled=true, factory=null, configuration-p
>> olicy=optional, activate=activate, deactivate=deactivate, modified=null configuration-pid=[net.leangen.expedition.integration.oauth2.useradmin]
>> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Component net.leangen.expedition.integration.oauth2.useradmin Services: scope=si
>> ngleton, services=[org.osgi.service.useradmin.UserAdmin, net.leangen.expedition.integration.oauth2.OAuthUserAdmin]
>> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Component net.leangen.expedition.integration.oauth2.useradmin Properties: {metho
>> d=oauth2.0, delegate.target=(!(method=oauth2.0))}
>> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Component can not be activated since it is in state 64
>> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Updating target filters
>> karaf.log.1:2016-05-04 05:53:24,247 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)]  No existing service listener to unregister for dependency delegate
>> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Setting target property for dependency delegate to (!(method=oauth2.0))
>> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] New service tracker for delegate, initial active: false, previous references: {},
>> classFilter: (objectClass=org.osgi.service.useradmin.UserAdmin), eventFilter (!(method=oauth2.0)), initialReferenceFilter (&(objectClass=org.osgi.service.use
>> radmin.UserAdmin)(!(method=oauth2.0)))
>> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] dm delegate tracker reset (closed)
>> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | classNameFilter: (objectClass=org.osgi.service.useradmin.UserAdmin) event filter: (!(method=oauth2.0))
>> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] dm delegate tracker opened
>> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] registering service listener for dependency delegate
>> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] No change in target property for dependency oauth2: currently registered: false
>> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)]  No existing service listener to unregister for dependency oauth2
>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Setting target property for dependency oauth2 to null
>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] New service tracker for oauth2, initial active: false, previous references: {}, c
>> lassFilter: (objectClass=net.leangen.expedition.integration.oauth2.model.OAuth2), eventFilter null, initialReferenceFilter (objectClass=net.leangen.expedition
>> .integration.oauth2.model.OAuth2)
>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] dm oauth2 tracker reset (closed)
>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | classNameFilter: (objectClass=net.leangen.expedition.integration.oauth2.model.OAuth2) event filter: null
>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] dm oauth2 tracker opened
>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] registering service listener for dependency oauth2
>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Component enabled
>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] ActivateInternal
>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Activating component from state 2
>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Dependency not satisfied: delegate
>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Dependency not satisfied: oauth2
>> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Not all dependencies satisfied, cannot activate
>> karaf.log.1:2016-05-04 05:53:24,250 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
>> .2.0.201605040539 | BundleEvent STARTED - net.leangen.expedition.integration.oauth.provider
>> 
> 


Re: Bundle startup

Posted by David Jencks <da...@gmail.com>.
David,

Your components seem to be acting as I’d expect.  However the log output you show doesn’t show the service event for the plain UserAdmin getting registered, so we can’t tell what happens when it does.  I don’t see any ServiceEvents logged here, but since there are BundleEvents I’d expect that we’d see ServiceEvents too.

One of these days I will translate the state constants into words in the logging…. I can’t remember the meanings of the numbers either.

david jencks

> On May 4, 2016, at 4:57 AM, Morgan Hautman <mo...@gmail.com> wrote:
> 
> Hi David,
> 
> Np. Here are the different states http://felix.apache.org/apidocs/scr/1.2.0/org/apache/felix/scr/Component.html
> 
> "The Component is a Component Factory ready to manage Component instances from configuration data received from the Configuration Admin Service (value is 64)."
> 
> Possible investigation method:
> Maybe try to launch Karaf in debug mode doing "bin/karaf debug" and connect through remote debugging with your IDE.
> 
> You will see if the bundle starts or not (using your filter)
> 
> Hope it helps a bit :)
> 
> Regards,
> Morgan
> 
> 2016-05-04 12:07 GMT+02:00 David Leangen <ap...@leangen.net>:
> 
> Thanks, Morgan, that worked. :-)
> 
> 
> The output is very long, and I’m not sure what to look for, but here it is…
> 
> Perhaps this is the relevant line (though I don’t know what it means…):
> 
> Component can not be activated since it is in state 64
> 
> 
> Cheers,
> =David
> 
> 
> karaf.log.1:2016-05-04 05:53:23,480 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleEvent INSTALLED - net.leangen.expedition.integration.oauth.provider
> karaf.log.1:2016-05-04 05:53:24,027 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleEvent RESOLVED - net.leangen.expedition.integration.oauth.provider
> karaf.log.1:2016-05-04 05:53:24,205 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleEvent STARTING - net.leangen.expedition.integration.oauth.provider
> karaf.log.1:2016-05-04 05:53:24,207 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleComponentActivator : Bundle [68] active
> karaf.log.1:2016-05-04 05:53:24,207 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleComponentActivator : Bundle [68] descriptor locations OSGI-INF/net.leangen.expedition.integration.oauth2.credentials.xml,OSGI-INF/ne
> t.leangen.expedition.integration.oauth2.xml,OSGI-INF/net.leangen.expedition.integration.oauth2.useradmin.xml
> karaf.log.1:2016-05-04 05:53:24,221 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleComponentActivator : Bundle [68] ComponentHolder created for net.leangen.expedition.integration.oauth2.credentials
> karaf.log.1:2016-05-04 05:53:24,224 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleComponentActivator : Bundle [68] ComponentHolder created for net.leangen.expedition.integration.oauth2
> karaf.log.1:2016-05-04 05:53:24,226 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleComponentActivator : Bundle [68] ComponentHolder created for net.leangen.expedition.integration.oauth2.useradmin
> karaf.log.1:2016-05-04 05:53:24,226 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleComponentActivator : Bundle [68] May enable component holder net.leangen.expedition.integration.oauth2.credentials
> karaf.log.1:2016-05-04 05:53:24,226 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleComponentActivator : Bundle [68] Enabling component holder net.leangen.expedition.integration.oauth2.credentials
> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(-1)] Dependency Manager created useradmininterface=org.osgi.service.useradmin.UserA
> dmin, filter=(!(method=oauth2.0)), policy=static, cardinality=1..1, bind=null, unbind=null, updated=null, field=useradmin, field-option=replace, field-collect
> ion-type=null
> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(-1)] Component net.leangen.expedition.integration.oauth2.credentials created: DS=DS
> 13, implementation=net.leangen.expedition.integration.oauth2.client.ClientCredentialsService, immediate=false, default-enabled=true, factory=null, configurati
> on-policy=optional, activate=activate, deactivate=deactivate, modified=null configuration-pid=[net.leangen.expedition.integration.oauth2.credentials]
> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(-1)] Component net.leangen.expedition.integration.oauth2.credentials Services: scop
> e=singleton, services=[net.leangen.expedition.integration.oauth2.model.ClientCredentials]
> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(-1)] Component net.leangen.expedition.integration.oauth2.credentials Properties: {u
> seradmin.target=(!(method=oauth2.0))}
> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(-1)] Component can not be activated since it is in state 64
> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Updating target filters
> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)]  No existing service listener to unregister for dependency useradmin
> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Setting target property for dependency useradmin to (!(method=oauth2.0))
> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] New service tracker for useradmin, initial active: false, previous references: 
> {}, classFilter: (objectClass=org.osgi.service.useradmin.UserAdmin), eventFilter (!(method=oauth2.0)), initialReferenceFilter (&(objectClass=org.osgi.service.
> useradmin.UserAdmin)(!(method=oauth2.0)))
> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] dm useradmin tracker reset (closed)
> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | classNameFilter: (objectClass=org.osgi.service.useradmin.UserAdmin) event filter: (!(method=oauth2.0))
> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] dm useradmin tracker opened
> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] registering service listener for dependency useradmin
> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Component enabled
> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] ActivateInternal
> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Activating component from state 2
> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Dependency not satisfied: useradmin
> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Not all dependencies satisfied, cannot activate
> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleComponentActivator : Bundle [68] May enable component holder net.leangen.expedition.integration.oauth2
> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleComponentActivator : Bundle [68] Enabling component holder net.leangen.expedition.integration.oauth2
> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)] Dependency Manager created credsinterface=net.leangen.expedition.integration.oauth2.model.
> ClientCredentials, filter=null, policy=static, cardinality=1..1, bind=null, unbind=null, updated=null, field=creds, field-option=replace, field-collection-typ
> e=null
> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)] Component net.leangen.expedition.integration.oauth2 created: DS=DS13, implementation=net.l
> eangen.expedition.integration.oauth2.client.OauthService, immediate=false, default-enabled=true, factory=null, configuration-policy=optional, activate=activat
> e, deactivate=deactivate, modified=null configuration-pid=[net.leangen.expedition.integration.oauth2]
> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)] Component net.leangen.expedition.integration.oauth2 Services: scope=singleton, services=[n
> et.leangen.expedition.integration.oauth2.model.OAuth2]
> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)] Component net.leangen.expedition.integration.oauth2 Properties: {}
> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)] Component can not be activated since it is in state 64
> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Updating target filters
> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] No change in target property for dependency creds: currently registered: false
> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)]  No existing service listener to unregister for dependency creds
> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Setting target property for dependency creds to null
> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] New service tracker for creds, initial active: false, previous references: {}, classFilter:
>  (objectClass=net.leangen.expedition.integration.oauth2.model.ClientCredentials), eventFilter null, initialReferenceFilter (objectClass=net.leangen.expedition
> .integration.oauth2.model.ClientCredentials)
> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] dm creds tracker reset (closed)
> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | classNameFilter: (objectClass=net.leangen.expedition.integration.oauth2.model.ClientCredentials) event filter: null
> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] dm creds tracker opened
> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] registering service listener for dependency creds
> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Component enabled
> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] ActivateInternal
> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Activating component from state 2
> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Dependency not satisfied: creds
> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Not all dependencies satisfied, cannot activate
> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleComponentActivator : Bundle [68] May enable component holder net.leangen.expedition.integration.oauth2.useradmin
> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleComponentActivator : Bundle [68] Enabling component holder net.leangen.expedition.integration.oauth2.useradmin
> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Dependency Manager created delegateinterface=org.osgi.service.useradmin.UserAdmi
> n, filter=(!(method=oauth2.0)), policy=static, cardinality=1..1, bind=null, unbind=null, updated=null, field=delegate, field-option=replace, field-collection-
> type=null
> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Dependency Manager created oauth2interface=net.leangen.expedition.integration.oa
> uth2.model.OAuth2, filter=null, policy=static, cardinality=1..1, bind=null, unbind=null, updated=null, field=oauth2, field-option=replace, field-collection-ty
> pe=null
> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Component net.leangen.expedition.integration.oauth2.useradmin created: DS=DS13, 
> implementation=net.leangen.expedition.integration.oauth2.useradmin.OAuthUserAdminService, immediate=false, default-enabled=true, factory=null, configuration-p
> olicy=optional, activate=activate, deactivate=deactivate, modified=null configuration-pid=[net.leangen.expedition.integration.oauth2.useradmin]
> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Component net.leangen.expedition.integration.oauth2.useradmin Services: scope=si
> ngleton, services=[org.osgi.service.useradmin.UserAdmin, net.leangen.expedition.integration.oauth2.OAuthUserAdmin]
> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Component net.leangen.expedition.integration.oauth2.useradmin Properties: {metho
> d=oauth2.0, delegate.target=(!(method=oauth2.0))}
> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Component can not be activated since it is in state 64
> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Updating target filters
> karaf.log.1:2016-05-04 05:53:24,247 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)]  No existing service listener to unregister for dependency delegate
> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Setting target property for dependency delegate to (!(method=oauth2.0))
> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] New service tracker for delegate, initial active: false, previous references: {},
>  classFilter: (objectClass=org.osgi.service.useradmin.UserAdmin), eventFilter (!(method=oauth2.0)), initialReferenceFilter (&(objectClass=org.osgi.service.use
> radmin.UserAdmin)(!(method=oauth2.0)))
> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] dm delegate tracker reset (closed)
> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | classNameFilter: (objectClass=org.osgi.service.useradmin.UserAdmin) event filter: (!(method=oauth2.0))
> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] dm delegate tracker opened
> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] registering service listener for dependency delegate
> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] No change in target property for dependency oauth2: currently registered: false
> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)]  No existing service listener to unregister for dependency oauth2
> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Setting target property for dependency oauth2 to null
> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] New service tracker for oauth2, initial active: false, previous references: {}, c
> lassFilter: (objectClass=net.leangen.expedition.integration.oauth2.model.OAuth2), eventFilter null, initialReferenceFilter (objectClass=net.leangen.expedition
> .integration.oauth2.model.OAuth2)
> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] dm oauth2 tracker reset (closed)
> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | classNameFilter: (objectClass=net.leangen.expedition.integration.oauth2.model.OAuth2) event filter: null
> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] dm oauth2 tracker opened
> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] registering service listener for dependency oauth2
> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Component enabled
> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] ActivateInternal
> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Activating component from state 2
> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Dependency not satisfied: delegate
> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Dependency not satisfied: oauth2
> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Not all dependencies satisfied, cannot activate
> karaf.log.1:2016-05-04 05:53:24,250 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleEvent STARTED - net.leangen.expedition.integration.oauth.provider
> 


Re: Bundle startup

Posted by Morgan Hautman <mo...@gmail.com>.
Hi David,

Np. Here are the different states
http://felix.apache.org/apidocs/scr/1.2.0/org/apache/felix/scr/Component.html

"The Component is a Component Factory ready to manage Component instances
from configuration data received from the Configuration Admin Service
(value is 64)."

Possible investigation method:
Maybe try to launch Karaf in debug mode doing "bin/karaf debug" and connect
through remote debugging with your IDE.

You will see if the bundle starts or not (using your filter)

Hope it helps a bit :)

Regards,
Morgan

2016-05-04 12:07 GMT+02:00 David Leangen <ap...@leangen.net>:

>
> Thanks, Morgan, that worked. :-)
>
>
> The output is very long, and I’m not sure what to look for, but here it is…
>
> Perhaps this is the relevant line (though I don’t know what it means…):
>
> Component can not be activated since it is in state 64
>
>
> Cheers,
> =David
>
>
> karaf.log.1:2016-05-04 05:53:23,480 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleEvent INSTALLED -
> net.leangen.expedition.integration.oauth.provider
> karaf.log.1:2016-05-04 05:53:24,027 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleEvent RESOLVED -
> net.leangen.expedition.integration.oauth.provider
> karaf.log.1:2016-05-04 05:53:24,205 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleEvent STARTING -
> net.leangen.expedition.integration.oauth.provider
> karaf.log.1:2016-05-04 05:53:24,207 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleComponentActivator : Bundle [68] active
> karaf.log.1:2016-05-04 05:53:24,207 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleComponentActivator : Bundle [68] descriptor
> locations
> OSGI-INF/net.leangen.expedition.integration.oauth2.credentials.xml,OSGI-INF/ne
>
> t.leangen.expedition.integration.oauth2.xml,OSGI-INF/net.leangen.expedition.integration.oauth2.useradmin.xml
> karaf.log.1:2016-05-04 05:53:24,221 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleComponentActivator : Bundle [68] ComponentHolder
> created for net.leangen.expedition.integration.oauth2.credentials
> karaf.log.1:2016-05-04 05:53:24,224 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleComponentActivator : Bundle [68] ComponentHolder
> created for net.leangen.expedition.integration.oauth2
> karaf.log.1:2016-05-04 05:53:24,226 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleComponentActivator : Bundle [68] ComponentHolder
> created for net.leangen.expedition.integration.oauth2.useradmin
> karaf.log.1:2016-05-04 05:53:24,226 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleComponentActivator : Bundle [68] May enable
> component holder net.leangen.expedition.integration.oauth2.credentials
> karaf.log.1:2016-05-04 05:53:24,226 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleComponentActivator : Bundle [68] Enabling
> component holder net.leangen.expedition.integration.oauth2.credentials
> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.credentials(-1)] Dependency
> Manager created useradmininterface=org.osgi.service.useradmin.UserA
> dmin, filter=(!(method=oauth2.0)), policy=static, cardinality=1..1,
> bind=null, unbind=null, updated=null, field=useradmin,
> field-option=replace, field-collect
> ion-type=null
> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.credentials(-1)] Component
> net.leangen.expedition.integration.oauth2.credentials created: DS=DS
> 13,
> implementation=net.leangen.expedition.integration.oauth2.client.ClientCredentialsService,
> immediate=false, default-enabled=true, factory=null, configurati
> on-policy=optional, activate=activate, deactivate=deactivate,
> modified=null
> configuration-pid=[net.leangen.expedition.integration.oauth2.credentials]
> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.credentials(-1)] Component
> net.leangen.expedition.integration.oauth2.credentials Services: scop
> e=singleton,
> services=[net.leangen.expedition.integration.oauth2.model.ClientCredentials]
> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.credentials(-1)] Component
> net.leangen.expedition.integration.oauth2.credentials Properties: {u
> seradmin.target=(!(method=oauth2.0))}
> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.credentials(-1)] Component can
> not be activated since it is in state 64
> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.credentials(2)] Updating target
> filters
> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.credentials(2)]  No existing
> service listener to unregister for dependency useradmin
> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.credentials(2)] Setting target
> property for dependency useradmin to (!(method=oauth2.0))
> karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.credentials(2)] New service
> tracker for useradmin, initial active: false, previous references:
> {}, classFilter: (objectClass=org.osgi.service.useradmin.UserAdmin),
> eventFilter (!(method=oauth2.0)), initialReferenceFilter
> (&(objectClass=org.osgi.service.
> useradmin.UserAdmin)(!(method=oauth2.0)))
> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.credentials(2)] dm useradmin
> tracker reset (closed)
> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | classNameFilter:
> (objectClass=org.osgi.service.useradmin.UserAdmin) event filter:
> (!(method=oauth2.0))
> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.credentials(2)] dm useradmin
> tracker opened
> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.credentials(2)] registering
> service listener for dependency useradmin
> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.credentials(2)] Component enabled
> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.credentials(2)] ActivateInternal
> karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.credentials(2)] Activating
> component from state 2
> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.credentials(2)] Dependency not
> satisfied: useradmin
> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.credentials(2)] Not all
> dependencies satisfied, cannot activate
> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleComponentActivator : Bundle [68] May enable
> component holder net.leangen.expedition.integration.oauth2
> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleComponentActivator : Bundle [68] Enabling
> component holder net.leangen.expedition.integration.oauth2
> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)]
> Dependency Manager created
> credsinterface=net.leangen.expedition.integration.oauth2.model.
> ClientCredentials, filter=null, policy=static, cardinality=1..1,
> bind=null, unbind=null, updated=null, field=creds, field-option=replace,
> field-collection-typ
> e=null
> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)]
> Component net.leangen.expedition.integration.oauth2 created: DS=DS13,
> implementation=net.l
> eangen.expedition.integration.oauth2.client.OauthService, immediate=false,
> default-enabled=true, factory=null, configuration-policy=optional,
> activate=activat
> e, deactivate=deactivate, modified=null
> configuration-pid=[net.leangen.expedition.integration.oauth2]
> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)]
> Component net.leangen.expedition.integration.oauth2 Services:
> scope=singleton, services=[n
> et.leangen.expedition.integration.oauth2.model.OAuth2]
> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)]
> Component net.leangen.expedition.integration.oauth2 Properties: {}
> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)]
> Component can not be activated since it is in state 64
> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)]
> Updating target filters
> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] No
> change in target property for dependency creds: currently registered: false
> karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)]  No
> existing service listener to unregister for dependency creds
> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Setting
> target property for dependency creds to null
> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] New
> service tracker for creds, initial active: false, previous references: {},
> classFilter:
>  (objectClass=net.leangen.expedition.integration.oauth2.model.ClientCredentials),
> eventFilter null, initialReferenceFilter (objectClass=net.leangen.expedition
> .integration.oauth2.model.ClientCredentials)
> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] dm
> creds tracker reset (closed)
> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | classNameFilter:
> (objectClass=net.leangen.expedition.integration.oauth2.model.ClientCredentials)
> event filter: null
> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] dm
> creds tracker opened
> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)]
> registering service listener for dependency creds
> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)]
> Component enabled
> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)]
> ActivateInternal
> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)]
> Activating component from state 2
> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)]
> Dependency not satisfied: creds
> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Not all
> dependencies satisfied, cannot activate
> karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleComponentActivator : Bundle [68] May enable
> component holder net.leangen.expedition.integration.oauth2.useradmin
> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleComponentActivator : Bundle [68] Enabling
> component holder net.leangen.expedition.integration.oauth2.useradmin
> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.useradmin(-1)] Dependency
> Manager created delegateinterface=org.osgi.service.useradmin.UserAdmi
> n, filter=(!(method=oauth2.0)), policy=static, cardinality=1..1,
> bind=null, unbind=null, updated=null, field=delegate, field-option=replace,
> field-collection-
> type=null
> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.useradmin(-1)] Dependency
> Manager created oauth2interface=net.leangen.expedition.integration.oa
> uth2.model.OAuth2, filter=null, policy=static, cardinality=1..1,
> bind=null, unbind=null, updated=null, field=oauth2, field-option=replace,
> field-collection-ty
> pe=null
> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.useradmin(-1)] Component
> net.leangen.expedition.integration.oauth2.useradmin created: DS=DS13,
> implementation=net.leangen.expedition.integration.oauth2.useradmin.OAuthUserAdminService,
> immediate=false, default-enabled=true, factory=null, configuration-p
> olicy=optional, activate=activate, deactivate=deactivate, modified=null
> configuration-pid=[net.leangen.expedition.integration.oauth2.useradmin]
> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.useradmin(-1)] Component
> net.leangen.expedition.integration.oauth2.useradmin Services: scope=si
> ngleton, services=[org.osgi.service.useradmin.UserAdmin,
> net.leangen.expedition.integration.oauth2.OAuthUserAdmin]
> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.useradmin(-1)] Component
> net.leangen.expedition.integration.oauth2.useradmin Properties: {metho
> d=oauth2.0, delegate.target=(!(method=oauth2.0))}
> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.useradmin(-1)] Component can not
> be activated since it is in state 64
> karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.useradmin(4)] Updating target
> filters
> karaf.log.1:2016-05-04 05:53:24,247 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.useradmin(4)]  No existing
> service listener to unregister for dependency delegate
> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.useradmin(4)] Setting target
> property for dependency delegate to (!(method=oauth2.0))
> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.useradmin(4)] New service
> tracker for delegate, initial active: false, previous references: {},
>  classFilter: (objectClass=org.osgi.service.useradmin.UserAdmin),
> eventFilter (!(method=oauth2.0)), initialReferenceFilter
> (&(objectClass=org.osgi.service.use
> radmin.UserAdmin)(!(method=oauth2.0)))
> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.useradmin(4)] dm delegate
> tracker reset (closed)
> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | classNameFilter:
> (objectClass=org.osgi.service.useradmin.UserAdmin) event filter:
> (!(method=oauth2.0))
> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.useradmin(4)] dm delegate
> tracker opened
> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.useradmin(4)] registering
> service listener for dependency delegate
> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.useradmin(4)] No change in
> target property for dependency oauth2: currently registered: false
> karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.useradmin(4)]  No existing
> service listener to unregister for dependency oauth2
> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.useradmin(4)] Setting target
> property for dependency oauth2 to null
> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.useradmin(4)] New service
> tracker for oauth2, initial active: false, previous references: {}, c
> lassFilter:
> (objectClass=net.leangen.expedition.integration.oauth2.model.OAuth2),
> eventFilter null, initialReferenceFilter (objectClass=net.leangen.expedition
> .integration.oauth2.model.OAuth2)
> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.useradmin(4)] dm oauth2 tracker
> reset (closed)
> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | classNameFilter:
> (objectClass=net.leangen.expedition.integration.oauth2.model.OAuth2) event
> filter: null
> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.useradmin(4)] dm oauth2 tracker
> opened
> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.useradmin(4)] registering
> service listener for dependency oauth2
> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.useradmin(4)] Component enabled
> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.useradmin(4)] ActivateInternal
> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.useradmin(4)] Activating
> component from state 2
> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.useradmin(4)] Dependency not
> satisfied: delegate
> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.useradmin(4)] Dependency not
> satisfied: oauth2
> karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 |
> [net.leangen.expedition.integration.oauth2.useradmin(4)] Not all
> dependencies satisfied, cannot activate
> karaf.log.1:2016-05-04 05:53:24,250 | DEBUG | pool-29-thread-1 | provider
>                         | 68 -
> net.leangen.expedition.integration.oauth.provider - 0
> .2.0.201605040539 | BundleEvent STARTED -
> net.leangen.expedition.integration.oauth.provider
>

Re: Bundle startup

Posted by David Leangen <ap...@leangen.net>.
Thanks, Morgan, that worked. :-)


The output is very long, and I’m not sure what to look for, but here it is…

Perhaps this is the relevant line (though I don’t know what it means…):

Component can not be activated since it is in state 64


Cheers,
=David


karaf.log.1:2016-05-04 05:53:23,480 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | BundleEvent INSTALLED - net.leangen.expedition.integration.oauth.provider
karaf.log.1:2016-05-04 05:53:24,027 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | BundleEvent RESOLVED - net.leangen.expedition.integration.oauth.provider
karaf.log.1:2016-05-04 05:53:24,205 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | BundleEvent STARTING - net.leangen.expedition.integration.oauth.provider
karaf.log.1:2016-05-04 05:53:24,207 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | BundleComponentActivator : Bundle [68] active
karaf.log.1:2016-05-04 05:53:24,207 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | BundleComponentActivator : Bundle [68] descriptor locations OSGI-INF/net.leangen.expedition.integration.oauth2.credentials.xml,OSGI-INF/ne
t.leangen.expedition.integration.oauth2.xml,OSGI-INF/net.leangen.expedition.integration.oauth2.useradmin.xml
karaf.log.1:2016-05-04 05:53:24,221 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | BundleComponentActivator : Bundle [68] ComponentHolder created for net.leangen.expedition.integration.oauth2.credentials
karaf.log.1:2016-05-04 05:53:24,224 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | BundleComponentActivator : Bundle [68] ComponentHolder created for net.leangen.expedition.integration.oauth2
karaf.log.1:2016-05-04 05:53:24,226 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | BundleComponentActivator : Bundle [68] ComponentHolder created for net.leangen.expedition.integration.oauth2.useradmin
karaf.log.1:2016-05-04 05:53:24,226 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | BundleComponentActivator : Bundle [68] May enable component holder net.leangen.expedition.integration.oauth2.credentials
karaf.log.1:2016-05-04 05:53:24,226 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | BundleComponentActivator : Bundle [68] Enabling component holder net.leangen.expedition.integration.oauth2.credentials
karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(-1)] Dependency Manager created useradmininterface=org.osgi.service.useradmin.UserA
dmin, filter=(!(method=oauth2.0)), policy=static, cardinality=1..1, bind=null, unbind=null, updated=null, field=useradmin, field-option=replace, field-collect
ion-type=null
karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(-1)] Component net.leangen.expedition.integration.oauth2.credentials created: DS=DS
13, implementation=net.leangen.expedition.integration.oauth2.client.ClientCredentialsService, immediate=false, default-enabled=true, factory=null, configurati
on-policy=optional, activate=activate, deactivate=deactivate, modified=null configuration-pid=[net.leangen.expedition.integration.oauth2.credentials]
karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(-1)] Component net.leangen.expedition.integration.oauth2.credentials Services: scop
e=singleton, services=[net.leangen.expedition.integration.oauth2.model.ClientCredentials]
karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(-1)] Component net.leangen.expedition.integration.oauth2.credentials Properties: {u
seradmin.target=(!(method=oauth2.0))}
karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(-1)] Component can not be activated since it is in state 64
karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Updating target filters
karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)]  No existing service listener to unregister for dependency useradmin
karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Setting target property for dependency useradmin to (!(method=oauth2.0))
karaf.log.1:2016-05-04 05:53:24,227 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] New service tracker for useradmin, initial active: false, previous references: 
{}, classFilter: (objectClass=org.osgi.service.useradmin.UserAdmin), eventFilter (!(method=oauth2.0)), initialReferenceFilter (&(objectClass=org.osgi.service.
useradmin.UserAdmin)(!(method=oauth2.0)))
karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] dm useradmin tracker reset (closed)
karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | classNameFilter: (objectClass=org.osgi.service.useradmin.UserAdmin) event filter: (!(method=oauth2.0))
karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] dm useradmin tracker opened
karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] registering service listener for dependency useradmin
karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Component enabled
karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] ActivateInternal
karaf.log.1:2016-05-04 05:53:24,228 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Activating component from state 2
karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Dependency not satisfied: useradmin
karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.credentials(2)] Not all dependencies satisfied, cannot activate
karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | BundleComponentActivator : Bundle [68] May enable component holder net.leangen.expedition.integration.oauth2
karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | BundleComponentActivator : Bundle [68] Enabling component holder net.leangen.expedition.integration.oauth2
karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)] Dependency Manager created credsinterface=net.leangen.expedition.integration.oauth2.model.
ClientCredentials, filter=null, policy=static, cardinality=1..1, bind=null, unbind=null, updated=null, field=creds, field-option=replace, field-collection-typ
e=null
karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)] Component net.leangen.expedition.integration.oauth2 created: DS=DS13, implementation=net.l
eangen.expedition.integration.oauth2.client.OauthService, immediate=false, default-enabled=true, factory=null, configuration-policy=optional, activate=activat
e, deactivate=deactivate, modified=null configuration-pid=[net.leangen.expedition.integration.oauth2]
karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)] Component net.leangen.expedition.integration.oauth2 Services: scope=singleton, services=[n
et.leangen.expedition.integration.oauth2.model.OAuth2]
karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)] Component net.leangen.expedition.integration.oauth2 Properties: {}
karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2(-1)] Component can not be activated since it is in state 64
karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Updating target filters
karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] No change in target property for dependency creds: currently registered: false
karaf.log.1:2016-05-04 05:53:24,229 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)]  No existing service listener to unregister for dependency creds
karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Setting target property for dependency creds to null
karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] New service tracker for creds, initial active: false, previous references: {}, classFilter:
 (objectClass=net.leangen.expedition.integration.oauth2.model.ClientCredentials), eventFilter null, initialReferenceFilter (objectClass=net.leangen.expedition
.integration.oauth2.model.ClientCredentials)
karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] dm creds tracker reset (closed)
karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | classNameFilter: (objectClass=net.leangen.expedition.integration.oauth2.model.ClientCredentials) event filter: null
karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] dm creds tracker opened
karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] registering service listener for dependency creds
karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Component enabled
karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] ActivateInternal
karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Activating component from state 2
karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Dependency not satisfied: creds
karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2(3)] Not all dependencies satisfied, cannot activate
karaf.log.1:2016-05-04 05:53:24,230 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | BundleComponentActivator : Bundle [68] May enable component holder net.leangen.expedition.integration.oauth2.useradmin
karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | BundleComponentActivator : Bundle [68] Enabling component holder net.leangen.expedition.integration.oauth2.useradmin
karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Dependency Manager created delegateinterface=org.osgi.service.useradmin.UserAdmi
n, filter=(!(method=oauth2.0)), policy=static, cardinality=1..1, bind=null, unbind=null, updated=null, field=delegate, field-option=replace, field-collection-
type=null
karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Dependency Manager created oauth2interface=net.leangen.expedition.integration.oa
uth2.model.OAuth2, filter=null, policy=static, cardinality=1..1, bind=null, unbind=null, updated=null, field=oauth2, field-option=replace, field-collection-ty
pe=null
karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Component net.leangen.expedition.integration.oauth2.useradmin created: DS=DS13, 
implementation=net.leangen.expedition.integration.oauth2.useradmin.OAuthUserAdminService, immediate=false, default-enabled=true, factory=null, configuration-p
olicy=optional, activate=activate, deactivate=deactivate, modified=null configuration-pid=[net.leangen.expedition.integration.oauth2.useradmin]
karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Component net.leangen.expedition.integration.oauth2.useradmin Services: scope=si
ngleton, services=[org.osgi.service.useradmin.UserAdmin, net.leangen.expedition.integration.oauth2.OAuthUserAdmin]
karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Component net.leangen.expedition.integration.oauth2.useradmin Properties: {metho
d=oauth2.0, delegate.target=(!(method=oauth2.0))}
karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(-1)] Component can not be activated since it is in state 64
karaf.log.1:2016-05-04 05:53:24,231 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Updating target filters
karaf.log.1:2016-05-04 05:53:24,247 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)]  No existing service listener to unregister for dependency delegate
karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Setting target property for dependency delegate to (!(method=oauth2.0))
karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] New service tracker for delegate, initial active: false, previous references: {},
 classFilter: (objectClass=org.osgi.service.useradmin.UserAdmin), eventFilter (!(method=oauth2.0)), initialReferenceFilter (&(objectClass=org.osgi.service.use
radmin.UserAdmin)(!(method=oauth2.0)))
karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] dm delegate tracker reset (closed)
karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | classNameFilter: (objectClass=org.osgi.service.useradmin.UserAdmin) event filter: (!(method=oauth2.0))
karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] dm delegate tracker opened
karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] registering service listener for dependency delegate
karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] No change in target property for dependency oauth2: currently registered: false
karaf.log.1:2016-05-04 05:53:24,248 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)]  No existing service listener to unregister for dependency oauth2
karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Setting target property for dependency oauth2 to null
karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] New service tracker for oauth2, initial active: false, previous references: {}, c
lassFilter: (objectClass=net.leangen.expedition.integration.oauth2.model.OAuth2), eventFilter null, initialReferenceFilter (objectClass=net.leangen.expedition
.integration.oauth2.model.OAuth2)
karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] dm oauth2 tracker reset (closed)
karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | classNameFilter: (objectClass=net.leangen.expedition.integration.oauth2.model.OAuth2) event filter: null
karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] dm oauth2 tracker opened
karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] registering service listener for dependency oauth2
karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Component enabled
karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] ActivateInternal
karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Activating component from state 2
karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Dependency not satisfied: delegate
karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Dependency not satisfied: oauth2
karaf.log.1:2016-05-04 05:53:24,249 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | [net.leangen.expedition.integration.oauth2.useradmin(4)] Not all dependencies satisfied, cannot activate
karaf.log.1:2016-05-04 05:53:24,250 | DEBUG | pool-29-thread-1 | provider                         | 68 - net.leangen.expedition.integration.oauth.provider - 0
.2.0.201605040539 | BundleEvent STARTED - net.leangen.expedition.integration.oauth.provider

Re: Bundle startup

Posted by Morgan Hautman <mo...@gmail.com>.
Hi David,

To set the Karaf log on DEBUG ,in the console type:

log:set DEBUG

Regards,
Morgan

2016-05-04 10:55 GMT+02:00 David Leangen <ap...@leangen.net>:

>
> Hmmmm… I am not able to set the debug level properly in Karaf.
>
> On this page:
>
>
> http://felix.apache.org/documentation/subprojects/apache-felix-service-component-runtime.html#configuration
>
> It says to set ds.loglevel = debug (confirmed here:
> http://svn.apache.org/repos/asf/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/config/ScrConfiguration.java
> ).
>
> The PID should be org.apache.felix.scr.ScrService, so I create a config
> file in etc (where all the others are stored) named
> org.apache.felix.scr.ScrService.cfg. Unfortunately, this does make any
> change to the logging level. :-(
>
>
> Along the way, I noticed that if the UserAdmin starts before my
> OAuthUserAdmin, the components get satisfied and work as expected. This
> does not smell right to me…
>
>
> Cheers,
> =David
>
>
>
> On May 4, 2016, at 3:34 PM, David Jencks <da...@gmail.com> wrote:
>
> The filters look OK to me (and you need them).  Are you sure you are still
> getting the cycle error?  You have a triangle which sometimes causes
> problems but I don’t see how it would here.  The debug logging ought to
> show you which UserAdmin is getting bound to each of your components so you
> should be able to check if the filter is actually working the way you
> expect.
>
> david jencks
>
> On May 3, 2016, at 11:08 PM, David Leangen <ap...@leangen.net> wrote:
>
>
> Hi David,
>
> Here are the xmls for the 3 components in the bundle:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.3.0"
> name="net.leangen.expedition.integration.oauth2.credentials"
> activate="activate">
> <implementation
> class="net.leangen.expedition.integration.oauth2.client.ClientCredentialsService"/>
> <service>
>   <provide
> interface="net.leangen.expedition.integration.oauth2.model.ClientCredentials"/>
> </service>
> <reference name="useradmin"
> interface="org.osgi.service.useradmin.UserAdmin"
> target="(!(method=oauth2.0))" field="useradmin"/>
> </scr:component>
>
> (I just added in the target filter. I could easily remove it again.)
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.3.0"
> name="net.leangen.expedition.integration.oauth2.useradmin"
> activate="activate">
> <implementation
> class="net.leangen.expedition.integration.oauth2.useradmin.OAuthUserAdminService"/>
> <service>
>   <provide interface="org.osgi.service.useradmin.UserAdmin"/>
>   <provide
> interface="net.leangen.expedition.integration.oauth2.OAuthUserAdmin"/>
> </service>
> <reference name="delegate"
> interface="org.osgi.service.useradmin.UserAdmin"
> target="(!(method=oauth2.0))" field="delegate"/>
> <reference name="oauth2"
> interface="net.leangen.expedition.integration.oauth2.model.OAuth2"
> field="oauth2"/>
> <property name="method" type="String" value="oauth2.0"/>
> </scr:component>
>
> (I just added in the target filter. I could easily remove it again.)
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.3.0"
> name="net.leangen.expedition.integration.oauth2">
> <implementation
> class="net.leangen.expedition.integration.oauth2.client.OauthService"/>
> <service>
>   <provide
> interface="net.leangen.expedition.integration.oauth2.model.OAuth2"/>
> </service>
> <reference name="creds"
> interface="net.leangen.expedition.integration.oauth2.model.ClientCredentials"
> field="creds"/>
> </scr:component>
>
>
>
> Cheers,
> =David
>
>
> On May 4, 2016, at 3:07 PM, David Jencks <da...@gmail.com> wrote:
>
> Maybe showing the component xml would be the quickest way to figure out
> the next step?  I suspect your filter isn’t quite right.  What are the
> service properties on the UserAdmin you aren’t supplying?
>
> david jencks
>
>
>
>
>
>

Re: Bundle startup

Posted by David Leangen <ap...@leangen.net>.
Hmmmm… I am not able to set the debug level properly in Karaf.

On this page:

  http://felix.apache.org/documentation/subprojects/apache-felix-service-component-runtime.html#configuration <http://felix.apache.org/documentation/subprojects/apache-felix-service-component-runtime.html#configuration>

It says to set ds.loglevel = debug (confirmed here: http://svn.apache.org/repos/asf/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/config/ScrConfiguration.java <http://svn.apache.org/repos/asf/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/config/ScrConfiguration.java>).

The PID should be org.apache.felix.scr.ScrService, so I create a config file in etc (where all the others are stored) named org.apache.felix.scr.ScrService.cfg. Unfortunately, this does make any change to the logging level. :-(


Along the way, I noticed that if the UserAdmin starts before my OAuthUserAdmin, the components get satisfied and work as expected. This does not smell right to me…


Cheers,
=David



> On May 4, 2016, at 3:34 PM, David Jencks <da...@gmail.com> wrote:
> 
> The filters look OK to me (and you need them).  Are you sure you are still getting the cycle error?  You have a triangle which sometimes causes problems but I don’t see how it would here.  The debug logging ought to show you which UserAdmin is getting bound to each of your components so you should be able to check if the filter is actually working the way you expect.
> 
> david jencks
> 
>> On May 3, 2016, at 11:08 PM, David Leangen <ap...@leangen.net> wrote:
>> 
>> 
>> Hi David,
>> 
>> Here are the xmls for the 3 components in the bundle:
>> 
>> <?xml version="1.0" encoding="UTF-8"?>
>> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.3.0" name="net.leangen.expedition.integration.oauth2.credentials" activate="activate">
>> <implementation class="net.leangen.expedition.integration.oauth2.client.ClientCredentialsService"/>
>> <service>
>>   <provide interface="net.leangen.expedition.integration.oauth2.model.ClientCredentials"/>
>> </service>
>> <reference name="useradmin" interface="org.osgi.service.useradmin.UserAdmin" target="(!(method=oauth2.0))" field="useradmin"/>
>> </scr:component>
>> 
>> (I just added in the target filter. I could easily remove it again.)
>> 
>> 
>> <?xml version="1.0" encoding="UTF-8"?>
>> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.3.0" name="net.leangen.expedition.integration.oauth2.useradmin" activate="activate">
>> <implementation class="net.leangen.expedition.integration.oauth2.useradmin.OAuthUserAdminService"/>
>> <service>
>>   <provide interface="org.osgi.service.useradmin.UserAdmin"/>
>>   <provide interface="net.leangen.expedition.integration.oauth2.OAuthUserAdmin"/>
>> </service>
>> <reference name="delegate" interface="org.osgi.service.useradmin.UserAdmin" target="(!(method=oauth2.0))" field="delegate"/>
>> <reference name="oauth2" interface="net.leangen.expedition.integration.oauth2.model.OAuth2" field="oauth2"/>
>> <property name="method" type="String" value="oauth2.0"/>
>> </scr:component>
>> 
>> (I just added in the target filter. I could easily remove it again.)
>> 
>> 
>> 
>> <?xml version="1.0" encoding="UTF-8"?>
>> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.3.0" name="net.leangen.expedition.integration.oauth2">
>> <implementation class="net.leangen.expedition.integration.oauth2.client.OauthService"/>
>> <service>
>>   <provide interface="net.leangen.expedition.integration.oauth2.model.OAuth2"/>
>> </service>
>> <reference name="creds" interface="net.leangen.expedition.integration.oauth2.model.ClientCredentials" field="creds"/>
>> </scr:component>
>> 
>> 
>> 
>> Cheers,
>> =David
>> 
>> 
>>> On May 4, 2016, at 3:07 PM, David Jencks <da...@gmail.com> wrote:
>>> 
>>> Maybe showing the component xml would be the quickest way to figure out the next step?  I suspect your filter isn’t quite right.  What are the service properties on the UserAdmin you aren’t supplying?
>>> 
>>> david jencks
>> 
>> 
> 


Re: Bundle startup

Posted by David Jencks <da...@gmail.com>.
The filters look OK to me (and you need them).  Are you sure you are still getting the cycle error?  You have a triangle which sometimes causes problems but I don’t see how it would here.  The debug logging ought to show you which UserAdmin is getting bound to each of your components so you should be able to check if the filter is actually working the way you expect.

david jencks

> On May 3, 2016, at 11:08 PM, David Leangen <ap...@leangen.net> wrote:
> 
> 
> Hi David,
> 
> Here are the xmls for the 3 components in the bundle:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.3.0" name="net.leangen.expedition.integration.oauth2.credentials" activate="activate">
>  <implementation class="net.leangen.expedition.integration.oauth2.client.ClientCredentialsService"/>
>  <service>
>    <provide interface="net.leangen.expedition.integration.oauth2.model.ClientCredentials"/>
>  </service>
>  <reference name="useradmin" interface="org.osgi.service.useradmin.UserAdmin" target="(!(method=oauth2.0))" field="useradmin"/>
> </scr:component>
> 
> (I just added in the target filter. I could easily remove it again.)
> 
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.3.0" name="net.leangen.expedition.integration.oauth2.useradmin" activate="activate">
>  <implementation class="net.leangen.expedition.integration.oauth2.useradmin.OAuthUserAdminService"/>
>  <service>
>    <provide interface="org.osgi.service.useradmin.UserAdmin"/>
>    <provide interface="net.leangen.expedition.integration.oauth2.OAuthUserAdmin"/>
>  </service>
>  <reference name="delegate" interface="org.osgi.service.useradmin.UserAdmin" target="(!(method=oauth2.0))" field="delegate"/>
>  <reference name="oauth2" interface="net.leangen.expedition.integration.oauth2.model.OAuth2" field="oauth2"/>
>  <property name="method" type="String" value="oauth2.0"/>
> </scr:component>
> 
> (I just added in the target filter. I could easily remove it again.)
> 
> 
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.3.0" name="net.leangen.expedition.integration.oauth2">
>  <implementation class="net.leangen.expedition.integration.oauth2.client.OauthService"/>
>  <service>
>    <provide interface="net.leangen.expedition.integration.oauth2.model.OAuth2"/>
>  </service>
>  <reference name="creds" interface="net.leangen.expedition.integration.oauth2.model.ClientCredentials" field="creds"/>
> </scr:component>
> 
> 
> 
> Cheers,
> =David
> 
> 
>> On May 4, 2016, at 3:07 PM, David Jencks <da...@gmail.com> wrote:
>> 
>> Maybe showing the component xml would be the quickest way to figure out the next step?  I suspect your filter isn’t quite right.  What are the service properties on the UserAdmin you aren’t supplying?
>> 
>> david jencks
> 
> 


Re: Bundle startup

Posted by David Leangen <ap...@leangen.net>.
Hi David,

Here are the xmls for the 3 components in the bundle:

<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.3.0" name="net.leangen.expedition.integration.oauth2.credentials" activate="activate">
  <implementation class="net.leangen.expedition.integration.oauth2.client.ClientCredentialsService"/>
  <service>
    <provide interface="net.leangen.expedition.integration.oauth2.model.ClientCredentials"/>
  </service>
  <reference name="useradmin" interface="org.osgi.service.useradmin.UserAdmin" target="(!(method=oauth2.0))" field="useradmin"/>
</scr:component>

(I just added in the target filter. I could easily remove it again.)


<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.3.0" name="net.leangen.expedition.integration.oauth2.useradmin" activate="activate">
  <implementation class="net.leangen.expedition.integration.oauth2.useradmin.OAuthUserAdminService"/>
  <service>
    <provide interface="org.osgi.service.useradmin.UserAdmin"/>
    <provide interface="net.leangen.expedition.integration.oauth2.OAuthUserAdmin"/>
  </service>
  <reference name="delegate" interface="org.osgi.service.useradmin.UserAdmin" target="(!(method=oauth2.0))" field="delegate"/>
  <reference name="oauth2" interface="net.leangen.expedition.integration.oauth2.model.OAuth2" field="oauth2"/>
  <property name="method" type="String" value="oauth2.0"/>
</scr:component>

(I just added in the target filter. I could easily remove it again.)



<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.3.0" name="net.leangen.expedition.integration.oauth2">
  <implementation class="net.leangen.expedition.integration.oauth2.client.OauthService"/>
  <service>
    <provide interface="net.leangen.expedition.integration.oauth2.model.OAuth2"/>
  </service>
  <reference name="creds" interface="net.leangen.expedition.integration.oauth2.model.ClientCredentials" field="creds"/>
</scr:component>



Cheers,
=David


> On May 4, 2016, at 3:07 PM, David Jencks <da...@gmail.com> wrote:
> 
> Maybe showing the component xml would be the quickest way to figure out the next step?  I suspect your filter isn’t quite right.  What are the service properties on the UserAdmin you aren’t supplying?
> 
> david jencks



Re: Bundle startup

Posted by David Jencks <da...@gmail.com>.
Maybe showing the component xml would be the quickest way to figure out the next step?  I suspect your filter isn’t quite right.  What are the service properties on the UserAdmin you aren’t supplying?

david jencks

> On May 3, 2016, at 10:52 PM, David Leangen <ap...@leangen.net> wrote:
> 
> Hi Christian,
> 
> Here is an edited excerpt of the generated manifest:
> 
> Export-Package: 
> 	mypackage.oauth2;version="0.2.0”,
> 	org.osgi.service.useradmin;version="1.1";uses:="org.osgi.framework"
> 
> Import-Package:
> 	javax.net,javax.net.ssl,javax.security.auth.x500,
> 	mypackage.oauth2;
> 	version="[0.2,0.3)",org.osgi.framework;version="[1.8,2)”,
> 	org.osgi.service.component;version="[1.3,2)”,
> 	org.osgi.service.useradmin;version="[1.1,1.2)"
> 
> 
> By the way, adding the exclusionary filter to the UserAdmin reference did not seem to rectify the problem. :-(
> 
> 
> Cheers,
> =David
> 
> 
>> On May 4, 2016, at 2:43 PM, Christian Schneider <ch...@die-schneider.net> wrote:
>> 
>> Maybe it is also an issue of a duplicate package export. Does your bundle maybe export but not import the UserAdmin package? In this case it would see a different instance of the package and would not be able to see the original UserAdmin.
>> 
>> Christian
>> 
> 


Re: Bundle startup

Posted by David Leangen <ap...@leangen.net>.
Hi Christian,

Here is an edited excerpt of the generated manifest:

Export-Package: 
	mypackage.oauth2;version="0.2.0”,
	org.osgi.service.useradmin;version="1.1";uses:="org.osgi.framework"

Import-Package:
	javax.net,javax.net.ssl,javax.security.auth.x500,
	mypackage.oauth2;
	version="[0.2,0.3)",org.osgi.framework;version="[1.8,2)”,
	org.osgi.service.component;version="[1.3,2)”,
	org.osgi.service.useradmin;version="[1.1,1.2)"


By the way, adding the exclusionary filter to the UserAdmin reference did not seem to rectify the problem. :-(


Cheers,
=David


> On May 4, 2016, at 2:43 PM, Christian Schneider <ch...@die-schneider.net> wrote:
> 
> Maybe it is also an issue of a duplicate package export. Does your bundle maybe export but not import the UserAdmin package? In this case it would see a different instance of the package and would not be able to see the original UserAdmin.
> 
> Christian
> 


Re: Bundle startup

Posted by Christian Schneider <ch...@die-schneider.net>.
Maybe it is also an issue of a duplicate package export. Does your bundle
maybe export but not import the UserAdmin package? In this case it would
see a different instance of the package and would not be able to see the
original UserAdmin.

Christian


2016-05-04 7:24 GMT+02:00 David Leangen <ap...@leangen.net>:

>
> Thanks for the tips.
>
> This is what I found:
>
>  FrameworkEvent ERROR - net.leangen.expedition.platform.web.provider
> org.osgi.framework.ServiceException: ServiceFactory.getService() resulted
> in a cycle.
>
> Unfortunately, this doesn’t really tell me much.
>
> I think this may be related to the fact that the bundle in question also
> implements and exports UserAdmin. It is intended to be an OAuth
> implementation. It requires a UserAdmin before it can work.
>
> Likely, DS tries the UserAdmin that is implemented in the same bundle,
> detects a cycle (which is not incorrect), then gives up, and does not retry
> when the independent UserAdmin gets activated.
>
> I suppose that I could try an exclusive filter so that, I assume, DS does
> not try to use the internal UserAdmin for wiring.
>
>
> Cheers,
> =David
>
>
>


-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.liquid-reality.de>

Open Source Architect
http://www.talend.com
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.talend.com>

Re: Bundle startup

Posted by David Leangen <ap...@leangen.net>.
Thanks for the tips.

This is what I found:

 FrameworkEvent ERROR - net.leangen.expedition.platform.web.provider
org.osgi.framework.ServiceException: ServiceFactory.getService() resulted in a cycle.

Unfortunately, this doesn’t really tell me much.

I think this may be related to the fact that the bundle in question also implements and exports UserAdmin. It is intended to be an OAuth implementation. It requires a UserAdmin before it can work.

Likely, DS tries the UserAdmin that is implemented in the same bundle, detects a cycle (which is not incorrect), then gives up, and does not retry when the independent UserAdmin gets activated.

I suppose that I could try an exclusive filter so that, I assume, DS does not try to use the internal UserAdmin for wiring.


Cheers,
=David



Re: Bundle startup

Posted by David Jencks <da...@yahoo.com>.
Hmm, that doesn’t look to me like the scr command output so I’m not able to completely trust it.
If you turn up DS logging what does it show?  I’m not sure how to do this in karaf, but you need to set the log service to output debug level, and also set the scr property ds.loglevel=debug either in ds configuration or as a framework property.  You should see a lot of info when your component starts and in particular what happens when it looks for the UserAdmin reference.  If the UserAdmin hasn’t started yet you should see more activity when it does start from the service event.

Is there any isolation in your karaf instance, perhaps subsystems or regions?

thanks
david jencks

> On May 3, 2016, at 8:16 PM, David Leangen <ap...@leangen.net> wrote:
> 
> 
> Hi, David,
> 
>> There must be a lot more going on for this to fail.  This kind of situation normally works fine with scr.  If you turn up ds logging, what do you see as the reason your component won’t start?  What does the console say about the state of the component (assuming the console uses the scr commands or equivalent info).
> 
> When I do scr:list, I get this:
> 
>  [  68]   mypackage.oauth2.credentials  enabled
>     [   2] [unsatisfied reference] 
> 
> So I try this:
> 
> karaf@root()> scr:details mypackage.oauth2.credentials
> Component Details
>   Name                : mypackage.oauth2.credentials
>   State               : UNSATISFIED
> References
>   Reference           : useradmin
>     State             : unsatisfied
>     Multiple          : single
>     Optional          : mandatory
>     Policy            : static
>     Service Reference : No Services bound
> 
> But I can also see:
> 
> karaf@root()> bundle:services 87
> 
> UserAdmin (87) provides:
> ------------------------
> [org.osgi.service.useradmin.UserAdmin]
> 
> So, there is a UserAdmin, but my component does not get wired with it.
> 
>> Also be careful with your terminology.  “enabled” is normally something your don’t deal with and without really special circumstances all your components should be configured as enabled by default.  You’d have to have code to enable them otherwise.  I suspect you mean “activated”? or maybe “satisfied”?
> 
> Indeed!
> 
> “Unsatisfied” would be correct. Thanks for pointing this out.
> 
> Cheers,
> =David
> 


Re: Bundle startup

Posted by David Leangen <ap...@leangen.net>.
Hi, David,

> There must be a lot more going on for this to fail.  This kind of situation normally works fine with scr.  If you turn up ds logging, what do you see as the reason your component won’t start?  What does the console say about the state of the component (assuming the console uses the scr commands or equivalent info).

When I do scr:list, I get this:

 [  68]   mypackage.oauth2.credentials  enabled
    [   2] [unsatisfied reference] 

So I try this:

karaf@root()> scr:details mypackage.oauth2.credentials
Component Details
  Name                : mypackage.oauth2.credentials
  State               : UNSATISFIED
References
  Reference           : useradmin
    State             : unsatisfied
    Multiple          : single
    Optional          : mandatory
    Policy            : static
    Service Reference : No Services bound

But I can also see:

karaf@root()> bundle:services 87

UserAdmin (87) provides:
------------------------
[org.osgi.service.useradmin.UserAdmin]

So, there is a UserAdmin, but my component does not get wired with it.

> Also be careful with your terminology.  “enabled” is normally something your don’t deal with and without really special circumstances all your components should be configured as enabled by default.  You’d have to have code to enable them otherwise.  I suspect you mean “activated”? or maybe “satisfied”?

Indeed!

“Unsatisfied” would be correct. Thanks for pointing this out.

Cheers,
=David


Re: Bundle startup

Posted by David Jencks <da...@gmail.com>.
Also be careful with your terminology.  “enabled” is normally something your don’t deal with and without really special circumstances all your components should be configured as enabled by default.  You’d have to have code to enable them otherwise.  I suspect you mean “activated”? or maybe “satisfied”?

david jencks

> On May 3, 2016, at 8:09 PM, David Jencks <da...@gmail.com> wrote:
> 
> There must be a lot more going on for this to fail.  This kind of situation normally works fine with scr.  If you turn up ds logging, what do you see as the reason your component won’t start?  What does the console say about the state of the component (assuming the console uses the scr commands or equivalent info).
> 
> thanks
> david jencks
> 
>> On May 3, 2016, at 7:58 PM, David Leangen <ap...@leangen.net> wrote:
>> 
>> 
>> Hi!
>> 
>> When I start up Karaf, all my bundles are activated, but a component service is one bundle is not enabled.
>> 
>> The service does not start because it is not provided with a UserAdmin. Judging by the ordering, this is surely true when the system starts.
>> 
>> When I log into the console (after all bundles have activated), I can see that there is indeed a UserAdmin. If I restart my bundle, the UserAdmin dependency is wired and my component gets enabled. If I restart the container after that, there are no problems. This problem only occurs upon initial startup.
>> 
>> 
>> I suspect this is a bug with SCR. Likely, after the initial try, it does not try to activate the component again even if it finds a UserAdmin. But before I file a bug, does anybody have any suggestions as to how I can confirm?
>> 
>> 
>> Thanks!
>> =David
>> 
>> 
> 


Re: Bundle startup

Posted by David Jencks <da...@gmail.com>.
There must be a lot more going on for this to fail.  This kind of situation normally works fine with scr.  If you turn up ds logging, what do you see as the reason your component won’t start?  What does the console say about the state of the component (assuming the console uses the scr commands or equivalent info).

thanks
david jencks

> On May 3, 2016, at 7:58 PM, David Leangen <ap...@leangen.net> wrote:
> 
> 
> Hi!
> 
> When I start up Karaf, all my bundles are activated, but a component service is one bundle is not enabled.
> 
> The service does not start because it is not provided with a UserAdmin. Judging by the ordering, this is surely true when the system starts.
> 
> When I log into the console (after all bundles have activated), I can see that there is indeed a UserAdmin. If I restart my bundle, the UserAdmin dependency is wired and my component gets enabled. If I restart the container after that, there are no problems. This problem only occurs upon initial startup.
> 
> 
> I suspect this is a bug with SCR. Likely, after the initial try, it does not try to activate the component again even if it finds a UserAdmin. But before I file a bug, does anybody have any suggestions as to how I can confirm?
> 
> 
> Thanks!
> =David
> 
>