Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-23566

java.lang.ClassCastException: hudson.model.Fingerprint$RangeSet cannot be cast to hudson.model.Fingerprint

    XMLWordPrintable

Details

    Description

      Hi,
      I had this exception (see below for full stacktrace) in several of my jobs. Build process often go on normally after this error.
      My Jenkins server is running under Tomcat 7 with v1.569.

      For information I don't know if it can be linked, but I had a disk full problem on my server that I fixed.

      ERROR: Erreur d'exécution asynchrone
      java.util.concurrent.ExecutionException: java.lang.ClassCastException: hudson.model.Fingerprint$RangeSet cannot be cast to hudson.model.Fingerprint
      at hudson.remoting.Channel$3.adapt(Channel.java:772)
      at hudson.remoting.Channel$3.adapt(Channel.java:767)
      at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55)
      at hudson.maven.AbstractMavenBuilder.waitForAsynchronousExecutions(AbstractMavenBuilder.java:185)
      at hudson.maven.Maven3Builder.call(Maven3Builder.java:141)
      at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
      at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:328)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      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:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:722)
      Caused by: java.lang.ClassCastException: hudson.model.Fingerprint$RangeSet cannot be cast to hudson.model.Fingerprint
      at hudson.model.Fingerprint.load(Fingerprint.java:1232)
      at hudson.model.Fingerprint.load(Fingerprint.java:1220)
      at hudson.model.FingerprintMap.load(FingerprintMap.java:94)
      at hudson.model.FingerprintMap.load(FingerprintMap.java:45)
      at hudson.util.KeyedDataStorage.get(KeyedDataStorage.java:154)
      at hudson.model.FingerprintMap.get(FingerprintMap.java:79)
      at hudson.model.FingerprintMap.get(FingerprintMap.java:45)
      at hudson.util.KeyedDataStorage.getOrCreate(KeyedDataStorage.java:108)
      at hudson.model.FingerprintMap.getOrCreate(FingerprintMap.java:65)
      at hudson.maven.reporters.MavenFingerprinter$1.call(MavenFingerprinter.java:125)
      at hudson.maven.reporters.MavenFingerprinter$1.call(MavenFingerprinter.java:112)
      at hudson.maven.MavenBuild$ProxyImpl.execute(MavenBuild.java:414)
      at hudson.maven.MavenBuild$ProxyImpl2.execute(MavenBuild.java:542)
      at sun.reflect.GeneratedMethodAccessor246.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at hudson.model.Executor$1.call(Executor.java:571)
      at hudson.util.InterceptingProxy$1.invoke(InterceptingProxy.java:23)
      at com.sun.proxy.$Proxy55.execute(Unknown Source)
      at hudson.maven.MavenBuildProxy$Filter$AsyncInvoker.call(MavenBuildProxy.java:293)
      at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:328)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
      ... 5 more
      En attente que Jenkins finisse de récupérer les données

      Translation of french messages in log:
      Erreur d'exécution asynchrone -> Asynchronous execution error
      En attente que Jenkins finisse de récupérer les données -> Waiting Jenkins finish to retrieve data

      Attachments

        Issue Links

          Activity

            lbar Loïc Bar created issue -

            Also affects us:
            Jenkins LTS 1.596.1
            Running on CentOS 6 x86_64
            java version "1.7.0_75"
            OpenJDK Runtime Environment (rhel-2.5.4.0.el6_6-x86_64 u75-b13)
            OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)

            bdellegrazie Brett Delle Grazie added a comment - Also affects us: Jenkins LTS 1.596.1 Running on CentOS 6 x86_64 java version "1.7.0_75" OpenJDK Runtime Environment (rhel-2.5.4.0.el6_6-x86_64 u75-b13) OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)

            Jenkins seems to be trying to look up the existing fingerprint files and failing to deserialise them properly; possible the fingerprint files are corrupted in some way?

            For anybody having this problem, could you try looking in the build workspace at the files which should be archived/fingerprinted, and get the MD5 hash of those files.

            Then check the contents of $JENKINS_HOME/fingerprints/12/34/56..ef.xml for each file, assuming in this example that the MD5 hash was 123456..ef. You can also try a recursive grep for the artifact filename.

            Are there any files which appear truncated or otherwise different from other fingerprint files?

            orrc Christopher Orr added a comment - Jenkins seems to be trying to look up the existing fingerprint files and failing to deserialise them properly; possible the fingerprint files are corrupted in some way? For anybody having this problem, could you try looking in the build workspace at the files which should be archived/fingerprinted, and get the MD5 hash of those files. Then check the contents of $JENKINS_HOME/fingerprints/12/34/56..ef.xml for each file, assuming in this example that the MD5 hash was 123456..ef . You can also try a recursive grep for the artifact filename. Are there any files which appear truncated or otherwise different from other fingerprint files?
            cioshe Cillian O'Shea added a comment - - edited

            Hi Christopher,

            Thanks for your response.

            I have seen this error on my configuration.
            Jenkins 1.599
            Running on Windows Server 2008 R2
            java version 1.7

            On your suggestion I am looking for files that have been truncated and I have found that a small percentage of the fingerprint files have been truncated or are completely empty.

            What do you recommend to do in this situation? Can these files be deleted or do they need to be regenerated somehow?

            cioshe Cillian O'Shea added a comment - - edited Hi Christopher, Thanks for your response. I have seen this error on my configuration. Jenkins 1.599 Running on Windows Server 2008 R2 java version 1.7 On your suggestion I am looking for files that have been truncated and I have found that a small percentage of the fingerprint files have been truncated or are completely empty. What do you recommend to do in this situation? Can these files be deleted or do they need to be regenerated somehow?
            rtyler R. Tyler Croy made changes -
            Field Original Value New Value
            Workflow JNJira [ 156347 ] JNJira + In-Review [ 179249 ]
            martinro martinro added a comment -

            Same issue on my installation. Deleting all fingerprint files (folder $JENKINS_HOME/fingerprints) solved the issue for me.

            martinro martinro added a comment - Same issue on my installation. Deleting all fingerprint files (folder $JENKINS_HOME/fingerprints) solved the issue for me.
            ptaucher Peter Taucher added a comment - - edited

            I'm not sure if this is a duplicate or merely related to JENKINS-26257 . Sadly in my case deleting the fingerprint files did not solve the NPE issue.

            Stopping jenkins, deleting the fingerprints and restarting jenkins did solve the issue (for the time being).

            ptaucher Peter Taucher added a comment - - edited I'm not sure if this is a duplicate or merely related to  JENKINS-26257 . Sadly in my case deleting the fingerprint files did not solve the NPE issue. Stopping jenkins, deleting the fingerprints and restarting jenkins did solve the issue (for the time being).
            oleg_nenashev Oleg Nenashev made changes -
            Labels exception exception newbie-friendly
            oleg_nenashev Oleg Nenashev made changes -
            Labels exception newbie-friendly exception fingerprints newbie-friendly
            oleg_nenashev Oleg Nenashev added a comment -

            It was likely fixed in JENKINS-51179 (Jenkins 2.124+)

            oleg_nenashev Oleg Nenashev added a comment - It was likely fixed in  JENKINS-51179 (Jenkins 2.124+)
            oleg_nenashev Oleg Nenashev made changes -
            Link This issue duplicates JENKINS-51179 [ JENKINS-51179 ]
            oleg_nenashev Oleg Nenashev made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Fixed but Unreleased [ 10203 ]
            oleg_nenashev Oleg Nenashev made changes -
            Status Fixed but Unreleased [ 10203 ] Closed [ 6 ]

            People

              Unassigned Unassigned
              lbar Loïc Bar
              Votes:
              5 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: