Error running groovy script runner

Darly Senecal-Baptiste
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 27, 2013

Hello, this question is for Jamie Echlin or for groovy community:

When I' trying to run a script the following error appeared:

2013-02-28 00:17:47,478 ajp-127.0.0.1-8101-6 ERROR user 17x32515x1 1r787tl 68.164.136.210 /secure/WorkflowUIDispatcher.jspa [onresolve.jira.groovy.GroovyRunner] The script failed : javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: inversion for class: com.onresolve.jira.groovy.canned.workflow.postfunctionspackage.Script26
2013-02-28 00:17:47,478 ajp-127.0.0.1-8101-6 ERROR user 17x32515x1 1r787tl 68.164.136.210 /secure/WorkflowUIDispatcher.jspa [onresolve.jira.groovy.GroovyFunctionPlugin] Error executing post-function
javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: inversion for class: com.onresolve.jira.groovy.canned.workflow.postfunctionspackage.Script26

This is for just one particular script, which its first line has to import the package.

This is my first lines of the script

package com.onresolve.jira.groovy.canned.workflow.postfunctionspackage <-- This the line that may cause the problem


import com.atlassian.jira.ComponentManager
import com.atlassian.jira.issue.MutableIssue
import com.atlassian.crowd.embedded.api.User
import org.ofbiz.core.entity.GenericValue
import org.apache.log4j.Category

// Defninition of the component manager classes
def componentManager
def customFieldManager
def parentIssueFactory
def jiraAuthenticationContext
def parentIssueManager
def subtaskManager

The specification are the following

JIRA 5.0.6

groovyscript 2.0.6

Thanks

2 answers

1 accepted

2 votes
Answer accepted
Henning Tietgens
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 27, 2013

I don't think the package is the problem. Is there some reference to "inversion" in your code? There is the problem the error message is pointing to.

Henning

Darly Senecal-Baptiste
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 1, 2013

Hi Henning:

I don't think that there is any inversion in my code

Henning Tietgens
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 3, 2013

I'm referring to this part of the error message "MissingPropertyException: No such property: inversion for class: com.onresolve.jira.groovy.canned.workflow.postfunctionspackage.Script26". This error says, you try to access a property "inversion" in your code. For my adapted post functions, the first line is

package com.onresolve.jira.groovy.canned.workflow.postfunctions

and this works without a problem.

Darly Senecal-Baptiste
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 10, 2013

Question: If I put one groovy script in one transition and then another script in another transtition, does it affect the inversion?

Henning Tietgens
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 11, 2013

Sorry, I don't know about what "inversion" you're talking. It's not a property I know of, it's only a word I see in your error message.

Darly Senecal-Baptiste
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 11, 2013

That's fine. thanks

However, if I set a groovy script in a transition. And then set another script in another transition does it affect the second script by running this type of error?

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 12, 2013

No that wil be fine.

0 votes
Sherif Mansour
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 12, 2013

"Hello, this question is for Jamie Echlin"

Ha! I like it Jamie get some special questions addressed just to him :-) .. should make that a tag!

Suggest an answer

Log in or Sign up to answer