dabasvini
dabasvini

Reputation: 11

Groovy Script Illegal use of nonvirtual function call

When i run groovy script in eclipse & jenkins I am getting below error :

java.lang.VerifyError: (class:
groovy/runtime/metaclass/java/lang/StringMetaClass, method:
super$2$invokeMissingMethod signature:
(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;)
Illegal use of nonvirtual function call

But when I ran from groovy console I am able to execute code without this error . I have tried with jre 6,7,8 nothing helps.. Can anyone help me on this issue.

Upvotes: 1

Views: 1150

Answers (1)

daspilker
daspilker

Reputation: 8194

Jenkins 1.x ships with Groovy 1.8.9, so your script needs to be compatible with Groovy 1.8 when running in Jenkins script console or CLI commands.

The upcoming Jenkins 2.0 release will ship with Groovy 2.4.6.

See JENKINS-21249 for details.

Upvotes: 1

Related Questions