unable to resolve class org.boon.Boon

34 views
Skip to first unread message

Yannick Lacaute

unread,
Feb 1, 2021, 3:28:52 PM2/1/21
to Jenkins Users
Hi,

I build a pipeline with Extended Choice Parameter with PT_JSON type, the UI was generated as expected. I am now on a new jenkins (2.263) with the last version of the plugin (0.82) and it does not work anymore...

So, I just try to run the official samples of the Extended Choice Parameter plugin. And they use : "import org.boon.Boon" in their groovy script.
Sadly, when I copy/paste any of their samples, this "import" generates an error :

unable to resolve class org.boon.Boon
 @ line 3, column 1.
   import org.boon.Boon;
   ^

And if I try to not use the import like this :

def jsonEditorOptions = org.boon.Boon.fromJson(/{
       ...
}/);

Then I have the following error :

2021-02-01 19:42:23.880+0000 [id=1368] WARNING h.ExpressionFactory2$JexlExpression#evaluate: Caught exception evaluating: it.getJSONEditorOptions() in /job/pipeline-poc-sys/job/master/build. Reason: groovy.lang.MissingPropertyException: No such property: org for class: parameters._b82219a1fd193dae6dc1a7c5e37076af
groovy.lang.MissingPropertyException: No such property: org for class: parameters._b82219a1fd193dae6dc1a7c5e37076af
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53)

A simpler example with PT_SINGLE_SELECT and without groovy script is working as expected.


Any idea of the problem ??

I authorized my script in /scriptApproval, but as it is a new Jenkins, nothing else is "approved" maybe something important is missing ?

Or maybe the plugin just don't work anymore on the lastest version of jenkins ?

I have no idea how I can investigate this situation..

Yannick Lacaute

unread,
Feb 2, 2021, 5:33:03 AM2/2/21
to Jenkins Users
resolved :

Boon is not compatible with java 11, that is why this dependency has been removed from tag 0.80.
So, instead of using Boon we can use JsonSlurper to create a valid json object jsonEditorOptions (injected later in JS)
Reply all
Reply to author
Forward
0 new messages