Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


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
AUG Leaders

Atlassian Community Events