We\'re upgrading to a newer version of Jenkins (2.60.1) and a groovy script which was working in the previous Jenkins version (1.596/2) no longer works.
For me this problem occurred because I had a some invalid character in my Groovy script. In our case this was an extra blank line after the closing bracket of the script.