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

"cannot be cast to hudson.model.TopLevelItem" error when using the lock file report plugin

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I've installed the locked-file report plugin and when I deliberately lock a file and trigger a build I get:

      Searching for locked files in workspace.
      FATAL: hudson.matrix.MatrixConfiguration cannot be cast to hudson.model.TopLevelItem
      java.lang.ClassCastException: hudson.matrix.MatrixConfiguration cannot be cast to hudson.model.TopLevelItem
      at hudson.plugins.lockedfilesreport.LockedFilesReporter.checkForFileUsage(LockedFilesReporter.java:79)
      at hudson.plugins.lockedfilesreport.LockedFilesReporter.prebuild(LockedFilesReporter.java:53)
      at hudson.model.AbstractBuild$AbstractRunner.preBuild(AbstractBuild.java:675)
      at hudson.model.AbstractBuild$AbstractRunner.preBuild(AbstractBuild.java:670)
      at hudson.model.AbstractBuild$AbstractRunner.preBuild(AbstractBuild.java:666)
      at hudson.model.Build$RunnerImpl.doRun(Build.java:121)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:429)
      at hudson.model.Run.run(Run.java:1374)
      at hudson.matrix.MatrixRun.run(MatrixRun.java:137)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:145)

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Erik Ramfelt
          Path:
          src/main/java/hudson/plugins/lockedfilesreport/LockedFilesReporter.java
          src/test/java/hudson/plugins/lockedfilesreport/LockedFilesReporterIntegrationTest.java
          http://jenkins-ci.org/commit/locked-files-report-plugin/abcde75962e9b50bb3a348c66a141acc2b76308d
          Log:
          JENKINS-9904 Fixed so matrix jobs can use the plugin

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Erik Ramfelt Path: src/main/java/hudson/plugins/lockedfilesreport/LockedFilesReporter.java src/test/java/hudson/plugins/lockedfilesreport/LockedFilesReporterIntegrationTest.java http://jenkins-ci.org/commit/locked-files-report-plugin/abcde75962e9b50bb3a348c66a141acc2b76308d Log: JENKINS-9904 Fixed so matrix jobs can use the plugin
          Hide
          dogfood dogfood added a comment -

          Integrated in plugins_locked-files-report #31
          JENKINS-9904 Fixed so matrix jobs can use the plugin

          eramfelt :
          Files :

          • src/main/java/hudson/plugins/lockedfilesreport/LockedFilesReporter.java
          • src/test/java/hudson/plugins/lockedfilesreport/LockedFilesReporterIntegrationTest.java
          Show
          dogfood dogfood added a comment - Integrated in plugins_locked-files-report #31 JENKINS-9904 Fixed so matrix jobs can use the plugin eramfelt : Files : src/main/java/hudson/plugins/lockedfilesreport/LockedFilesReporter.java src/test/java/hudson/plugins/lockedfilesreport/LockedFilesReporterIntegrationTest.java
          Hide
          redsolo redsolo added a comment -

          Could you verify that this fixes the problem for you? You can get a snapshot version here; http://ci.jenkins-ci.org/job/plugins_locked-files-report/31/

          Show
          redsolo redsolo added a comment - Could you verify that this fixes the problem for you? You can get a snapshot version here; http://ci.jenkins-ci.org/job/plugins_locked-files-report/31/
          Hide
          tfields Thomas Fields added a comment -

          Hi,

          My Jenkins system has changed so that no builds happen on the master node now. Does this plugin work in a master/slave setup? I've locked a file on my slave but the build doesn't tell me that the file is locked, instead it just says the usual:

          08:59:33 Building remotely on Build1
          08:59:33 hudson.util.IOException2: remote file operation failed: c:\JCI\workspace\Expat\COMPILER at hudson.remoting.Channel@64368400:Build1
          08:59:33 at hudson.FilePath.act(FilePath.java:781)
          08:59:33 at hudson.FilePath.act(FilePath.java:767)

          If the plugin doesn't tell me about locked files on slaves can that functionality be added? I can create a new issue for it.

          Cheers,
          Tom.

          Show
          tfields Thomas Fields added a comment - Hi, My Jenkins system has changed so that no builds happen on the master node now. Does this plugin work in a master/slave setup? I've locked a file on my slave but the build doesn't tell me that the file is locked, instead it just says the usual: 08:59:33 Building remotely on Build1 08:59:33 hudson.util.IOException2: remote file operation failed: c:\JCI\workspace\Expat\COMPILER at hudson.remoting.Channel@64368400:Build1 08:59:33 at hudson.FilePath.act(FilePath.java:781) 08:59:33 at hudson.FilePath.act(FilePath.java:767) If the plugin doesn't tell me about locked files on slaves can that functionality be added? I can create a new issue for it. Cheers, Tom.
          Hide
          tfields Thomas Fields added a comment -

          Is there an update on this? Should I create a new issue to request the feature I want?

          Regards,
          Tom.

          Show
          tfields Thomas Fields added a comment - Is there an update on this? Should I create a new issue to request the feature I want? Regards, Tom.

            People

            Assignee:
            redsolo redsolo
            Reporter:
            tfields Thomas Fields
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: