You're probably missing a bundle that provides the service. Neil
-- Neil Bartlett Sent from a phone On Saturday, 25 October 2014 at 15:17, Artem Zhirkov wrote: > Ok, I tried to make a custom Activator for the main bundle and added a > ServiceTracker for RepositoryAdmin service...still can't get this > service, it's not available in ServiceTracker. Seems like I missing > something... > > > On 25.10.2014 15:40, Artem Zhirkov wrote: > > Hello, > > > > I'm trying to retrieve a reference to RepositoryAdmin service like that: > > > > > public static RepositoryAdmin getRepositoryAdmin(BundleContext ctx){ > > > ServiceReference reference = > > > ctx.getServiceReference(RepositoryAdmin.class.getName()); > > > if (reference != null){ > > > return (RepositoryAdmin)ctx.getService(reference); > > > } > > > System.out.println("Reference null"); > > > return null; > > > } > > > > > > > > > but it always prints Reference null. What I'm doing wrong? > > BundleContext is received from Framework which is produced by > > FrameworkFactory with no config parameters. > > > > Thanks > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@felix.apache.org > > For additional commands, e-mail: users-h...@felix.apache.org > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@felix.apache.org > For additional commands, e-mail: users-h...@felix.apache.org > >