Solved
AEM 6.5 - References in service class are null when extended
Am running application in AEM 6.5. I wrote service class with some References and uses SCR annotations. When extending this class and try to call the methods in the parent class the reference are null throwing Null Pointer Exception.
import org.apache.felix.scr.annotations.Component; import org.apache.felix.scr.annotations.Service; @Component @Service public class BaseClass implements IBase { @Reference protected HelperServiceImpl helperServiceImpl; protected void someMethod() { helperServiceImpl.getHelp(); //Here the helperServiceImpl is null when called from the extended class } } import org.apache.felix.scr.annotations.Component; import org.apache.felix.scr.annotations.Service; @Component @Service public class ExtendedClass extends BaseClass implements IExtend { protected void someMethod2() { helperServiceImpl.getHelp(); //Call HelperServiceImpl class reference which is present in parent class } }