[JIRA] (JENKINS-49985) hudson.remoting.ProxyException: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '{"labels":{"Verified":1}}' with class 'com.google.gson.JsonObje
Title: Message Title lucamilanesio updated JENKINS-49985 Jenkins / JENKINS-49985 hudson.remoting.ProxyException: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '{"labels":{"Verified":1}}' with class 'com.google.gson.JsonObject' to class 'com.google.gson.JsonElement' Change By: lucamilanesio Status: Fixed but Unreleased Closed Released As: gerrit-code-review-0.2 Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-49985) hudson.remoting.ProxyException: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '{"labels":{"Verified":1}}' with class 'com.google.gson.JsonObje
Title: Message Title lucamilanesio updated JENKINS-49985 Jenkins / JENKINS-49985 hudson.remoting.ProxyException: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '{"labels":{"Verified":1}}' with class 'com.google.gson.JsonObject' to class 'com.google.gson.JsonElement' Change By: lucamilanesio Status: Open Fixed but Unreleased Resolution: Fixed Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-49985) hudson.remoting.ProxyException: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '{"labels":{"Verified":1}}' with class 'com.google.gson.JsonObje
Title: Message Title lucamilanesio commented on JENKINS-49985 Re: hudson.remoting.ProxyException: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '{"labels":{"Verified":1}}' with class 'com.google.gson.JsonObject' to class 'com.google.gson.JsonElement' Yes, a PR has been pushed and merged now (see https://github.com/jenkinsci/gerrit-code-review-plugin/pull/11). Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-49985) hudson.remoting.ProxyException: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '{"labels":{"Verified":1}}' with class 'com.google.gson.JsonObje
Title: Message Title Eric Isakson commented on JENKINS-49985 Re: hudson.remoting.ProxyException: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '{"labels":{"Verified":1}}' with class 'com.google.gson.JsonObject' to class 'com.google.gson.JsonElement' This smelled like a classloader issue, so I added some diagnostics in my local version to help track down what is happening. I'm still really new to Jenkins plugin development, so I don't really understand what the root cause or correct fix should be but it looks like this is a bad interaction between the new plugin and the old gerrit-trigger plugin, look at the jars on the AntClassLoader for JsonObject and JsonElement which are from the gerrit-trigger plugin where the result object JsonObject is coming from the gerrit-code-review plugin: Class loader hierarchy for class com.google.gson.JsonObject [AntClassLoader[/reps/jenkins/home/plugins/gerrit-trigger/WEB-INF/lib/gson-2.1.jar:/reps/jenkins/home/plugins/gerrit-trigger/WEB-INF/lib/oro-2.0.8.jar:/reps/jenkins/home/plugins/gerrit-trigger/WEB-INF/lib/httpcore-4.4.4.jar:/reps/jenkins/home/plugins/gerrit-trigger/WEB-INF/lib/guava-11.0.1.jar:/reps/jenkins/home/plugins/gerrit-trigger/WEB-INF/lib/slf4j-jdk14-1.6.1.jar:/reps/jenkins/home/plugins/gerrit-trigger/WEB-INF/lib/commons-net-2.0.jar:/reps/jenkins/home/plugins/gerrit-trigger/WEB-INF/lib/jackson-core-2.4.2.jar:/reps/jenkins/home/plugins/gerrit-trigger/WEB-INF/lib/jackson-annotations-2.4.2.jar:/reps/jenkins/home/plugins/gerrit-trigger/WEB-INF/lib/slf4j-api-1.6.1.jar:/reps/jenkins/home/plugins/gerrit-trigger/WEB-INF/lib/jackson-databind-2.4.2.jar:/reps/jenkins/home/plugins/gerrit-trigger/WEB-INF/lib/j2ssh-maverick-1.5.2.jar:/reps/jenkins/home/plugins/gerrit-trigger/WEB-INF/lib/jsch-0.1.51.jar:/reps/jenkins/home/plugins/gerrit-trigger/WEB-INF/lib/gerrit-trigger.jar:/reps/jenkins/home/plugins/gerrit-trigger/WEB-INF/lib/httpclient-4.5.2.jar:/reps/jenkins/home/plugins/gerrit-trigger/WEB-INF/lib/gerrit-events-2.12.0.jar]] hashCode=863687531 [hudson.ClassicPluginStrategy$DependencyClassLoader@62f59d1] hashCode=103766481 [hudson.util.MaskingClassLoader@53f9986f] hashCode=1408866415 [WebAppClassLoader=Jenkins v2.107.2@4cb2c100] hashCode=1286783232 [java.net.URLClassLoader@312b1dae] hashCode=824909230 [java.net.URLClassLoader@3f99bd52] hashCode=1067040082 [sun.misc.Launcher$AppClassLoader@4aa298b7] hashCode=1252169911 [sun.misc.Launcher$ExtClassLoader@4c9f8c13] hashCode=1285524499 context class loader=[org.jenkinsci.plugins.workflow.cps.CpsGroovyShell$CleanGroovyClassLoader@4aedecc9] hashCode=1257106633 Class loader hierarchy for class com.google.gson.JsonElement [AntClassLoader[/reps/jenkins/home/plugins/gerrit-trigger/WEB-INF/lib/gson-2.1.jar:/reps/jenkins/home/plugins/gerrit-trigger/WEB-INF/lib/oro-2.0.8.jar:/reps/jenkins/home/plugins/gerrit-trigger/WEB-INF/lib/httpcore-4.4.4.jar:/reps/jenkins/home/plugins/gerrit-trigger/WEB-INF/lib/guava-11.0.1.jar:/reps/jenkins/home/plugins/gerrit-trigger/WEB-INF/lib/slf4j-jdk14-1.6.1.jar:/reps/jenkins/home/plugins/gerrit-trigger/WEB-INF/lib/commons-net-2.0.jar:/reps/jenkins/home/plugins/gerrit-trigger/WEB-INF/lib/jackson-core-2.4.2.jar:/reps/jenkins/home/plugins/gerrit-trigger/WEB-INF/lib/jackson-annotations-2.4.2.jar:/reps/jenkins/home/plugins/gerrit-trigger/WEB-INF/lib/slf4j-api-1.6.1.jar:/reps/jenkins/home/plugins/gerrit-trigger/WEB-INF/lib/jackson-databind-2.4.2.jar:/reps/jenk
[JIRA] (JENKINS-49985) hudson.remoting.ProxyException: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '{"labels":{"Verified":1}}' with class 'com.google.gson.JsonObje
Title: Message Title Sorin Sbarnea created an issue Jenkins / JENKINS-49985 hudson.remoting.ProxyException: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '{"labels":{"Verified":1}}' with class 'com.google.gson.JsonObject' to class 'com.google.gson.JsonElement' Issue Type: Task Assignee: lucamilanesio Components: gerrit-plugin Created: 2018-03-07 12:42 Priority: Critical Reporter: Sorin Sbarnea Error while trying to add Verified label to Gerrit. hudson.remoting.ProxyException: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '{"labels":{"Verified":1}}' with class 'com.google.gson.JsonObject' to class 'com.google.gson.JsonElement' at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.continueCastOnSAM(DefaultTypeTransformation.java:405) at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.continueCastOnNumber(DefaultTypeTransformation.java:319) at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToType(DefaultTypeTransformation.java:232) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.castToType(ScriptBytecodeAdapter.java:603) at Unknown.Unknown(Unknown) at jenkins.plugins.gerrit.workflow.Gerrit.post(jar:file:/var/lib/jenkins/plugins/gerrit/WEB-INF/lib/gerrit.jar!/jenkins/plugins/gerrit/workflow/Gerrit.groovy:69) at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2030) at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2015) at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2056) at jenkins.plugins.gerrit.workflow.Gerrit.post(jar:file:/var/lib/jenkins/plugins/gerrit/WEB-INF/lib/gerrit.jar!/jenkins/plugins/gerrit/workflow/Gerrit.groovy:66) at ___cps.transform___(Nativ