title: AEM : getSlingScriptHelper().getService returns null
body: <p>I am trying to use the getSlingScriptHelper().getService in my project but it keeps returning null. I have done this in other projects and the implementation is similar. We are using sightly on AEM 6.3 in the project. My code below:</p>
  
  <p><strong>FOOModel</strong> : </p>
  
  <pre><code>  public class FOOModel extends WCMUsePojo {
  
  private static final Logger LOGGER = LoggerFactory.getLogger(FOOModel.class);
  
          private String foo;
  
  
          @Override
          public void activate() throws Exception{
  
              FOOInterface fooInterface = getSlingScriptHelper().getService(FOOInterface.class);   
  
          LOGGER.info("FOOInterface value is : " + fooInterface);
  
          }
  
          public String getFoo() {        
              return foo;
          }
  
      }
  </code></pre>
  
  <p><strong>FooInterface</strong> : </p>
  
  <pre><code>public interface FOOInterface {
  
      public String getFoo();
  
  }
  </code></pre>
  
  <p><strong>FOO Implementation</strong> : </p>
  
  <pre><code>@Component(metatype = true, immediate = true, label = "FOO Configuration", description = "OSGi Configuration FOO")
  @Service(FOOInterface.class)
  public class FOOImpl implements FOOInterface {
  
  
      @Property(label = "FOO", description = "FOO to be provided")
      public static final String FOO_URL = "foo.url";
  
  
      private String foo;
  
  
  
      @Activate
      public void activate(ComponentContext componentContext){
          Dictionary&lt;?, ?&gt; props = componentContext.getProperties();
          this.foo = PropertiesUtil.toString(props.get(FOO_URL), StringUtils.EMPTY);
  
      }
  
      @Override
      public String getSsoUrl() {
          return foo;
      }
  
  
  }
  </code></pre>
  
  <p>The logs show "FOOInterface value is : null".</p>
  
  <p>I've tried the sling model with class injection method but it did not work either.</p>
  
  <p>EDIT : I have found that the service is not active. Attaching screenshot for the bundle status. 
  <a href="https://i.stack.imgur.com/rZrhi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rZrhi.png" alt="Bundle status"></a></p>