-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] java.lang.Integer cannot be cast to class java.lang.String #109
Comments
Hello there, Thank you for the bug report! I will see that I can reproduce this and provide a fix soon. |
Hi, any news on this ?! Thanks/ |
Hi, |
Hi again, Had some time today and managed to reproduce this. Now, I managed to find the fault in my code and have a local fix ready that I will publish soon. Arguably, it is a very trivial fix that I am annoyed I did not see earlier 🤦♂️ so thank you for reporting it back! |
I will release 1.5.1 with the fix for this the moment the JenkinsCI Jenkins instance manages to successfully build again, seems like there is something funky going on rn |
well I risked and simply cut the release. rest-list-parameter-1.5.1 Thank you for your patients and reporting this 👍 |
It works, I appreciate your time looking at it. |
In Jenkins we have jobs with REST List Parameter enabled and it uses our Docker Tags as REST endpoint:
Ex:
REST Endpoint: https://REPO_URL/v2/hello-world/tags/list
MIME type: APPLICATION JSON
Value Expression: $.tags
When manually curl the address we have as result:
{
"name" : "hello-world",
"tags" : [ "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "3", "4", "6", "7", "8", "9" ]
}
Versions (please complete the following information):
Additional context
JENKINS ERROR:
Error while serving http://JOB_URL/descriptorByName/io.jenkins.plugins.restlistparam.RestListParameterDefinition/testConfiguration
java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.String (java.lang.Integer and java.lang.String are in module java.base of loader 'bootstrap')
Caused: java.lang.reflect.InvocationTargetException
at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:397)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:405)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:208)
There is other Job that it works and the JSON result is:
{
"name" : "image_name",
"tags" : [ "1.0.0-20210211101025", "1.0.0-20210211101625", "1.0.0-20210211101756", "1.0.0-20210211102118", "1.0.0-20210305142411", "1.0.0-20210309074905", "1.0.0-20210310065345", "1.0.0-20210312074331", "1.0.0-20210319065144", "1.0.0-20210324142526", "1.0.0-20210330073431", "1.0.0-20210426065757", "1.0.0-20210519113253", "1.0.0-49", "1.0.0-52", "1.0.0-53", "1.0.0-54", "1.0.0-latest" ]
}
The text was updated successfully, but these errors were encountered: