OSGI components in custom service

Hi all,
I have custom service implemented for the Jira. My custom service extends AbstractService.

Then I have my component implemented.
This Component is used in many classes and is wired with the standard way in the constructor.

I use this component in my custom service as well.
Service calls ComponentAccessor.getOSGiComponentInstanceOfType in the Run() method to get instance of my component.

Everything works fine on Jira 8.
But on Jira 9 everything works fine except to call ComponentAccessor.getOSGiComponentInstanceOfType in my custom service. ComponentAccessor.getOSGiComponentInstanceOfType returns null.

Service has not constructor and when I have tried to add it, Jira didn’t load my plugin.

I spent whole day to find the solution. I read a lot of documentation, Atlassian articles but I have no solution.

Does anybody know about anything what was changed in Jira 9 what has impact to call ComponentAccessor.getOSGiComponentInstanceOfType in the Run() method? Or how wire components in the custom service?

1 Like