Unable to inject ComponentAccessor or EpicLinkManager (greenhopper) into my class

I have been trying to inject either the ComponentAccessor or EpicLinkManager into my constructor but run into some issues.

If I use EpicLinkManager in my constructor:

public MyWebworkModuleAction( @ComponentImport IssueService issueService, .....@ComponentImport EpicLinkManager epicLinkManager) {

after adding jira-greenhopper-plugin (6.7.4) from com.atlassian.jira.plugins to my pom.xml the atlas-run will compile and run it but the plugin will not be loaded (ie its web item is missing from the more menu).

If I use ComponentAccessor instead of the EpicLinkManager (to try to access EpicLinkManager over it) it hangs at atlas-run with a count down:

public MyWebworkModuleAction( @ComponentImport IssueService issueService, .....@ComponentImport ComponentAccessor componentAccessor) {

[INFO] [talledLocalContainer] 2017-11-29 09:21:34,689 localhost-startStop-1 INFO      [c.a.plugin.util.WaitUntil] Plugins that have yet to be enabled: (2): [com.xyx.xyz, com.xyzxyz.xyz-tests], 12 seconds remaining

Even though I might have issues with the greenhopper one I would expect that the ComponentAccessor would load without issues considering its more frequent used. None of the other components (like IssueLinkManager or PageBuilderService) I am injecting has any issues, its just these so far.

Anyone any ideas? Thanks!

1 answer

1 accepted

1 vote
Answer accepted
Micky CARITTE Community Champion Nov 29, 2017

Hi Martin,

ComponentAccessor is mainly a static accessor which means you can import its package and simply use it like:

ProjectManager pm = ComponentAccessor.getProjectManager();

I guess you can therefore use:

EpicLinkManager elm = ComponetAccessor.getComponentOfType(EpicLinkManager.class);

Hope this helps!

Thanks Micky, it worked for the ComponentAccessor but still no go on getting an instance of the EpicLinkManager. I posted another question solely about the EpicLinkManager as I suspect I am messing up somewhere. https://community.atlassian.com/t5/Jira-Software-questions/How-do-I-create-a-EpicLinkManagerImpl-instance/qaq-p/681536

This one is answered for the ComponentAccessor

Micky CARITTE Community Champion Nov 30, 2017

Glad to hear it helped, will try and give you some input in the other thread!


Doing it this way in my SpringBoot application I always get an Exception that the ComponentAccessor is not initialized.

  ComponentAccessor has not been initialised.

 Can anybody tell me what I have to do that the ComponentAccessort will be properly initialized in a SpringBoot environment? Finally, I want to access the CustomFieldManager to work upon CustomFields...



customfieldMap.forEach((k, v) -> {
CustomFieldManager cfm = ComponentAccessor.getComponent(CustomFieldManager.class);
CustomField cf = cfm.getCustomFieldObjectByName(k);


I get this exception even when I explicitely autowire the ComponentAccessor with 

 private ComponentAccessor componentAccessor;

public void setComponentAccessor(final ComponentAccessor componentAccessor) {

    this.componentAccessor = componentAccessor;


...but the ComponentAccessor should be accessed in a static way anyway, shouldn't it!?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 26, 2019 in Jira Software

How to prevent the propagation of unused project schemes, workflows & screens in Jira software

Atlassian ranks project attributes as the third most important factor impacting performance in the category of data. It’s not surprising, since project attributes are precisely the rules used to ma...

612 views 0 7
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you