• Community
  • Products
  • Jira
  • Jira Core
  • Questions
  • I wrote groovy script for jira-Unlicense users, Script is working fine in scriptrunner..but when deploying in the jira-servers..I am facing this issue..Plz help me out.

I wrote groovy script for jira-Unlicense users, Script is working fine in scriptrunner..but when deploying in the jira-servers..I am facing this issue..Plz help me out.

java.lang.IllegalStateException: ComponentAccessor has not been initialised.

This is not expected to occur on a production system.
Developers that encounter this message within a unit test
should use n MockitoMocksInContainer rule to initialize mockito and ComponentAccessor.
For more detailed explanation read the documentation
for MockComponentWorker in the jira-tests artifact for more information
about what causes this error and how to address it.


at com.atlassian.jira.component.ComponentAccessor.getWorker(ComponentAccessor.java:673)
at com.atlassian.jira.component.ComponentAccessor.getComponent(ComponentAccessor.java:160)
at com.atlassian.jira.component.ComponentAccessor$getComponent.call(Unknown Source)
at unlicenseusers.changeToInactiveUsers(unlicenseusers.groovy:54)
at unlicenseusers.run(unlicenseusers.groovy:122)

2 answers

1 accepted

0 votes
Accepted answer

@Nic Brough [Adaptavist]Any help..Still struck in the same problem

0 votes

Are your JIRA test and production systems the same version and running on the same version of Java?

Yes..we are running the same version of the java for all.. 

And Jira?

Yes for JIRA too..running the same verisons

Then what are the differences between test and production?  How are they running differently?  Check the system info page for both and look for differences.

Testing(groovy script) was done in the scriptrunner tool..and was working good in that..But when it comes to deploying in the linux server,  running as shell script..this creates the problem

Sorry, what? 

What bash script?  What has that got to do with JIRA?   Why aren't you running the scrip in the same way you did on test? 

Suggest an answer

Log in or Sign up to answer
Community showcase
Asked Thursday in Jira Ops

I'm John Allspaw, Ask Me Anything about incident analysis and postmortems

I'm John Allspaw, co-founder of   Adaptive Capacity Labs, where we help teams use their incidents to learn and improve. We bring research-driven methods and approaches to drive effective inciden...

5,364 views 21 17
View question

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