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

NullPointerException in AccuRev Launcher

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Fixed
    • accurev-plugin
    • Jenkins 2.21 running standalone (not in container)
      Accurev plugin 0.7.0 fails (0.6.35 does not fail)
      Windows 8.1
      java.vendor Oracle Corporation
      java version: 1.8.0_20

    Description

      With Accurev 0.6.35 plugin:

      10:34:55 [workspace] $ "C:\Program Files (x86)\AccuRev\bin\accurev.exe" setproperty -H usmlvv1prodv01:5050 -s HDX-INTGCODE_ELRF -r style <style><color><background-color>#FFFFFF</background-color></color></style>
      10:34:55 FATAL: You are not authorized to perform this operation.
      10:34:55 Setting "text" property "style" on "stream" is an admin function:
      10:34:55 server_admin_trig: You are not in the Depot Admin or User Admin group.
      10:34:55
      10:34:55 FATAL: Failed authentication. (failed with exit code 1 )

      and the build continues.

      With Accurev 0.7.0 plugin:

      [workspace] $ "C:\Program Files (x86)\AccuRev\bin\accurev.exe" setproperty -H usmlvv1prodv01:5050 -s HDX-INTGCODE_ELRF -r style <style><color><background-color>#FFFFFF</background-color></color></style>
      10:33:36 FATAL: You are not authorized to perform this operation.
      10:33:36 Setting "text" property "style" on "stream" is an admin function:
      10:33:36 server_admin_trig: You are not in the Depot Admin or User Admin group.
      10:33:36
      10:33:36 FATAL: Failed authentication. (failed with exit code 1 )
      10:33:36 FATAL: null
      10:33:36 java.lang.NullPointerException
      10:33:36 at hudson.plugins.accurev.AccurevLauncher.runCommand(AccurevLauncher.java:146)
      10:33:36 at hudson.plugins.accurev.cmd.SetProperty.setproperty(SetProperty.java:42)
      10:33:36 at hudson.plugins.accurev.delegates.AbstractModeDelegate.setStreamColor(AbstractModeDelegate.java:308)
      10:33:36 at hudson.plugins.accurev.delegates.AbstractModeDelegate.checkout(AbstractModeDelegate.java:189)
      10:33:36 at hudson.plugins.accurev.AccurevSCM.checkout(AccurevSCM.java:338)
      10:33:36 at hudson.scm.SCM.checkout(SCM.java:495)
      10:33:36 at hudson.model.AbstractProject.checkout(AbstractProject.java:1278)
      10:33:36 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
      10:33:36 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      10:33:36 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
      10:33:36 at hudson.model.Run.execute(Run.java:1720)
      10:33:36 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      10:33:36 at hudson.model.ResourceController.execute(ResourceController.java:98)
      10:33:36 at hudson.model.Executor.run(Executor.java:404)

      and the build fails.

      Attachments

        Activity

          Have you considered giving your jenkins accurev login admin privileges?

          Trying to capture these null pointers that can occur with runCommand

          casz Joseph Petersen (old) added a comment - Have you considered giving your jenkins accurev login admin privileges? Trying to capture these null pointers that can occur with runCommand

          Code changed in jenkins
          User: Joseph
          Path:
          .gitignore
          src/main/java/hudson/plugins/accurev/AccurevLauncher.java
          src/main/java/hudson/plugins/accurev/AccurevSCM.java
          src/main/java/hudson/plugins/accurev/DetermineRemoteHostname.java
          src/main/java/hudson/plugins/accurev/cmd/ChangeLogCmd.java
          src/main/java/hudson/plugins/accurev/cmd/PopulateCmd.java
          src/main/java/hudson/plugins/accurev/cmd/Update.java
          src/main/java/hudson/plugins/accurev/delegates/AbstractModeDelegate.java
          src/main/java/hudson/plugins/accurev/parsers/xml/ParseHistory.java
          src/main/resources/hudson/plugins/accurev/AccurevSCM/global.jelly
          src/main/webapp/help/use-color.html
          http://jenkins-ci.org/commit/accurev-plugin/54cb79967006982752154c27f49e435154d85e9b
          Log:
          NullPointer fixes. better hostname handling. Toggle streamColor. (#27)

          • ignore .DS_Store file

          Cannot prevent bad DNS/Hostname config.

          cannot prevent bad DNS/Hostname.

          • [JENKINS-33103, JENKINS-38148] added toggle for color reset.
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Joseph Path: .gitignore src/main/java/hudson/plugins/accurev/AccurevLauncher.java src/main/java/hudson/plugins/accurev/AccurevSCM.java src/main/java/hudson/plugins/accurev/DetermineRemoteHostname.java src/main/java/hudson/plugins/accurev/cmd/ChangeLogCmd.java src/main/java/hudson/plugins/accurev/cmd/PopulateCmd.java src/main/java/hudson/plugins/accurev/cmd/Update.java src/main/java/hudson/plugins/accurev/delegates/AbstractModeDelegate.java src/main/java/hudson/plugins/accurev/parsers/xml/ParseHistory.java src/main/resources/hudson/plugins/accurev/AccurevSCM/global.jelly src/main/webapp/help/use-color.html http://jenkins-ci.org/commit/accurev-plugin/54cb79967006982752154c27f49e435154d85e9b Log: NullPointer fixes. better hostname handling. Toggle streamColor. (#27) ignore .DS_Store file JENKINS-38148 Handle some null pointers. Cannot prevent bad DNS/Hostname config. JENKINS-38201 Partial fix cannot prevent bad DNS/Hostname. [JENKINS-33103, JENKINS-38148] added toggle for color reset. JENKINS-38201 Better error message
          bercma00 Mark Berchem added a comment -

          I saw that the AccuRev Plugin version 0.7.1 was available. I installed it and verified that it fixed the NullPointerException referenced above. I especially like the new checkbox for turning off the color change commands entirely (with off being the default).

          bercma00 Mark Berchem added a comment - I saw that the AccuRev Plugin version 0.7.1 was available. I installed it and verified that it fixed the NullPointerException referenced above. I especially like the new checkbox for turning off the color change commands entirely (with off being the default).

          Fixed issue with null pointer and added enable/disable for the color commands.

          casz Joseph Petersen (old) added a comment - Fixed issue with null pointer and added enable/disable for the color commands.

          People

            jetersen Joseph Petersen
            bercma00 Mark Berchem
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: