Skip to content

[JENKINS-75951] unhelpful error message with script is wrong #908

@jenkins-infra-bot

Description

@jenkins-infra-bot

If there is something wrong with the script for an AbstractScriptableParameter the below exception is thrown in the logs :
However this misses any information that you need to identify what is possibly wrong. which job or script is broken? when you have potentially thousands of scripts/jobs finding the needle in the haystack becomes a tedious process.

The exception should contain more information to aid diagnosing the offending configuration.

(the exception here is trimmed as the real log entry is too long to enter in Jira!!!)

2025-07-31 09:05:39.009+0000 [id=1553605]	SEVERE	o.b.u.AbstractScriptableParameter#eval: Error executing script for dynamic parameter
java.lang.RuntimeException: Return type of Groovy script must be a valid String, List, or Map
	at PluginClassLoader for uno-choice//org.biouno.unochoice.model.GroovyScript.resolveTypeAndSanitize(GroovyScript.java:251)
	at PluginClassLoader for uno-choice//org.biouno.unochoice.model.GroovyScript.eval(GroovyScript.java:202)
Caused: java.lang.RuntimeException: Failed to evaluate fallback script: Return type of Groovy script must be a valid String, List, or Map
	at PluginClassLoader for uno-choice//org.biouno.unochoice.model.GroovyScript.eval(GroovyScript.java:207)
	at PluginClassLoader for uno-choice//org.biouno.unochoice.util.ScriptCallback.call(ScriptCallback.java:96)
	at PluginClassLoader for uno-choice//org.biouno.unochoice.AbstractScriptableParameter.eval(AbstractScriptableParameter.java:276)
	at PluginClassLoader for uno-choice//org.biouno.unochoice.AbstractScriptableParameter.getChoices(AbstractScriptableParameter.java:237)
	at PluginClassLoader for uno-choice//org.biouno.unochoice.AbstractScriptableParameter.getDefaultParameterValue(AbstractScriptableParameter.java:293)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.MethodProperty.getValue(MethodProperty.java:72)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.ExportInterceptor$1.getValue(ExportInterceptor.java:45)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.Export$BlueOceanExportInterceptor.getValue(Export.java:195)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Property.writeTo(Property.java:136)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:220)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:216)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:216)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:216)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:216)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:216)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Property.writeValue(Property.java:303)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Property.writeBuffered(Property.java:175)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Property.writeValue(Property.java:235)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Property.writeValue(Property.java:169)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Property.writeTo(Property.java:154)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:220)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:216)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:216)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeTo(Model.java:191)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.Export.writeOne(Export.java:176)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.Export.serveExposedBean(Export.java:164)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.Export.doJson(Export.java:107)
	at PluginClassLoader for blueocean-rest//io.jenkins.blueocean.rest.pageable.PagedResponse$Processor$1.generateResponse(PagedResponse.java:83)
	at org.kohsuke.stapler.HttpResponseRenderer$Default.handleHttpResponse(HttpResponseRenderer.java:129)
	at org.kohsuke.stapler.HttpResponseRenderer$Default.generateResponse(HttpResponseRenderer.java:71)
!!! 147 lines removed here
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:981)
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1211)
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1166)
	at java.base/java.lang.Thread.run(Thread.java:840)
2025-07-31 09:05:39.144+0000 [id=1553605]	WARNING	o.b.unochoice.model.GroovyScript#eval: Error executing fallback script
java.lang.RuntimeException: Return type of Groovy script must be a valid String, List, or Map
	at PluginClassLoader for uno-choice//org.biouno.unochoice.model.GroovyScript.resolveTypeAndSanitize(GroovyScript.java:251)
	at PluginClassLoader for uno-choice//org.biouno.unochoice.model.GroovyScript.eval(GroovyScript.java:202)
	at PluginClassLoader for uno-choice//org.biouno.unochoice.util.ScriptCallback.call(ScriptCallback.java:96)
	at PluginClassLoader for uno-choice//org.biouno.unochoice.AbstractScriptableParameter.eval(AbstractScriptableParameter.java:276)
	at PluginClassLoader for uno-choice//org.biouno.unochoice.AbstractScriptableParameter.getChoices(AbstractScriptableParameter.java:237)
	at PluginClassLoader for uno-choice//org.biouno.unochoice.AbstractScriptableParameter.getDefaultParameterValue(AbstractScriptableParameter.java:293)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.MethodProperty.getValue(MethodProperty.java:72)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.ExportInterceptor$1.getValue(ExportInterceptor.java:45)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.Export$BlueOceanExportInterceptor.getValue(Export.java:195)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Property.writeTo(Property.java:136)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:220)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:216)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:216)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:216)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:216)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:216)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Property.writeValue(Property.java:303)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Property.writeBuffered(Property.java:175)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Property.writeValue(Property.java:235)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Property.writeValue(Property.java:169)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Property.writeTo(Property.java:154)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:220)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:216)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:216)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeTo(Model.java:191)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.Export.writeOne(Export.java:176)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.Export.serveExposedBean(Export.java:164)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.Export.doJson(Export.java:107)
	at PluginClassLoader for blueocean-rest//io.jenkins.blueocean.rest.pageable.PagedResponse$Processor$1.generateResponse(PagedResponse.java:83)
	at org.kohsuke.stapler.HttpResponseRenderer$Default.handleHttpResponse(HttpResponseRenderer.java:129)
!!!140 entries removed
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1211)
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1166)
	at java.base/java.lang.Thread.run(Thread.java:840)


Originally reported by teilo, imported from: unhelpful error message with script is wrong
  • assignee: kinow
  • status: Open
  • priority: Major
  • component(s): active-choices-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 2025-12-08
Raw content of original issue

If there is something wrong with the script for an AbstractScriptableParameter the below exception is thrown in the logs : However this misses any information that you need to identify what is possibly wrong. which job or script is broken? when you have potentially thousands of scripts/jobs finding the needle in the haystack becomes a tedious process.

The exception should contain more information to aid diagnosing the offending configuration.

(the exception here is trimmed as the real log entry is too long to enter in Jira!!!)

2025-07-31 09:05:39.009+0000 [id=1553605]	SEVERE	o.b.u.AbstractScriptableParameter#eval: Error executing script for dynamic parameter
java.lang.RuntimeException: Return type of Groovy script must be a valid String, List, or Map
	at PluginClassLoader for uno-choice//org.biouno.unochoice.model.GroovyScript.resolveTypeAndSanitize(GroovyScript.java:251)
	at PluginClassLoader for uno-choice//org.biouno.unochoice.model.GroovyScript.eval(GroovyScript.java:202)
Caused: java.lang.RuntimeException: Failed to evaluate fallback script: Return type of Groovy script must be a valid String, List, or Map
	at PluginClassLoader for uno-choice//org.biouno.unochoice.model.GroovyScript.eval(GroovyScript.java:207)
	at PluginClassLoader for uno-choice//org.biouno.unochoice.util.ScriptCallback.call(ScriptCallback.java:96)
	at PluginClassLoader for uno-choice//org.biouno.unochoice.AbstractScriptableParameter.eval(AbstractScriptableParameter.java:276)
	at PluginClassLoader for uno-choice//org.biouno.unochoice.AbstractScriptableParameter.getChoices(AbstractScriptableParameter.java:237)
	at PluginClassLoader for uno-choice//org.biouno.unochoice.AbstractScriptableParameter.getDefaultParameterValue(AbstractScriptableParameter.java:293)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.MethodProperty.getValue(MethodProperty.java:72)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.ExportInterceptor$1.getValue(ExportInterceptor.java:45)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.Export$BlueOceanExportInterceptor.getValue(Export.java:195)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Property.writeTo(Property.java:136)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:220)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:216)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:216)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:216)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:216)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:216)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Property.writeValue(Property.java:303)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Property.writeBuffered(Property.java:175)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Property.writeValue(Property.java:235)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Property.writeValue(Property.java:169)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Property.writeTo(Property.java:154)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:220)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:216)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:216)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeTo(Model.java:191)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.Export.writeOne(Export.java:176)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.Export.serveExposedBean(Export.java:164)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.Export.doJson(Export.java:107)
	at PluginClassLoader for blueocean-rest//io.jenkins.blueocean.rest.pageable.PagedResponse$Processor$1.generateResponse(PagedResponse.java:83)
	at org.kohsuke.stapler.HttpResponseRenderer$Default.handleHttpResponse(HttpResponseRenderer.java:129)
	at org.kohsuke.stapler.HttpResponseRenderer$Default.generateResponse(HttpResponseRenderer.java:71)
!!! 147 lines removed here
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:981)
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1211)
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1166)
	at java.base/java.lang.Thread.run(Thread.java:840)
2025-07-31 09:05:39.144+0000 [id=1553605]	WARNING	o.b.unochoice.model.GroovyScript#eval: Error executing fallback script
java.lang.RuntimeException: Return type of Groovy script must be a valid String, List, or Map
	at PluginClassLoader for uno-choice//org.biouno.unochoice.model.GroovyScript.resolveTypeAndSanitize(GroovyScript.java:251)
	at PluginClassLoader for uno-choice//org.biouno.unochoice.model.GroovyScript.eval(GroovyScript.java:202)
	at PluginClassLoader for uno-choice//org.biouno.unochoice.util.ScriptCallback.call(ScriptCallback.java:96)
	at PluginClassLoader for uno-choice//org.biouno.unochoice.AbstractScriptableParameter.eval(AbstractScriptableParameter.java:276)
	at PluginClassLoader for uno-choice//org.biouno.unochoice.AbstractScriptableParameter.getChoices(AbstractScriptableParameter.java:237)
	at PluginClassLoader for uno-choice//org.biouno.unochoice.AbstractScriptableParameter.getDefaultParameterValue(AbstractScriptableParameter.java:293)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.MethodProperty.getValue(MethodProperty.java:72)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.ExportInterceptor$1.getValue(ExportInterceptor.java:45)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.Export$BlueOceanExportInterceptor.getValue(Export.java:195)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Property.writeTo(Property.java:136)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:220)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:216)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:216)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:216)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:216)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:216)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Property.writeValue(Property.java:303)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Property.writeBuffered(Property.java:175)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Property.writeValue(Property.java:235)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Property.writeValue(Property.java:169)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Property.writeTo(Property.java:154)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:220)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:216)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:216)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.export.Model.writeTo(Model.java:191)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.Export.writeOne(Export.java:176)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.Export.serveExposedBean(Export.java:164)
	at PluginClassLoader for blueocean-commons//io.jenkins.blueocean.commons.stapler.Export.doJson(Export.java:107)
	at PluginClassLoader for blueocean-rest//io.jenkins.blueocean.rest.pageable.PagedResponse$Processor$1.generateResponse(PagedResponse.java:83)
	at org.kohsuke.stapler.HttpResponseRenderer$Default.handleHttpResponse(HttpResponseRenderer.java:129)
!!!140 entries removed
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1211)
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1166)
	at java.base/java.lang.Thread.run(Thread.java:840)

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions