java.lang.NullPointerException

Jenkins JIRA | VegeBrain | 5 years ago
  1. 0

    At the beginning of a build the Perforce plugin executes a series of "p4 where" commands to get the locations of files included in a changelist. If one of these files is not within the workspace for the build the job fails with a null pointer exception. If I add the files to the workspace view then the job starts working. Some explanation may be in order because you may be wondering why not all files are in the build workspace. This is because we have separate Jenkins jobs for each release, and each job has it's own Perforce workspace that includes only the files for that specific release. Each release is it's own directory at the top of the directory tree, so our workspace view specifications follow this format: //depot/product_name/release/source_code_directory_tree/... //workspace_release/... If a developer submits a changelist that includes files in multiple releases, then the release portion of the path will be different. It's possible to modify the same file, say sample.java, for both releases, so the p4 where command will be working with files like: //depot/product_name/1.0/sample.java //depot/product_name/1.1/sample.java For the 1.0 release the p4 where command will work fine for the first file, but p4 where command for the second file causes a null pointer exception for the release 1.1 Here's the console log from the build for our 5.2.1 release. Note how the "p4 where" command works OK for the file in the 5.2.1 release, but fails for the file in the 5.2.2 release. [build_PRODUCT_5.2.1] $ "E:\Program Files\Perforce\p4" -G where //depot/PRODUCT/5.2.1/PasswordRuleSet.java [build_PRODUCT_5.2.1] $ "E:\Program Files\Perforce\p4" -G where //depot/PRODUCT/5.2.2/PasswordChangeDialog.java FATAL: null java.lang.NullPointerException at hudson.plugins.perforce.PerforceSCMHelper.parseWhereMapping(PerforceSCMHelper.java:133) at com.tek42.perforce.parse.Changes.calculateWorkspacePaths(Changes.java:78) at com.tek42.perforce.parse.Changes.getChangelist(Changes.java:67) at com.tek42.perforce.parse.Changes.getChangelistsFromNumbers(Changes.java:403) at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:628) at hudson.model.AbstractProject.checkout(AbstractProject.java:1184) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:537) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:425) at hudson.model.Run.run(Run.java:1376) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:175)

    Jenkins JIRA | 5 years ago | VegeBrain
    java.lang.NullPointerException
  2. 0

    At the beginning of a build the Perforce plugin executes a series of "p4 where" commands to get the locations of files included in a changelist. If one of these files is not within the workspace for the build the job fails with a null pointer exception. If I add the files to the workspace view then the job starts working. Some explanation may be in order because you may be wondering why not all files are in the build workspace. This is because we have separate Jenkins jobs for each release, and each job has it's own Perforce workspace that includes only the files for that specific release. Each release is it's own directory at the top of the directory tree, so our workspace view specifications follow this format: //depot/product_name/release/source_code_directory_tree/... //workspace_release/... If a developer submits a changelist that includes files in multiple releases, then the release portion of the path will be different. It's possible to modify the same file, say sample.java, for both releases, so the p4 where command will be working with files like: //depot/product_name/1.0/sample.java //depot/product_name/1.1/sample.java For the 1.0 release the p4 where command will work fine for the first file, but p4 where command for the second file causes a null pointer exception for the release 1.1 Here's the console log from the build for our 5.2.1 release. Note how the "p4 where" command works OK for the file in the 5.2.1 release, but fails for the file in the 5.2.2 release. [build_PRODUCT_5.2.1] $ "E:\Program Files\Perforce\p4" -G where //depot/PRODUCT/5.2.1/PasswordRuleSet.java [build_PRODUCT_5.2.1] $ "E:\Program Files\Perforce\p4" -G where //depot/PRODUCT/5.2.2/PasswordChangeDialog.java FATAL: null java.lang.NullPointerException at hudson.plugins.perforce.PerforceSCMHelper.parseWhereMapping(PerforceSCMHelper.java:133) at com.tek42.perforce.parse.Changes.calculateWorkspacePaths(Changes.java:78) at com.tek42.perforce.parse.Changes.getChangelist(Changes.java:67) at com.tek42.perforce.parse.Changes.getChangelistsFromNumbers(Changes.java:403) at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:628) at hudson.model.AbstractProject.checkout(AbstractProject.java:1184) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:537) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:425) at hudson.model.Run.run(Run.java:1376) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:175)

    Jenkins JIRA | 5 years ago | VegeBrain
    java.lang.NullPointerException
  3. 0

    At the beginning of a build the Perforce plugin executes a series of "p4 where" commands to get the locations of files included in a changelist. If one of these files is not within the workspace for the build the job fails with a null pointer exception. If I add the files to the workspace view then the job starts working. Some explanation may be in order because you may be wondering why not all files are in the build workspace. This is because we have separate Jenkins jobs for each release, and each job has it's own Perforce workspace that includes only the files for that specific release. Each release is it's own directory at the top of the directory tree, so our workspace view specifications follow this format: //depot/product_name/release/source_code_directory_tree/... //workspace_release/... If a developer submits a changelist that includes files in multiple releases, then the release portion of the path will be different. It's possible to modify the same file, say sample.java, for both releases, so the p4 where command will be working with files like: //depot/product_name/1.0/sample.java //depot/product_name/1.1/sample.java For the 1.0 release the p4 where command will work fine for the first file, but p4 where command for the second file causes a null pointer exception for the release 1.1 Here's the console log from the build for our 5.2.1 release. Note how the "p4 where" command works OK for the file in the 5.2.1 release, but fails for the file in the 5.2.2 release. [build_PRODUCT_5.2.1] $ "E:\Program Files\Perforce\p4" -G where //depot/PRODUCT/5.2.1/PasswordRuleSet.java [build_PRODUCT_5.2.1] $ "E:\Program Files\Perforce\p4" -G where //depot/PRODUCT/5.2.2/PasswordChangeDialog.java FATAL: null java.lang.NullPointerException at hudson.plugins.perforce.PerforceSCMHelper.parseWhereMapping(PerforceSCMHelper.java:133) at com.tek42.perforce.parse.Changes.calculateWorkspacePaths(Changes.java:78) at com.tek42.perforce.parse.Changes.getChangelist(Changes.java:67) at com.tek42.perforce.parse.Changes.getChangelistsFromNumbers(Changes.java:403) at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:628) at hudson.model.AbstractProject.checkout(AbstractProject.java:1184) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:537) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:425) at hudson.model.Run.run(Run.java:1376) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:175)

    Jenkins JIRA | 5 years ago | VegeBrain
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    At the beginning of a build the Perforce plugin executes a series of "p4 where" commands to get the locations of files included in a changelist. If one of these files is not within the workspace for the build the job fails with a null pointer exception. If I add the files to the workspace view then the job starts working. Some explanation may be in order because you may be wondering why not all files are in the build workspace. This is because we have separate Jenkins jobs for each release, and each job has it's own Perforce workspace that includes only the files for that specific release. Each release is it's own directory at the top of the directory tree, so our workspace view specifications follow this format: //depot/product_name/release/source_code_directory_tree/... //workspace_release/... If a developer submits a changelist that includes files in multiple releases, then the release portion of the path will be different. It's possible to modify the same file, say sample.java, for both releases, so the p4 where command will be working with files like: //depot/product_name/1.0/sample.java //depot/product_name/1.1/sample.java For the 1.0 release the p4 where command will work fine for the first file, but p4 where command for the second file causes a null pointer exception for the release 1.1 Here's the console log from the build for our 5.2.1 release. Note how the "p4 where" command works OK for the file in the 5.2.1 release, but fails for the file in the 5.2.2 release. [build_PRODUCT_5.2.1] $ "E:\Program Files\Perforce\p4" -G where //depot/PRODUCT/5.2.1/PasswordRuleSet.java [build_PRODUCT_5.2.1] $ "E:\Program Files\Perforce\p4" -G where //depot/PRODUCT/5.2.2/PasswordChangeDialog.java FATAL: null java.lang.NullPointerException at hudson.plugins.perforce.PerforceSCMHelper.parseWhereMapping(PerforceSCMHelper.java:133) at com.tek42.perforce.parse.Changes.calculateWorkspacePaths(Changes.java:78) at com.tek42.perforce.parse.Changes.getChangelist(Changes.java:67) at com.tek42.perforce.parse.Changes.getChangelistsFromNumbers(Changes.java:403) at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:628) at hudson.model.AbstractProject.checkout(AbstractProject.java:1184) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:537) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:425) at hudson.model.Run.run(Run.java:1376) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:175)

    Jenkins JIRA | 5 years ago | VegeBrain
    java.lang.NullPointerException
  6. 0

    At the beginning of a build the Perforce plugin executes a series of "p4 where" commands to get the locations of files included in a changelist. If one of these files is not within the workspace for the build the job fails with a null pointer exception. If I add the files to the workspace view then the job starts working. Some explanation may be in order because you may be wondering why not all files are in the build workspace. This is because we have separate Jenkins jobs for each release, and each job has it's own Perforce workspace that includes only the files for that specific release. Each release is it's own directory at the top of the directory tree, so our workspace view specifications follow this format: //depot/product_name/release/source_code_directory_tree/... //workspace_release/... If a developer submits a changelist that includes files in multiple releases, then the release portion of the path will be different. It's possible to modify the same file, say sample.java, for both releases, so the p4 where command will be working with files like: //depot/product_name/1.0/sample.java //depot/product_name/1.1/sample.java For the 1.0 release the p4 where command will work fine for the first file, but p4 where command for the second file causes a null pointer exception for the release 1.1 Here's the console log from the build for our 5.2.1 release. Note how the "p4 where" command works OK for the file in the 5.2.1 release, but fails for the file in the 5.2.2 release. [build_PRODUCT_5.2.1] $ "E:\Program Files\Perforce\p4" -G where //depot/PRODUCT/5.2.1/PasswordRuleSet.java [build_PRODUCT_5.2.1] $ "E:\Program Files\Perforce\p4" -G where //depot/PRODUCT/5.2.2/PasswordChangeDialog.java FATAL: null java.lang.NullPointerException at hudson.plugins.perforce.PerforceSCMHelper.parseWhereMapping(PerforceSCMHelper.java:133) at com.tek42.perforce.parse.Changes.calculateWorkspacePaths(Changes.java:78) at com.tek42.perforce.parse.Changes.getChangelist(Changes.java:67) at com.tek42.perforce.parse.Changes.getChangelistsFromNumbers(Changes.java:403) at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:628) at hudson.model.AbstractProject.checkout(AbstractProject.java:1184) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:537) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:425) at hudson.model.Run.run(Run.java:1376) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:175)

    Jenkins JIRA | 5 years ago | VegeBrain
    java.lang.NullPointerException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at hudson.plugins.perforce.PerforceSCMHelper.parseWhereMapping()
    2. hudson.plugins.perforce
      PerforceSCMHelper.parseWhereMapping
      1. hudson.plugins.perforce.PerforceSCMHelper.parseWhereMapping(PerforceSCMHelper.java:133)
      1 frame
    3. com.tek42.perforce
      Changes.getChangelistsFromNumbers
      1. com.tek42.perforce.parse.Changes.calculateWorkspacePaths(Changes.java:78)
      2. com.tek42.perforce.parse.Changes.getChangelist(Changes.java:67)
      3. com.tek42.perforce.parse.Changes.getChangelistsFromNumbers(Changes.java:403)
      3 frames
    4. hudson.plugins.perforce
      PerforceSCM.checkout
      1. hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:628)
      1 frame
    5. Hudson
      Executor.run
      1. hudson.model.AbstractProject.checkout(AbstractProject.java:1184)
      2. hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:537)
      3. hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:425)
      4. hudson.model.Run.run(Run.java:1376)
      5. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      6. hudson.model.ResourceController.execute(ResourceController.java:88)
      7. hudson.model.Executor.run(Executor.java:175)
      7 frames