It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Groovy - No signature of method

Hi,
We have recently upgraded Jira to 7.0.11 and few groovy scripts were not working in the new update. I did check the groovy script source code for errors causde by the changes to Jira API and fixed them, but still the ScriptRunner is throwing an error whenever I try to run the script.

Error from running the script:

Error
No signature of method: com.nimblestorage.jira.PopulateQaContactListener.main() is applicable for argument types: ([Ljava.lang.String;) values: [[]] Possible solutions: wait(), wait(long), find(), any(), wait(long, int), init(java.util.Map)

Log from the Script Listener:

Time (on server): Wed Apr 12 2017 14:23:09 GMT-0700 (Pacific Daylight Time)
The following log information was produced by this execution. Use statements like:log.info("...") to record logging information.
2017-04-12 14:23:09,610 ERROR [runner.AbstractScriptListener]: *************************************************************************************
2017-04-12 14:23:09,611 ERROR [runner.AbstractScriptListener]: Script function failed on event: com.atlassian.jira.event.issue.IssueEvent, file: com.nimblestorage.jira.PopulateQaContactListener
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at java_util_List$get$4.call(Unknown Source)
	at com.nimblestorage.jira.PopulateQaContactListener.findQaContactForIssue(PopulateQaContactListener.groovy:166)
	at com.nimblestorage.jira.PopulateQaContactListener.syncQaContact(PopulateQaContactListener.groovy:126)
	at com.nimblestorage.jira.PopulateQaContactListener.workflowEvent(PopulateQaContactListener.groovy:90)
	at com.atlassian.jira.event.issue.IssueEventListener$workflowEvent.call(Unknown Source)
	at com.onresolve.scriptrunner.canned.jira.workflow.listeners.CustomListener.doScript(CustomListener.groovy:138)

 

 

 Please tell me how to debug such error so that I can fix this issue. 

Thanks in advance.

2 answers

0 votes
nic Community Leader Apr 18, 2017

com.nimblestorage looks like a class imported from an add-on.  You'll need to work out what was providing it and how to replace it.

Hey Nick, 
com.nimblestorage.jira is the namespace for the script -PopulateQaContactListener.groovy. It was running fine in the older vesrion but not in the new update. 
The stacktrace from running the script runner is as follows:

2017-04-18 08:14:08,030 WARN [common.UserScriptEndpoint]: Script console script failed: 
groovy.lang.MissingMethodException: No signature of method: com.nimblestorage.jira.PopulateQaContactListener.main() is applicable for argument types: ([Ljava.lang.String;) values: [[]]
Possible solutions: wait(), wait(long), find(), any(), wait(long, int), init(java.util.Map)
 at com.onresolve.scriptrunner.runner.RunScriptInvoker$run.call(Unknown Source)
 at com.onresolve.scriptrunner.runner.ScriptRunnerImpl.runScript(ScriptRunnerImpl.groovy:459)
 at com.onresolve.scriptrunner.runner.ScriptRunner$runScript$5.callCurrent(Unknown Source)
 at com.onresolve.scriptrunner.runner.ScriptRunnerImpl.runFileAsScript(ScriptRunnerImpl.groovy:198)
 at com.onresolve.scriptrunner.runner.ScriptRunnerImpl.runFileAsScript(ScriptRunnerImpl.groovy)
 at com.onresolve.scriptrunner.runner.rest.common.UserScriptEndpoint.exec(UserScriptEndpoint.groovy:161)
 at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
 at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
 at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
 at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
 at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
 at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
 at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
 at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
 at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
 at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
 at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
 at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
 at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
 at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
 at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:178)
 at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:795)
 at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:73)
 at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:78)
 at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42)
 at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77)
 at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63)
 at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:78)

I have just included a snippet of the top logs since there is a character limit in the forum. The stacktrace shows a total of 207 logged error.

nic Community Leader Apr 19, 2017

Yes, I understand that, but the script is calling something in  "nimblespace" that is not right any more. 

It's not part of the script runner stuff, so how were you providing the library in the old version and how has it changed in a newer version of it?

Hi,

Check the groovy build file is placed in the proper directory anf classpath set.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Calling all Jira Cloud users! Give us feedback on our exploration of a new navigation.

Hi everyone! My name’s Matt and I’m a product manager at Atlassian. I work in the navigation & findability space for all our Jira Cloud products. We’ve been working on trying to improve the exp...

1,061 views 16 12
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you