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

Perforce plugin throws null pointer exception upon encountering deleted user

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • p4-plugin
    • None
    • Jenkins 1.457
      P4 Plugin 1.3.11

      P4 plugin throws a null pointer exception causing job failure when running a "p4 -s users <deleted-user>" where <deleted-user> is a once active, now deleted account. The only workaround appears to be to recreate the deleted account which consumes a Perforce license. I have verified this workaround twice with two different deleted accounts.

      Example failure output:

      Started by user cmteam
      Building in workspace /var/opt/jenkins-data/jobs/some-deploy/workspace
      Using master perforce client: ciqa-some-deploy
      [workspace] $ p4 workspace -o ciqa-some-deploy
      Saving modified client ciqa-some-deploy
      [workspace] $ p4 -s client -i
      Clearing workspace...
      Note: .repository directory in workspace (if exists) is skipped.
      Cleared workspace.
      Last build changeset: 79972
      [workspace] $ p4 -s changes -s submitted -m 1 //ciqa-some-deploy/...@somelabel-4.1.0.0
      [workspace] $ p4 -s changes -s submitted //ciqa-some-deploy/...@79973,@85075
      [workspace] $ p4 describe -s 85075
      [workspace] $ p4 -G where //...
      [workspace] $ p4 describe -s 85012
      [workspace] $ p4 describe -s 85005
      [workspace] $ p4 describe -s 84668
      <snip>
      [workspace] $ p4 describe -s 81052
      [workspace] $ p4 describe -s 81031
      [workspace] $ p4 describe -s 81029
      [workspace] $ p4 -s users valid-user-1
      [workspace] $ p4 user -o valid-user-1
      [workspace] $ p4 -s users valid-user-2
      [workspace] $ p4 user -o valid-user-2
      [workspace] $ p4 -s users deleted-user
      FATAL: null
      java.lang.NullPointerException
      at hudson.plugins.perforce.PerforceSCM.retrieveUserInformation(PerforceSCM.java:633)
      at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:816)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1197)
      at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:579)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:468)
      at hudson.model.Run.run(Run.java:1410)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:238)
      And of course the job fails at this point.

      Note that "p4 -s users deleted-user"
      returns
      error: deleted-user - no such user(s).
      exit: 0

      while "p4 -s users valid-user"
      returns
      info: valid-user <valid-user@my.company.com> (Valid User) accessed 2012/03/29
      exit: 0

            rpetti Rob Petti
            sstack S Stack
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: