Script Runner(groovy script) is not working

I have installed Script Runner and configured as below but I am getting below error when I copy script in "Script Runner" and ran it.

Steps followed to configure Groovy in JIRA.

1. Installed "Script Runner" in JIRA

2. Downloaded groovy runner and copied groovy-all-1.7.11.jar and groovyrunner-1.7.13.jar to /JIRA_Install/atlassian-jira/WEB-INF/lib

3. Restarted JIRA.

Navigate to Script Runner tab and ran below script.

import com.atlassian.jira.ComponentManager

import com.atlassian.jira.project.ProjectManager

ProjectManager manager = ComponentManager.getInstance().getProjectManager()

return "There are ${manager.getProjects().size()} projects"

Below error has thrown for above script. I tried with other scripts also but for any scripts below exception only throwing.

This is urjent requirement, please resolve ASAP.

Cause:
java.lang.NoSuchMethodError: com.onresolve.jira.groovy.GroovyRunner.getComponentManager()Lcom/atlassian/jira/ComponentManager;

Stack Trace: [hide]

java.lang.NoSuchMethodError: com.onresolve.jira.groovy.GroovyRunner.getComponentManager()Lcom/atlassian/jira/ComponentManager;
	at com.onresolve.jira.groovy.GroovyRunner.runFile(GroovyRunner.java:74)
	at com.onresolve.jira.groovy.GroovyRunner.run(GroovyRunner.java:50)
	at com.onresolve.jira.groovy.GroovyRunner.doExecute(GroovyRunner.java:220)
	at webwork.action.ActionSupport.execute(ActionSupport.java:165)
	at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:82)
	at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:39)
	at webwork.interceptor.NestedInterceptorChain.proceed(NestedInterceptorChain.java:31)
	at webwork.interceptor.ChainedInterceptor.intercept(ChainedInterceptor.java:16)
	at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:35)
	at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:221)
	at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:150)
	at com.atlassian.jira.web.dispatcher.JiraWebworkActionDispatcher.service(JiraWebworkActionDispatcher.java:153)

1 answer

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,323 views 14 20
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot