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 <apa...@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 >