Hi,

Try to add the Service class package to 
Constants.FRAMEWORK_SYSTEMPACKAGES_EXTRA.
You need to ensure that it uses the same class inside and outside the framework.

Regards,

Clement

On 04.03.2012, at 18:10, Pierre-Gildas MILLON wrote:

> Hi Clement,
> 
> Thanks for your quick answer but it does not solve the problem...
> 
> Nothing on the console and when I try to get an instance of my service 
> through the API:
> 
> ServiceReference< Service> serviceRef = 
> ctx.getServiceReference(Service.class);
> Service myService = ctx.getService(serviceRef);
> 
> I've got a NPE:
> 
> java.lang.NullPointerException: Specified service reference cannot be null.
> 
> :/
> 
> Le 04/03/2012 17:59, Clement Escoffier a écrit :
>> Hi,
>> 
>> Add @Instantiate to your component class to instruct iPOJO to create an 
>> instance of your component:
>> @Component
>> @Provides
>> @Instantiate
>> public class ServiceImpl implements Service {
>> 
>> 
>> Regards,
>> 
>> Clement
>> 
>> On 04.03.2012, at 17:20, Pierre-Gildas MILLON wrote:
>> 
>>> Hi People,
>>> 
>>> I try to use iPojo in a Maven project that embed Felix.
>>> 
>>> I've followed the guidelines to embed Felix in an app and my simple bundle
>>> that prints Hello World from the activator works fine.
>>> 
>>> Now I'd like to use iPojo to publish a service from my bundle (more
>>> interesting than printing Hello World).
>>> I'm using the annotations following the "Getting Started" from the iPojo
>>> website.
>>> But me service doesn't seem to be published.
>>> 
>>> If someone could help me, it's rather confusing.
>>> 
>>> The code is available :
>>> https://gist.github.com/7bfc30226c6b1acad5e5
>>> 
>>> Regards,
>> 

Reply via email to