groovy.lang.MissingMethodException: No signature of method:

152 views
Skip to first unread message

Ravi Teja

unread,
Nov 24, 2016, 5:10:08 AM11/24/16
to job-dsl-plugin
I was running below code in jenkins buildflow . But when i run below code in groovy executor it worked fine for me 

def generator = { String alphabet, int n ->
  new Random().with {
    (1..n).collect { alphabet[ nextInt( alphabet.length() ) ] }.join()
  }
}

pattern = '0x' + generator( (('A'..'F')+('0'..'9')).join(), 16 )
plintln "Random Pattern Created :" + pattern

Getting following error 

ERROR: Failed to run DSL Script
groovy.lang.MissingMethodException: No signature of method: com.cloudbees.plugins.flow.FlowDelegate.plintln() is applicable for argument types: (java.lang.String) values: [Random Pattern Created :0xAC0E837A5284A407]
Possible solutions: println(java.lang.String), println(), println(java.io.PrintWriter), println(java.lang.Object), print(java.lang.Object), printf(java.lang.String, [Ljava.lang.Object;)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
	at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:263)
	at com.cloudbees.plugins.flow.FlowDelegate.methodMissing(FlowDSL.groovy:485)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Victor Martinez

unread,
Nov 24, 2016, 7:44:17 AM11/24/16
to job-dsl-plugin
Ravi,

Unfortunately this is not the right mailing list, this one is only about JobDSL if you need help please use the jenkins users mailing list:

Further details:

Besides of that, there is a typo in your script, please read the exception message as plintln doesn't match any existing method and the possible solutions might help you. 

Cheers

Ravi Teja

unread,
Nov 24, 2016, 8:12:02 AM11/24/16
to job-dsl...@googlegroups.com
Thanks a lot victor. i got it issue with spelling mistake.

Thanks,
Ravi

--
You received this message because you are subscribed to a topic in the Google Groups "job-dsl-plugin" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/job-dsl-plugin/6uZuyXULB24/unsubscribe.
To unsubscribe from this group and all its topics, send an email to job-dsl-plugin+unsubscribe@googlegroups.com.
To post to this group, send email to job-dsl-plugin@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/job-dsl-plugin/25ce7cc0-7f1e-4a9b-85ec-9ad24499382b%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Ravi Teja
Reply all
Reply to author
Forward
0 new messages