Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
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?