java.lang.ClassCastException: cannot assign instance of hudson.model.StreamBuildListener to field hudson.plugins.mercurial.MercurialSCM$1.val$listener of type hudson.model.BuildListener in instance of hudson.plugins.mercurial.MercurialSCM$1

Jenkins JIRA | Jesse Glick | 5 years ago
  1. 0

    We frequently - but not usually - get build failures of the form: {code} See <http://deadlock.netbeans.org/hudson/job/push-core-main/20032/> ------------------------------------------ Started by timer Building remotely on Push-to-Silver-Node FATAL: cannot assign instance of hudson.model.StreamBuildListener to field hudson.plugins.mercurial.MercurialSCM$1.val$listener of type hudson.model.BuildListener in instance of hudson.plugins.mercurial.MercurialSCM$1 java.lang.ClassCastException: cannot assign instance of hudson.model.StreamBuildListener to field hudson.plugins.mercurial.MercurialSCM$1.val$listener of type hudson.model.BuildListener in instance of hudson.plugins.mercurial.MercurialSCM$1 at java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2039) at java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:1212) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1952) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350) at hudson.remoting.UserRequest.deserialize(UserRequest.java:178) at hudson.remoting.UserRequest.perform(UserRequest.java:98) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:283) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) {code} The job config in this case is {code:xml} <scm class="hudson.plugins.mercurial.MercurialSCM"> <installation>default Mercurial with caching</installation> <source>http://hg.netbeans.org/main-silver/</source> <modules></modules> <clean>false</clean> <forest>false</forest> <browser class="hudson.plugins.mercurial.browser.HgWeb"> <url>http://hg.netbeans.org/main-silver/</url> </browser> </scm> {code} but other jobs also fail as well. Possibly a problem with unserializable anonymous classes being passed around in remoting.

    Jenkins JIRA | 5 years ago | Jesse Glick
    java.lang.ClassCastException: cannot assign instance of hudson.model.StreamBuildListener to field hudson.plugins.mercurial.MercurialSCM$1.val$listener of type hudson.model.BuildListener in instance of hudson.plugins.mercurial.MercurialSCM$1
  2. 0

    We frequently - but not usually - get build failures of the form: {code} See <http://deadlock.netbeans.org/hudson/job/push-core-main/20032/> ------------------------------------------ Started by timer Building remotely on Push-to-Silver-Node FATAL: cannot assign instance of hudson.model.StreamBuildListener to field hudson.plugins.mercurial.MercurialSCM$1.val$listener of type hudson.model.BuildListener in instance of hudson.plugins.mercurial.MercurialSCM$1 java.lang.ClassCastException: cannot assign instance of hudson.model.StreamBuildListener to field hudson.plugins.mercurial.MercurialSCM$1.val$listener of type hudson.model.BuildListener in instance of hudson.plugins.mercurial.MercurialSCM$1 at java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2039) at java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:1212) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1952) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350) at hudson.remoting.UserRequest.deserialize(UserRequest.java:178) at hudson.remoting.UserRequest.perform(UserRequest.java:98) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:283) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) {code} The job config in this case is {code:xml} <scm class="hudson.plugins.mercurial.MercurialSCM"> <installation>default Mercurial with caching</installation> <source>http://hg.netbeans.org/main-silver/</source> <modules></modules> <clean>false</clean> <forest>false</forest> <browser class="hudson.plugins.mercurial.browser.HgWeb"> <url>http://hg.netbeans.org/main-silver/</url> </browser> </scm> {code} but other jobs also fail as well. Possibly a problem with unserializable anonymous classes being passed around in remoting.

    Jenkins JIRA | 5 years ago | Jesse Glick
    java.lang.ClassCastException: cannot assign instance of hudson.model.StreamBuildListener to field hudson.plugins.mercurial.MercurialSCM$1.val$listener of type hudson.model.BuildListener in instance of hudson.plugins.mercurial.MercurialSCM$1
  3. 0

    As you can see below, it doesn't show the call site information. {noformat} ERROR: Processing failed due to a bug in the code. Please report this to jenkins-users@googlegroups.com java.lang.ClassCastException: cannot assign instance of hudson.model.StreamBuildListener to field hudson.maven.MavenModuleSetBuild$PomParser.listener of type hudson.model.BuildListener in instance of hudson.maven.MavenModuleSetBuild$PomParser at java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2056) at java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:1229) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1969) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1887) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1770) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1963) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1887) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1770) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:368) at hudson.remoting.UserRequest.deserialize(UserRequest.java:178) at hudson.remoting.UserRequest.perform(UserRequest.java:98) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:270) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) {noformat}

    Jenkins JIRA | 6 years ago | Kohsuke Kawaguchi
    java.lang.ClassCastException: cannot assign instance of hudson.model.StreamBuildListener to field hudson.maven.MavenModuleSetBuild$PomParser.listener of type hudson.model.BuildListener in instance of hudson.maven.MavenModuleSetBuild$PomParser
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    "remote" access problems and classcast exceptions on slaves

    Eclipse Bugzilla | 5 years ago | david_williams
    java.lang.ClassCastException: cannot assign instance of hudson.scm.CVSSCM$1 to field hudson.FilePath$FileCallableWrapper.callable of type hudson.FilePath$FileCallable in instance of hudson.FilePath$FileCallableWrapper
  6. 0

    ClassCastException during SCM polling

    Eclipse Bugzilla | 5 years ago | jan.sievers
    java.lang.ClassCastException: cannot assign instance of hudson.EnvVars to field hudson.plugins.git.GitSCM$4.val$environment of type hudson.EnvVars in instance of hudson.plugins.git.GitSCM$4

  1. bpbhat77 2 times, last 4 months ago
  2. shiva768 1 times, last 11 months ago
11 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.ClassCastException

    cannot assign instance of hudson.model.StreamBuildListener to field hudson.plugins.mercurial.MercurialSCM$1.val$listener of type hudson.model.BuildListener in instance of hudson.plugins.mercurial.MercurialSCM$1

    at java.io.ObjectStreamClass$FieldReflector.setObjFieldValues()
  2. Java RT
    ObjectInputStream.readObject
    1. java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2039)
    2. java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:1212)
    3. java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1952)
    4. java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
    5. java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
    6. java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
    7. java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)
    8. java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
    9. java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
    10. java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
    11. java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
    11 frames
  3. Hudson :: Remoting Layer
    Request$2.run
    1. hudson.remoting.UserRequest.deserialize(UserRequest.java:178)
    2. hudson.remoting.UserRequest.perform(UserRequest.java:98)
    3. hudson.remoting.UserRequest.perform(UserRequest.java:48)
    4. hudson.remoting.Request$2.run(Request.java:283)
    4 frames
  4. Java RT
    Thread.run
    1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    2. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    3. java.util.concurrent.FutureTask.run(FutureTask.java:138)
    4. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    5. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    6. java.lang.Thread.run(Thread.java:662)
    6 frames