No such property: ghf for class: Script1 (in groovy script)

Document created by anton_serbanescu Employee on Feb 11, 2014
Version 1Show Document
  • View in full screen mode
When trying to run a process I get the following error:

No such property: ghf for class: Script1 (in groovy script);

what could be causing the error?
Looking at the custom script the following line :

String desKey = "&45d^o(ds7)^g40d23qr$ghf*fg4";

is trying to parse a special character, '$'.

That character on some operating systems is read as beginning of a variable. So we are going to treat it as a
variable. Therefore you can either escape it by inserting a '\' in front of the '$' or surround the string with '/' .

For example:

String desKey = "&45d^o(ds7)^g40d23qr\$ghf*fg4";

String desKey = "/&45d^o(ds7)^g40d23qr$ghf*fg4/";

Other helpful hints:

http://groovy.codehaus.org/Strings+and+GString
http://groovy.329449.n5.nabble.com/escape-character-for-in-groovy-td387301.html



Attachments

    Outcomes