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

Error "Unable to cast run to abstract build" with AccuRev

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • Jenkins 2.32.2
      Office 365 Connector Plugin 2.4
      AccuRev 6.2.3d (Windows client, Linux server)

    Description

      Our build jobs log the error below with each run of the Office 365 webhooks. The error states that AccuRev doesn't support getAffectedFiles(). Is there a similar call that AccuRev does support that can be used instead for AccuRev systems, or is it possible to catch this error for and just log an informational message instead? Thanks, Tim

      ERROR: Unable to cast run to abstract build. java.lang.UnsupportedOperationException: getAffectedFiles() is not implemented by accurev
      java.lang.UnsupportedOperationException: getAffectedFiles() is not implemented by accurev

      Build step 'Invoke Gradle script' changed build result to SUCCESS
      createJobCompletedCard: 203
      ERROR: Unable to cast run to abstract build. java.lang.UnsupportedOperationException: getAffectedFiles() is not implemented by accurev
      java.lang.UnsupportedOperationException: getAffectedFiles() is not implemented by accurev
      	at hudson.scm.ChangeLogSet$Entry.getAffectedFiles(ChangeLogSet.java:242)
      	at jenkins.plugins.office365connector.Office365ConnectorWebhookNotifier.addScmDetails(Office365ConnectorWebhookNotifier.java:370)
      	at jenkins.plugins.office365connector.Office365ConnectorWebhookNotifier.addCauses(Office365ConnectorWebhookNotifier.java:442)
      	at jenkins.plugins.office365connector.Office365ConnectorWebhookNotifier.createJobCompletedCard(Office365ConnectorWebhookNotifier.java:302)
      	at jenkins.plugins.office365connector.Office365ConnectorWebhookNotifier.getCard(Office365ConnectorWebhookNotifier.java:109)
      	at jenkins.plugins.office365connector.Office365ConnectorWebhookNotifier.getCard(Office365ConnectorWebhookNotifier.java:96)
      	at jenkins.plugins.office365connector.Office365ConnectorWebhookNotifier.sendBuildCompleteNotification(Office365ConnectorWebhookNotifier.java:119)
      	at jenkins.plugins.office365connector.Office365ConnectorBuildListener.onCompleted(Office365ConnectorBuildListener.java:48)
      	at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:211)
      	at hudson.model.Run.execute(Run.java:1773)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:404)
      No webhooks to notify
      

      Attachments

        Activity

          Hi mitorez

          Can you give me more information on how the whole build system is set up? What exactly is the product you are using for SCM? So that we can contact them and work on the resolution. You can email me on srhebbar@microsoft.com.

          Thank-you,
          Sri

          srhebbar Srivardhan Hebbar added a comment - Hi mitorez Can you give me more information on how the whole build system is set up? What exactly is the product you are using for SCM? So that we can contact them and work on the resolution. You can email me on srhebbar@microsoft.com. Thank-you, Sri

          Hi mitorez

          With the version 2.4.1 the unwanted logging on the console have been removed. So you should not be seeing the stack trace on the console.

          Thank-you,
          Sri

          srhebbar Srivardhan Hebbar added a comment - Hi mitorez With the version 2.4.1 the unwanted logging on the console have been removed. So you should not be seeing the stack trace on the console. Thank-you, Sri

          Hi Sri. Sorry for not responding yesterday. What other information do you need about our system setup that I didn't specify in Environment?

          I updated to version 2.4.1 today and my first build afterward failed - and it seems to have failed because of this plugin update.

          Failed build output snip-it with plugin 2.4.1:

          Changelog calculated successfully.
          FATAL: getAffectedFiles() is not implemented by accurev
          java.lang.UnsupportedOperationException: getAffectedFiles() is not implemented by accurev
          	at hudson.scm.ChangeLogSet$Entry.getAffectedFiles(ChangeLogSet.java:242)
          	at jenkins.plugins.office365connector.Office365ConnectorWebhookNotifier.addScmDetails(Office365ConnectorWebhookNotifier.java:367)
          	at jenkins.plugins.office365connector.Office365ConnectorWebhookNotifier.addCauses(Office365ConnectorWebhookNotifier.java:446)
          	at jenkins.plugins.office365connector.Office365ConnectorWebhookNotifier.createJobStartedCard(Office365ConnectorWebhookNotifier.java:186)
          	at jenkins.plugins.office365connector.Office365ConnectorWebhookNotifier.getCard(Office365ConnectorWebhookNotifier.java:108)
          	at jenkins.plugins.office365connector.Office365ConnectorWebhookNotifier.getCard(Office365ConnectorWebhookNotifier.java:96)
          	at jenkins.plugins.office365connector.Office365ConnectorWebhookNotifier.sendBuildStaredNotification(Office365ConnectorWebhookNotifier.java:64)
          	at jenkins.plugins.office365connector.WebhookJobProperty.prebuild(WebhookJobProperty.java:52)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:834)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:829)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:825)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:531)
          	at hudson.model.Run.execute(Run.java:1728)
          	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          	at hudson.model.ResourceController.execute(ResourceController.java:98)
          	at hudson.model.Executor.run(Executor.java:404)
          Email was triggered for: Always
          Email was triggered for: Failure - Any
          Sending email for trigger: Failure - Any
          

          Successful build output snip-it with after reverting to plugin 2.4:

          Changelog calculated successfully.
          No need to notify webhook 'https://outlook.office.com/webhook/955fbb0e-a7c1-46a2-ba35-9129f21a1128@fbc493a8-0d24-4454-a815-f4ca58e8c09d/JenkinsCI/105bc602d6cb48b187b3ea2d9ec810dc/e6738418-46d9-43a3-a29a-ecacef366d4b'
          No emails were triggered.
          
          mitorez Timothy Williams added a comment - Hi Sri. Sorry for not responding yesterday. What other information do you need about our system setup that I didn't specify in Environment ? I updated to version 2.4.1 today and my first build afterward failed - and it seems to have failed because of this plugin update. Failed build output snip-it with plugin 2.4.1: Changelog calculated successfully. FATAL: getAffectedFiles() is not implemented by accurev java.lang.UnsupportedOperationException: getAffectedFiles() is not implemented by accurev at hudson.scm.ChangeLogSet$Entry.getAffectedFiles(ChangeLogSet.java:242) at jenkins.plugins.office365connector.Office365ConnectorWebhookNotifier.addScmDetails(Office365ConnectorWebhookNotifier.java:367) at jenkins.plugins.office365connector.Office365ConnectorWebhookNotifier.addCauses(Office365ConnectorWebhookNotifier.java:446) at jenkins.plugins.office365connector.Office365ConnectorWebhookNotifier.createJobStartedCard(Office365ConnectorWebhookNotifier.java:186) at jenkins.plugins.office365connector.Office365ConnectorWebhookNotifier.getCard(Office365ConnectorWebhookNotifier.java:108) at jenkins.plugins.office365connector.Office365ConnectorWebhookNotifier.getCard(Office365ConnectorWebhookNotifier.java:96) at jenkins.plugins.office365connector.Office365ConnectorWebhookNotifier.sendBuildStaredNotification(Office365ConnectorWebhookNotifier.java:64) at jenkins.plugins.office365connector.WebhookJobProperty.prebuild(WebhookJobProperty.java:52) at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:834) at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:829) at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:825) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:531) at hudson.model.Run.execute(Run.java:1728) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:404) Email was triggered for: Always Email was triggered for: Failure - Any Sending email for trigger: Failure - Any Successful build output snip-it with after reverting to plugin 2.4: Changelog calculated successfully. No need to notify webhook 'https://outlook.office.com/webhook/955fbb0e-a7c1-46a2-ba35-9129f21a1128@fbc493a8-0d24-4454-a815-f4ca58e8c09d/JenkinsCI/105bc602d6cb48b187b3ea2d9ec810dc/e6738418-46d9-43a3-a29a-ecacef366d4b' No emails were triggered.

          Hi mitorez
          Can you try with 2.4.2? Do you still see the exception trace on the console?

          The details I need is:
          1. Are both Jenkins and AccuRev running in the same server?
          2. Is there any special configuration for AccuRev that I need to know to reproduce the same setup here?
          3. Are you using any specific plugin to detect the SCM changes from AccuRev?

          Thank-you

          srhebbar Srivardhan Hebbar added a comment - Hi mitorez Can you try with 2.4.2? Do you still see the exception trace on the console? The details I need is: 1. Are both Jenkins and AccuRev running in the same server? 2. Is there any special configuration for AccuRev that I need to know to reproduce the same setup here? 3. Are you using any specific plugin to detect the SCM changes from AccuRev? Thank-you

          srhebbar I apologize for not getting back to you sooner. I no longer receive an error, but the build console still writes-out this message getAffectedFiles() is not implemented by accurev - some jobs will write this message multiple times.

          mitorez Timothy Williams added a comment - srhebbar I apologize for not getting back to you sooner. I no longer receive an error, but the build console still writes-out this message getAffectedFiles() is not implemented by accurev - some jobs will write this message multiple times.

          Also:

          1. Are both Jenkins and AccuRev running in the same server? Yes
          2. Is there any special configuration for AccuRev that I need to know to reproduce the same setup here? No
          3. Are you using any specific plugin to detect the SCM changes from AccuRev? Accurev plugin 0.7.6 - I haven't upgraded to v0.7.11 yet because of issues I found with v0.7.9 and 0.7.10.
          mitorez Timothy Williams added a comment - Also: Are both Jenkins and AccuRev running in the same server? Yes Is there any special configuration for AccuRev that I need to know to reproduce the same setup here? No Are you using any specific plugin to detect the SCM changes from AccuRev? Accurev plugin 0.7.6 - I haven't upgraded to v0.7.11 yet because of issues I found with v0.7.9 and 0.7.10.

          I think this may have been written-out by something else in the job. I think your last fix cleaned everything up. Thank you. If I see something in the future I'll open a new JIRA and link it to this one. Thanks for your help.

          Srivardhan Hebbar I apologize for not getting back to you sooner. I no longer receive an error, but the build console still writes-out this message getAffectedFiles() is not implemented by accurev - some jobs will write this message multiple times.

          mitorez Timothy Williams added a comment - I think this may have been written-out by something else in the job. I think your last fix cleaned everything up. Thank you. If I see something in the future I'll open a new JIRA and link it to this one. Thanks for your help. Srivardhan Hebbar I apologize for not getting back to you sooner. I no longer receive an error, but the build console still writes-out this message getAffectedFiles() is not implemented by accurev - some jobs will write this message multiple times.

          I have not see any of the messages detailed in this JIRA with my last few job failures, so I believe this is complete. If I see any resurrection of these messages I'll open a new JIRA. Thanks for your help.

          mitorez Timothy Williams added a comment - I have not see any of the messages detailed in this JIRA with my last few job failures, so I believe this is complete. If I see any resurrection of these messages I'll open a new JIRA. Thanks for your help.

          People

            srhebbar Srivardhan Hebbar
            mitorez Timothy Williams
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: