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

AccuRev plugin throws NullPointerException on server rename

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • accurev-plugin
    • None
    • Ubuntu 12.04.5 LTS 64-bit
      Jenkins 1.635
      AccuRev Plugin 0.6.35

      When an AccuRev server is renamed in the global system settings, configurations for existing jobs retain the old server name, and throw a NullPointerException when run:

      Building in workspace /var/lib/jenkins/workspace/1.9.X.X_NIGHTLY_client
      FATAL: null
      java.lang.NullPointerException
      at hudson.plugins.accurev.FindAccurevClientExe.invoke(FindAccurevClientExe.java:69)
      at hudson.plugins.accurev.FindAccurevClientExe.invoke(FindAccurevClientExe.java:13)
      at hudson.FilePath.act(FilePath.java:991)
      at hudson.FilePath.act(FilePath.java:969)
      at hudson.plugins.accurev.AccurevSCM.checkout(AccurevSCM.java:503)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1275)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
      at hudson.model.Run.execute(Run.java:1741)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:410)
      Skipped archiving because build is not successful
      [WS-CLEANUP] Deleting project workspace...[WS-CLEANUP] done
      Finished: FAILURE

      This continues until the server name is reverted, or the job configuration is manually updated with the new server name.

      Major because:

      • Can break a large number of existing jobs.
      • Stack trace is quite misleading - it took me a long time to nail down the root cause of the exception.
      • Zero information from the plugin is logged to jenkins.log

      This case should be handled, or give a relevant error message when a job's AccuRev configuration is invalid.

          [JENKINS-31316] AccuRev plugin throws NullPointerException on server rename

          PR #28 includes fix to server rename, by adding unique identifier.

          Joseph Petersen (old) added a comment - PR #28 includes fix to server rename, by adding unique identifier.

          Code changed in jenkins
          User: Joseph
          Path:
          src/main/java/hudson/plugins/accurev/AccurevLauncher.java
          src/main/java/hudson/plugins/accurev/AccurevPlugin.java
          src/main/java/hudson/plugins/accurev/AccurevSCM.java
          src/main/java/hudson/plugins/accurev/AccurevStream.java
          src/main/java/hudson/plugins/accurev/AccurevTransaction.java
          src/main/java/hudson/plugins/accurev/ParseChangeLog.java
          src/main/java/hudson/plugins/accurev/UUIDUtils.java
          src/main/java/hudson/plugins/accurev/cmd/Login.java
          src/main/java/hudson/plugins/accurev/cmd/PopulateCmd.java
          src/main/java/hudson/plugins/accurev/cmd/ShowStreams.java
          src/main/java/hudson/plugins/accurev/delegates/AbstractModeDelegate.java
          src/main/java/hudson/plugins/accurev/delegates/ReftreeDelegate.java
          src/main/java/hudson/plugins/accurev/delegates/SnapshotDelegate.java
          src/main/java/hudson/plugins/accurev/delegates/WorkspaceDelegate.java
          src/main/java/hudson/plugins/accurev/parsers/xml/ParseShowStreams.java
          src/main/java/hudson/plugins/jetty/security/Password.java
          src/main/resources/hudson/plugins/accurev/AccurevSCM/config.jelly
          src/main/resources/hudson/plugins/accurev/AccurevSCM/global.jelly
          http://jenkins-ci.org/commit/accurev-plugin/b8296bb9c55c924f48c91356fe9ba7d9e35d4298
          Log:
          Merged PR #28 from casz/master

          Poll failed searching in parents when “Show one stream at a time” was
          checked.
          Fixed regression in PR #25

          • Improved logic for Workspace

          Was not working with “One stream at a time” settings.

          • Fixed Change log on Ignore Parent

          getChangesFromStreams did not respect Ignore Stream Parent.

          • Fixed getStreamRules.

          IgnoreStreamParent should be the first to be considered, then One
          Stream at a time on server, then find all streams.

          Introduced unique identifiers, also added a migrator to ensure best
          compatibility moving forward.

          • Fixed backwards compatibility

          Made the Server UUID change fully backwards compatibility :tada:

          I cannot believe this has been open since 2012...

          • StringUtils used
          • Allow empty password even with OBF
          • Javadoc and removed unused migrate field

          These usually originate from accurev sync.

          • PR #24 fix PollOnMaster enabled when build using workspace

          builds that use workspace or reftree definitely requires workspace even
          if PollOnMaster enabled.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Joseph Path: src/main/java/hudson/plugins/accurev/AccurevLauncher.java src/main/java/hudson/plugins/accurev/AccurevPlugin.java src/main/java/hudson/plugins/accurev/AccurevSCM.java src/main/java/hudson/plugins/accurev/AccurevStream.java src/main/java/hudson/plugins/accurev/AccurevTransaction.java src/main/java/hudson/plugins/accurev/ParseChangeLog.java src/main/java/hudson/plugins/accurev/UUIDUtils.java src/main/java/hudson/plugins/accurev/cmd/Login.java src/main/java/hudson/plugins/accurev/cmd/PopulateCmd.java src/main/java/hudson/plugins/accurev/cmd/ShowStreams.java src/main/java/hudson/plugins/accurev/delegates/AbstractModeDelegate.java src/main/java/hudson/plugins/accurev/delegates/ReftreeDelegate.java src/main/java/hudson/plugins/accurev/delegates/SnapshotDelegate.java src/main/java/hudson/plugins/accurev/delegates/WorkspaceDelegate.java src/main/java/hudson/plugins/accurev/parsers/xml/ParseShowStreams.java src/main/java/hudson/plugins/jetty/security/Password.java src/main/resources/hudson/plugins/accurev/AccurevSCM/config.jelly src/main/resources/hudson/plugins/accurev/AccurevSCM/global.jelly http://jenkins-ci.org/commit/accurev-plugin/b8296bb9c55c924f48c91356fe9ba7d9e35d4298 Log: Merged PR #28 from casz/master JENKINS-28118 Fixed poll on ancestor Poll failed searching in parents when “Show one stream at a time” was checked. Fixed regression in PR #25 Improved logic for Workspace Was not working with “One stream at a time” settings. Fixed Change log on Ignore Parent getChangesFromStreams did not respect Ignore Stream Parent. Fixed getStreamRules. IgnoreStreamParent should be the first to be considered, then One Stream at a time on server, then find all streams. JENKINS-31316 Fixed server rename Introduced unique identifiers, also added a migrator to ensure best compatibility moving forward. Fixed backwards compatibility Made the Server UUID change fully backwards compatibility :tada: JENKINS-13817 Mask the damn password already I cannot believe this has been open since 2012... StringUtils used Allow empty password even with OBF Javadoc and removed unused migrate field JENKINS-24710 filter out dispatch transactions These usually originate from accurev sync. PR #24 fix PollOnMaster enabled when build using workspace builds that use workspace or reftree definitely requires workspace even if PollOnMaster enabled.

          Code changed in jenkins
          User: Joseph
          Path:
          src/main/java/hudson/plugins/accurev/AccurevSCM.java
          http://jenkins-ci.org/commit/accurev-plugin/a3d11a023425c41ad0cbaa971081246583c2fb05
          Log:
          JENKINS-31316 fix remaining serverName usage (#31)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Joseph Path: src/main/java/hudson/plugins/accurev/AccurevSCM.java http://jenkins-ci.org/commit/accurev-plugin/a3d11a023425c41ad0cbaa971081246583c2fb05 Log: JENKINS-31316 fix remaining serverName usage (#31)

          Latest code change finally fixes it completely I will release a new version shortly (within 1 week) to fix this issue.

          Joseph Petersen (old) added a comment - Latest code change finally fixes it completely I will release a new version shortly (within 1 week) to fix this issue.

          This is fixed in latest release.

          Joseph Petersen (old) added a comment - This is fixed in latest release.

            jetersen Joseph Petersen
            koarth Dylan Walker
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: