Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

unsatisfied OSGi dependency at runtime for a JIRA Server service class.

hi all,

for our JIRA server installation, I need to create a service which can be modified using the admin page.

It requires the usage of several services and components from the JIRA Agile plugin (formerly Greenhopper)

I do not have an in-depth knowledge of OSGi/Spring.

when I try to configure the service using the JIRA administratore interface I get:

Error adding service: org.picocontainer.injectors.AbstractInjector$UnsatisfiableDependenciesException: com.mtricks.jira.webwork.MyPluginService has unsatisfied dependency 'interface com.atlassian.greenhopper.service.sprint.SprintService' for constructor 'public com.mtricks.jira.webwork.MyPluginService(com.atlassian.greenhopper.service.sprint.SprintService)' from org.picocontainer.DefaultPicoContainer@5705a9b6:1<[Immutable]:com.atlassian.jira.component.pico.CachingMutablePicoContainer@1c68ea0f.

but judging by the OSGi browser of my installation, the com.atlassian.greenhopper.service.sprint.SprintService is actually made available by the OSGi

My Assumptions:

  1. my class shall inherit from AbstractService
  2. the required services (SprintService, IssueSprintService, RapidViewService) can only be called via the OSGi mechanism, and not with the ComponentAccessor
  3. in order to use the OSGi mechanism my plugin must declare an Atlassian-Plugin-Key
  4. declaring an Atlassian-Plugin-Key makes a <Component> declaration in the atlassian-plugin.xml illegal
  5. without <component> declaration, the only way to make my plugin palatable to OSGi is declaring the class a @ExportAsService
  6. the constructor for my plugin's class needs to use the @ComponentImport notation

I am using a standard (and constant) XML to inform Spring of my component:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=""

My class constructor looks like:


public MyPluginService(@ComponentImport SprintService sprintService ) {
log = Category.getInstance("SED.JIRA.GENERIC");
this.sprintService = sprintService;
if(sprintService == null) {
log.error("Empty class sprintService");
shwc = new SomeHelloWorldClass();

and the class itself is prefixed by:

@ExportAsService (though Ia m not too sure it is needed in the first since I do not care exposing it to other plug-ins).

The pom.xml contains:



<!-- Add package to export here -->
<!-- Add package import here -->

I am on JIRA server 8.20.8, and my plugin version is 2.

Can anyone tell me if any of my assumptions is wrong, or which error I am making?
Thanks in advance,


0 answers

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events