Expand my Community achievements bar.

SOLVED

Service object( @Reference private RenditionMaker renditionMaker;) is coming null when I try to include it in OSGi component

Avatar

Level 2

Service object( @Reference     private RenditionMaker renditionMaker;) is coming null when I try to include it in OSGi component, but working fine in OOTB CreateThumbnailProcess.java OSGi component. 

 
1 Accepted Solution

Avatar

Correct answer by
Level 10

Try doing this.

1. delete the bundle. Restart your instance and install the bundle and see if it picks up the reference.

2. Try referencing the service without the annotation. refer [1] and see if it solves your problem

    [1] http://adobeaemclub.com/osgi-services-without-annotation/

View solution in original post

3 Replies

Avatar

Level 9

could you please post entire error/exception stack trace.

Avatar

Correct answer by
Level 10

Try doing this.

1. delete the bundle. Restart your instance and install the bundle and see if it picks up the reference.

2. Try referencing the service without the annotation. refer [1] and see if it solves your problem

    [1] http://adobeaemclub.com/osgi-services-without-annotation/

Avatar

Employee Advisor

Hi,

can you post the relevant code (specially the defintion including the annotations) as well?