ComponentAccessor not found

Michael Ilewicz October 19, 2020

Hi, 

I am fairly new to Jira and Java so please excuse if that is a poor question. I am trying to implement a groovy script via JMWE but I found that I have issues with the ComponentAccessor. I have tried to copy a number of scripts, all using the CcomponentAccessor and testing it using the JMWE Groovy Console. Each time I call the ComponentAccessor, for example in the following code

import com.atlassian.jira.component.ComponentAccessor

return(ComponentAccessor)

I get the Message 

Script testing failed with a server error.

I tried to search for the Component through the Interface and it returns ComponentAccessor does not exist.

Does that mean that I can't use the ComponentAccessor with the JMWE? Or do I need to do some extra steps?

2 answers

1 accepted

1 vote
Answer accepted
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 19, 2020

com.atlassian.jira.component.ComponentAccessor is actually imported by default. Can you try removing the import?

0 votes
Eddy Fras November 20, 2020

Same pb for me on my staging env on self hosted Jira DC 8.5.8, ComponentAccessor causes the error and I get the same error message on Groovy console.

The same script on my prod env runs perfectly, with the same version of JMWE plugin version (6.2.4).

Removing the import doesn't change anything.

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 20, 2020

We will soon be releasing a new version of JMWE that should fix this random issue. For now, the workaround is to restart Jira.

Like Eddy Fras likes this
Eddy Fras November 23, 2020

Thanks David for your answer, a simple disable/enable plugin was enough to fix the issue.

Suggest an answer

Log in or Sign up to answer