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 Sign up to answer
Community showcase
Posted Sep 25, 2018 in Jira

Atlassian Research Workshop opportunity on Sep. 28th in Austin, TX

We're looking for participants for a workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sha...

456 views 7 5
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