Caused by: java.lang.IllegalArgumentException: Unable to convert to class java.lang.Object
at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON (RequestImpl.java:738)
Caused by: java.lang.Error: Failed to instantiate class io.jenkins.plugins.****
at hudson.model.Descriptor.newInstance (Descriptor.java:606)
at org.jenkinsci.plugins.workflow.cps.Snippetizer.doGenerateSnippet (Snippetizer.java:502)
at java.lang.invoke.MethodHandle.invokeWithArguments (MethodHandle.java:627)
So basically I have an java.lang.Object field and snippetizer falls over on the "generate command"
Is there an annotation or something to say tell snippetizer to use this Object as a string? As the generator command will be a String but in script it could be a Json object or other things.
Bottom line is I wanted to have a single input field that could be mutiple types.
... and if anyone asks no I can't share the source. It's part of an inhouse plugin and it's not something I'm allowed to share.