Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [equinox-dev] EventAdmin ServiceReference is always null?

That did it... all seems kind of obvious now!  

Thanks much,
Cameron.

P.S. Which is the most appropriate venue for this type of question... the equinox-dev list or the
eclipse.technology.equinox newsgroup?

-----Original Message-----
From: equinox-dev-bounces@xxxxxxxxxxx [mailto:equinox-dev-bounces@xxxxxxxxxxx] On Behalf Of Jeremy
Volkman
Sent: Friday, May 12, 2006 9:41 AM
To: Equinox development mailing list
Subject: Re: [equinox-dev] EventAdmin ServiceReference is always null?

You haven't actually installed an started an Event Admin implementation, as far as I can tell.  The
Event Admin is a standard OSGi service, so the relevant APIs are included in the
org.eclipse.osgi.services bundle (therefore everything compiles fine).
The implementation bundle for Event Admin will vary depending on which one you want to use.  Equinox
has an implementation (org.eclipse.equinox.event), as does the Apache Felix team.  Once you install
and start an actual Event Admin implementation, you should be able to get a ServiceReference.

Note that the OSGi LogService API is also included in the org.eclipse.osgi.services bundle in the
same way that EventAdmin is, but you have a LogService implementation loaded already:
org.eclipse.equinox.log.

Jeremy

On 5/12/06, Cameron Ross <cross@xxxxxxxxxxxxxxxx> wrote:
>
>
> Hello,
>
> I am unable to obtain a valid ServiceReference for the EventAdmin 
> service shipped with 3.2RC3.  The start method in my Activator class 
> looks like
> this:
>
> public void start(BundleContext context) throws Exception {
>     ServiceReference serviceRef =
> context.getServiceReference(EventAdmin.class.getName());
>     // serviceRef is always null!
> }
>
> The following items are selected in both the Eclipse 
> "Window->Preferences->Plug-in Development->Target Platform->Plug-ins" 
> and "Run->Run...->Plug-ins->Target Platform" areas:
>   - org.eclipse.equinox.log(1.0.0.v20060206)
>   - org.eclipse.osgi(3.2.0.v20060505)
>   - org.eclipse.osgi.services(3.1.100.20060426)
>
>
> My manifest contains the following header and everything compiles nicely:
>     Import-Package: org.osgi.framework, org.osgi.service.event, 
> org.osgi.util.tracker
>
> I'm running Eclipse 3.2-RC3 (Version 3.2.0, Build ID I20060505-1306) 
> with Sun's JRE 1.5.0_06 on Windows XP Professional SP2.
>
> Note that I am able to get a ServiceReference to the LogService.  Any 
> help is greatly appreciated.
>
> Thanks,
> Cameron Ross.
>
>
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>
>
>
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev



Back to the top