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

p4 plugin update creating issue if repository browse is not set to swarm url for checkout

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      when i do a checkout from job or from a pipeline script after updating to the latest p4 plugin. it throws the following error.

       
      java.lang.NullPointerException
      at org.jenkinsci.plugins.p4.client.ConnectionHelper.getSwarm(ConnectionHelper.java:595)
      at org.jenkinsci.plugins.p4.changes.P4ChangeParser$ChangeLogHandler.<init>(P4ChangeParser.java:73)
      at org.jenkinsci.plugins.p4.changes.P4ChangeParser.parse(P4ChangeParser.java:48)
      Caused: org.xml.sax.SAXException: Could not parse perforce changelog:
      java.lang.NullPointerException
      at org.jenkinsci.plugins.p4.changes.P4ChangeParser.parse(P4ChangeParser.java:53)
      at org.jenkinsci.plugins.workflow.job.WorkflowRun.onCheckout(WorkflowRun.java:759)
      at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$1500(WorkflowRun.java:127)
      at org.jenkinsci.plugins.workflow.job.WorkflowRun$SCMListenerImpl.onCheckout(WorkflowRun.java:949)
      at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:123)
      at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:130)
      at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:59)
      at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:234)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:405)
      Finished: FAILURE

      I had to go and manually update browse as swarm and url then it works fine.

        Attachments

          Activity

          Hide
          p4karl Karl Wirth added a comment -

          Unable to reproduce in 1.8.3. Setting 'swarm' to blank or not setting browser at all does not cause crash. For example:

           

          // swarm set to empty
          checkout perforce(browser: swarm(''),
               credential: 'P4Server',
               populate: autoClean(delete: true,
               modtime: false,
               parallel:
                  [
                   enable: false,
                   minbytes: '1024',
                   minfiles: '1',
                   threads: '4'
                  ],
               pin: '',
               quiet: true,
               replace: true,
               tidy: false),
               workspace: manualSpec(charset: 'none',
               name: 'jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}',
               pinHost: false,
               spec: clientSpec(allwrite: false,
               backup: false,
               clobber: false,
               compress: false,
               line: 'LOCAL',
               locked: false,
               modtime: false,
               rmdir: false,
               serverID: '',
               streamName: '',
               type: 'WRITABLE',
               view: '//depot/test1/... //jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}/...')))
              
              
          // browser not set    
          checkout perforce(credential: 'P4Server',
               populate: autoClean(delete: true,
               modtime: false,
               parallel:
                  [
                   enable: false,
                   minbytes: '1024',
                   minfiles: '1',
                   threads: '4'
                  ],
               pin: '',
               quiet: true,
               replace: true,
               tidy: false),
               workspace: manualSpec(charset: 'none',
               name: 'jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}',
               pinHost: false,
               spec: clientSpec(allwrite: false,
               backup: false,
               clobber: false,
               compress: false,
               line: 'LOCAL',
               locked: false,
               modtime: false,
               rmdir: false,
               serverID: '',
               streamName: '',
               type: 'WRITABLE',
               view: '//depot/test2/... //jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}/...')))
          

          If this is still a problem please reopen and post an example of the failing code so I can reproduce the problem here.

          Show
          p4karl Karl Wirth added a comment - Unable to reproduce in 1.8.3. Setting 'swarm' to blank or not setting browser at all does not cause crash. For example:   // swarm set to empty checkout perforce(browser: swarm(''),      credential: 'P4Server' ,      populate: autoClean(delete: true ,      modtime: false ,      parallel:         [          enable: false ,          minbytes: '1024' ,          minfiles: '1' ,          threads: '4'         ],      pin: '',      quiet: true ,      replace: true ,      tidy: false ),      workspace: manualSpec(charset: 'none' ,      name: 'jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}' ,      pinHost: false ,      spec: clientSpec(allwrite: false ,      backup: false ,      clobber: false ,      compress: false ,      line: 'LOCAL' ,      locked: false ,      modtime: false ,      rmdir: false ,      serverID: '',      streamName: '',      type: 'WRITABLE' ,      view: ' //depot/test1/... //jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}/...' )))           // browser not set     checkout perforce(credential: 'P4Server' ,      populate: autoClean(delete: true ,      modtime: false ,      parallel:         [          enable: false ,          minbytes: '1024' ,          minfiles: '1' ,          threads: '4'         ],      pin: '',      quiet: true ,      replace: true ,      tidy: false ),      workspace: manualSpec(charset: 'none' ,      name: 'jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}' ,      pinHost: false ,      spec: clientSpec(allwrite: false ,      backup: false ,      clobber: false ,      compress: false ,      line: 'LOCAL' ,      locked: false ,      modtime: false ,      rmdir: false ,      serverID: '',      streamName: '',      type: 'WRITABLE' ,      view: ' //depot/test2/... //jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}/...' ))) If this is still a problem please reopen and post an example of the failing code so I can reproduce the problem here.

            People

            • Assignee:
              Unassigned
              Reporter:
              karthik546 karthik paidi
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: