Scriptrunner errors

Devtools_Barclays February 25, 2016

Hi,

We have noticed such errors in logs related to script runner :

2016-02-24 09:23:50,627 ERROR [threadpool:thread-8] G04518271 *OH7VB2x563x665649x37 10.36.57.214,35.165.31.126 "POST /scm/pcb_gpt/gpt.git/git-receive-pack HTTP/1.1" c.o.s.b.
ScriptedSynchronousPostReceiveGlobalHook *************************************************************************************
2016-02-24 09:23:50,630 ERROR [threadpool:thread-8] G04518271 *OH7VB2x563x665649x37 10.36.57.214,35.165.31.126 "POST /scm/pcb_gpt/gpt.git/git-receive-pack HTTP/1.1" c.o.s.b.
ScriptedSynchronousPostReceiveGlobalHook Script post-receive hook failed: repository: gpt, file: null
groovy.lang.GroovyRuntimeException: Failed to parse template script (your template may contain an error or be trying to use expressions not currently supported): startup fai
led:
GStringTemplateScript1.groovy: 2: [Static type checking] - The variable [branch] is undeclared.
 @ line 2, column 104.
   sitory ${repository.name} - ${branch.nam
                                 ^

GStringTemplateScript1.groovy: 2: [Static type checking] - No such property: name for class: java.lang.Object
 @ line 2, column 103.
   ository ${repository.name} - ${branch.na
                                 ^

2 errors

        at com.onresolve.scriptrunner.canned.bitbucket.events.StashSendCustomEmail.doScript(StashSendCustomEmail.groovy:160) ~[na:na]
        at com.onresolve.scriptrunner.canned.bitbucket.events.email.StashSendCustomEmailPostReceive.super$2$doScript(StashSendCustomEmailPostReceive.groovy) ~[na:na]
        at com.onresolve.scriptrunner.canned.bitbucket.events.email.StashSendCustomEmailPostReceive.doScript(StashSendCustomEmailPostReceive.groovy:73) ~[na:na]

 

How can we fix this ?

 

Regards

Sakshi

1 answer

0 votes
Steven F Behnke
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 26, 2016

Well... It looks like the script is at fault. Can you post the source? It's saying literally your variable is undeclared. This implies you're using a variable without declaring it.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events